************************************************
Juju - openstack over openstack
************************************************
openstack.yaml
clouds:
openstack:
type: openstack
auth-types: [access-key, userpass]
regions:
RegionOne:
endpoint: http://<keystone ip>:5000/v2.0/
$ juju add-cloud openstack openstack.yaml
$ source adminrc
$ juju autoload-credentials
#comment domain-name in ~/.local/share/juju/credentials.yaml
juju documentation for simplestreams https://jujucharms.com/docs/2.0/howto-privatecloud : only follow the session “Generating the metadata”
Copy the ~/simplestreams/images in /var/www/html and ensure apache2 is running
$ sudo vi /var/www/html/simplestreams/images/streams/v1/index.json
# and update keystone url/port if different
upload a ubuntu image to glance (download the image from here https://cloud-images.ubuntu.com/xenial/)
if we face issues in bootstrap
# and if uploaded, update the other file in same directory (/var/www/html/simplestreams/images/streams/v1/) with the image id
$ juju bootstrap --config image-metadata-url=http://172.30.40.10/simplestreams/images --config use-default-secgroup=true openstack --config network=3c4b58fe-db7d-4ade-bac9-47b90ff2d927 --config use-floating-ip=true openstack-openstack --debug
OR
$ juju bootstrap --metadata-source /home/junaid/simplestreams/ --config use-default-secgroup=true openstack --config network=7bbaf8d9-3a6f-4888-84a2-2c8e22a3a764 --config use-floating-ip=false openstack-openstack --debug
We can specify instance type in bootstrap command as well by specifying --constraints instance-type=m1.micro
# stuck at installing juju packages
ssh ubuntu@<floating-ip>
ping google.com
#if not pinging add nameserver 8.8.8.8 in /etc/resolv.conf