Add user_dats file and update password
This commit is contained in:
parent
74c75cb9b7
commit
d3453fcab9
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
maas.config
|
||||
maas.debconf
|
||||
*.xml
|
||||
|
@ -5,7 +5,7 @@ hypervisor_mac="a8:a1:59:44:70:ac"
|
||||
external_vlan=1
|
||||
|
||||
qemu_connection="qemu+ssh://virsh@${hypervisor_ip}/system"
|
||||
qemu_password="seBGtkWFKZuFUFgig8NYU5uh"
|
||||
qemu_password="SgUoBByKjG9Lj78SwfWAHXD8DvgE67Cu"
|
||||
|
||||
storage_path="/var/lib/libvirt/maas-images"
|
||||
|
||||
|
@ -162,7 +162,13 @@ destroy_node() {
|
||||
|
||||
deploy_node() {
|
||||
system_id=$(maas_system_id ${hypervisor_name})
|
||||
maas ${maas_profile} machine deploy ${system_id} install_kvm=true user_data="$(base64 user-data.yaml)"
|
||||
#maas ${maas_profile} machine deploy ${system_id} install_kvm=true user_data="$(base64 user-data.yaml)"
|
||||
|
||||
maas ${maas_profile} machine deploy ${system_id} user_data="$(base64 user-data.yaml)"
|
||||
|
||||
# TODO: keep trying, until it gives a valid output
|
||||
#until $(maas ${maas_profile} machine deploy ${system_id} install_kvm=true) ; do
|
||||
# machine ${maas_profile} machine release ${system_id}
|
||||
}
|
||||
|
||||
show_help() {
|
||||
|
@ -3,29 +3,41 @@
|
||||
ssh_import_id:
|
||||
- lp:arif-ali
|
||||
|
||||
groups:
|
||||
- virsh
|
||||
|
||||
user:
|
||||
- name: virsh
|
||||
primary_group: virsh
|
||||
groups: libvirt, libvirt-qemu
|
||||
#password: SZRMBxvfBnhNRUFdo4kZh3RYwVZYCy5Q
|
||||
password: $6$rounds=4096$wkZS4scqVpL6NHio$nwiGisbbwy0/YDYT391xc0lNs.6JX4tDcJ26Z3XMhloT1bI2pS6aMB0LXQ3noOzRD2I.OEzy/7YVEjwVAGzlM0
|
||||
|
||||
## Update apt database and upgrade packages on first boot
|
||||
package_update: true
|
||||
package_upgrade: true
|
||||
|
||||
users:
|
||||
- default
|
||||
- name: virsh
|
||||
primary_group: virsh
|
||||
groups: [ libvirt, libvirt-qemu ]
|
||||
passwd: $6$rounds=4096$lSbs3gFH3KhLmbWi$EYqoyw2QreaFBonLX8VQgcCGdWktsggp2j/D3qAnQT6azw92hZR8Vvu.wVlDzBaCPPzh8HO.QPprzVruEoqLP0
|
||||
|
||||
## Install additional packages on first boot
|
||||
packages:
|
||||
- virtinst
|
||||
- bc
|
||||
- jq
|
||||
- virtinst
|
||||
- bc
|
||||
- jq
|
||||
- qemu-kvm
|
||||
- libvirt-bin
|
||||
- qemu-efi
|
||||
|
||||
## Write arbitrary files to the file-system (including binaries!)
|
||||
write_files:
|
||||
- path: /root/initial_setup.sh
|
||||
content: |
|
||||
#!/bin/bash
|
||||
|
||||
git clone https://github.com/arif-ali/maas-autobuilder.git /root/maas-autobuilder
|
||||
cd /root/maas-autobuilder
|
||||
ln -sf ${HOSTNAME}.config maas-autobuilder/hypervisor.config
|
||||
|
||||
chmod +x manage-maas-nodes.sh
|
||||
./manage-maas-nodes.sh
|
||||
permissions: '0755'
|
||||
owner: root:root
|
||||
|
||||
# Runs any command that we need to run post install
|
||||
runcmd:
|
||||
- [ "git", "clone", "https://github.com/arif-ali/maas-autobuilder.git" ]
|
||||
- [ "ln", "-sf", "maas-autobuilder/${HOSTNAME}.config", "maas-autobuilder/hypervisor.config" ]
|
||||
- [ "cd", "maas-autobuilder", "&&", "./manage-maas-nodes.sh" ]
|
||||
- [ "sudo", "efibootmgr", "-n", "0001" ]
|
||||
- [ "/root/initial_setup.sh" ]
|
||||
|
Loading…
Reference in New Issue
Block a user