added maas-cloud.yaml and edit the IP address on the fly in teh config

This commit is contained in:
Anton Smith 2021-10-27 13:08:31 +02:00
parent 3bf65e4b1a
commit f9423a368f
2 changed files with 7 additions and 1 deletions

5
maas-cloud.yaml Normal file
View File

@ -0,0 +1,5 @@
clouds: # clouds key is required.
maas-cloud:
type: maas
auth-types: [oauth1]
endpoint: http://IPADDRESS:5240/MAAS

View File

@ -41,8 +41,9 @@ maas admin vm-hosts read | jq '.[] | select (.name=="proud-possum") | .name, .id
maas admin vm-host compose 1 cores=4 cpu_speed=300 memory=8192 architecture="amd64/generic" \ maas admin vm-host compose 1 cores=4 cpu_speed=300 memory=8192 architecture="amd64/generic" \
storage="main:100(pool1)" storage="main:100(pool1)"
# Juju # Juju (note, this section requires manual intervention)
sudo snap install juju --classic sudo snap install juju --classic
sed -i 's/IP_ADDRESS/${IP_ADDRESS}/' maas-cloud.yaml
juju add-cloud --local maas-cloud maas-cloud.yaml juju add-cloud --local maas-cloud maas-cloud.yaml
juju add-credential maas-cloud juju add-credential maas-cloud
juju clouds --local juju clouds --local