Created
January 19, 2021 20:24
-
-
Save arif-ali/f8a2b50e44492b0d8c9cc683c687566f to your computer and use it in GitHub Desktop.
Quick deploy of VM and bootstrapped juju in LXD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodename=as3-maas-node-01 | |
system_id=$(maas admin machines read hostname=${nodename} | jq .[].system_id | sed s/\"/g) | |
maas admin machine deploy ${system_id} user_data="$(base64 user-data-lxd.yaml)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
ssh_import_id: | |
- lp:arif-ali | |
byobu_by_default: enable | |
timezone: "Europe/London" | |
# Allow ssh passwords | |
ssh_pwauth: True | |
## Update apt database and upgrade packages on first boot | |
package_update: true | |
package_upgrade: true | |
groups: | |
- lxd: [ ubuntu ] | |
users: | |
- default | |
## Install additional packages on first boot | |
packages: | |
- tox | |
snap: | |
commands: | |
- ['install', 'juju', '--classic'] | |
lxd: | |
init: | |
storage_backend: dir | |
bridge: | |
mode: new | |
name: lxdbr0 | |
ipv4_address: 10.1.0.1 | |
ipv4_netmask: 24 | |
ipv4_nat: true | |
# Runs any command that we need to run post install | |
runcmd: | |
- [ "juju", "bootstrap", "localhost", "lxd" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment