wluhan created page: Configure_simplestreams_for_a_private_cloud authored by wluhan's avatar wluhan
...@@ -6,11 +6,11 @@ When Juju bootstraps a cloud, it needs two critical pieces of information: ...@@ -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.** **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). 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 ## Upload Ubuntu 14.04LTS(Trusty) and Ubuntu 16.04LTS(Xenial) image to Openstack
...@@ -34,9 +34,10 @@ Before generating the json files,we need to do some preparation: ...@@ -34,9 +34,10 @@ Before generating the json files,we need to do some preparation:
``` ```
## Generate image json file: ## Generate image json file for simplestreams:
```shell ```shell
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 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
``` ```
...@@ -49,7 +50,7 @@ Before generating the json files,we need to do some preparation: ...@@ -49,7 +50,7 @@ Before generating the json files,we need to do some preparation:
* -a amd64: specifies the CPU architecture. * -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.. * -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 ```shell
juju metadata generate-tools -d /var/www/html/stack/ --stream released 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: ...@@ -57,14 +58,8 @@ Before generating the json files,we need to do some preparation:
Tips: 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: ## Download tool files:
...@@ -83,9 +78,23 @@ Before generating the json files,we need to do some preparation: ...@@ -83,9 +78,23 @@ Before generating the json files,we need to do some preparation:
sudo chmod -R 777 ./* 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 ## Bootstrap Juju
```shell ```shell
juju switch openstack juju switch openstack
juju bootstrap juju bootstrap
``` ```
And then you can try to deploy services by using ```juju deploy```, for example:
```
juju deploy juju-gui
```