... | ... | @@ -6,11 +6,11 @@ When Juju bootstraps a cloud, it needs two critical pieces of information: |
|
|
|
|
|
**The URL from which to download the correct version of a tools tarball.**
|
|
|
|
|
|
We can simply think the essential information above is stored in two json files.
|
|
|
The essential information above is actually stored in two json files in simplestreams.
|
|
|
|
|
|
To learn more details ,you can refer [here](https://jujucharms.com/docs/1.25/howto-privatecloud).
|
|
|
|
|
|
Before generating the json files,we need to do some preparation:
|
|
|
Before configuring the simplestreams, we need to do some preparations:
|
|
|
|
|
|
|
|
|
## Upload Ubuntu 14.04LTS(Trusty) and Ubuntu 16.04LTS(Xenial) image to Openstack
|
... | ... | @@ -34,10 +34,11 @@ Before generating the json files,we need to do some preparation: |
|
|
```
|
|
|
|
|
|
|
|
|
## Generate image json file:
|
|
|
## Generate image json file for simplestreams:
|
|
|
|
|
|
```shell
|
|
|
sudo juju metadata generate-image -a amd64 -i 843bef24-8c70-40e1-a380-972717c9e4b3 -r RegionOne -s xenial -d /var/www/html/stack -u http://172.16.1.3:5000/v2.0 -e openstack
|
|
|
sudo mkdire /var/www/html/stack
|
|
|
sudo juju metadata generate-image -a amd64 -i 843bef24-8c70-40e1-a380-972717c9e4b3 -r RegionOne -s xenial -d /var/www/html/stack -u http://172.16.1.3:5000/v2.0 -e openstack
|
|
|
```
|
|
|
|
|
|
Regarding the command-line flags used:
|
... | ... | @@ -49,7 +50,7 @@ Before generating the json files,we need to do some preparation: |
|
|
* -a amd64: specifies the CPU architecture.
|
|
|
* -d /var/www/html/stack: specifies the base directory where the metadata will be written to. For images, the path will be /opt/stack/images/streams/v1..
|
|
|
|
|
|
## Generate tools json file:
|
|
|
## Generate tools json file for simplestreams:
|
|
|
|
|
|
```shell
|
|
|
juju metadata generate-tools -d /var/www/html/stack/ --stream released
|
... | ... | @@ -57,14 +58,8 @@ Before generating the json files,we need to do some preparation: |
|
|
|
|
|
Tips:
|
|
|
|
|
|
`/var/www/html` is the Apache server default directory
|
|
|
`/var/www/html` is the default directory of Apache server
|
|
|
|
|
|
## Use the validation command to ensure iamge and tools are available for juju to use:
|
|
|
|
|
|
```shell
|
|
|
juju metadata validate-images
|
|
|
juju metadata validate-tools
|
|
|
```
|
|
|
|
|
|
## Download tool files:
|
|
|
|
... | ... | @@ -83,9 +78,23 @@ Before generating the json files,we need to do some preparation: |
|
|
sudo chmod -R 777 ./*
|
|
|
```
|
|
|
|
|
|
## Use the validation commands to ensure image and tools are available for juju to use:
|
|
|
|
|
|
```shell
|
|
|
juju metadata validate-images
|
|
|
juju metadata validate-tools
|
|
|
```
|
|
|
|
|
|
## Bootstrap Juju
|
|
|
|
|
|
```shell
|
|
|
juju switch openstack
|
|
|
juju bootstrap
|
|
|
``` |
|
|
\ No newline at end of file |
|
|
```
|
|
|
|
|
|
And then you can try to deploy services by using ```juju deploy```, for example:
|
|
|
|
|
|
```
|
|
|
juju deploy juju-gui
|
|
|
```
|
|
|
|