... | ... | @@ -13,7 +13,7 @@ To learn more details ,you can refer [here](https://jujucharms.com/docs/1.25/how |
|
|
Before generating the json files,we need to do some preparation:
|
|
|
|
|
|
|
|
|
1. 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
|
|
|
|
|
|
[Trusty image](http://cloud-images.ubuntu.com/trusty/20161014/)
|
|
|
|
... | ... | @@ -27,8 +27,7 @@ Before generating the json files,we need to do some preparation: |
|
|
|
|
|
![upload_image2](/uploads/88cf9453b9c826f36d5669d9e29d564a/upload_image2.png)
|
|
|
|
|
|
|
|
|
2. Install Apache server
|
|
|
## Install Apache server
|
|
|
|
|
|
```shell
|
|
|
sudo apt-get install apache2
|
... | ... | @@ -36,7 +35,7 @@ Before generating the json files,we need to do some preparation: |
|
|
|
|
|
|
|
|
|
|
|
3. Generate image json file:
|
|
|
## Generate image json file:
|
|
|
|
|
|
```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
|
... | ... | @@ -51,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..
|
|
|
|
|
|
4. Generate tools json file:
|
|
|
## Generate tools json file:
|
|
|
|
|
|
```shell
|
|
|
juju metadata generate-tools -d /var/www/html/stack/ --stream released
|
... | ... | @@ -61,14 +60,14 @@ Before generating the json files,we need to do some preparation: |
|
|
|
|
|
`/var/www/html` is the Apache server default directory
|
|
|
|
|
|
5. Use the validation command to ensure iamge and tools are available for juju to use:
|
|
|
## Use the validation command to ensure iamge and tools are available for juju to use:
|
|
|
|
|
|
```shell
|
|
|
juju metadata validate-images
|
|
|
juju metadata validate-tools
|
|
|
```
|
|
|
|
|
|
6. Download tool files:
|
|
|
## Download tool files:
|
|
|
|
|
|
[Download link](https://streams.canonical.com/juju/tools/agent/1.25.6/juju-1.25.6-xenial-amd64.tgz)
|
|
|
|
... | ... | @@ -78,14 +77,14 @@ Before generating the json files,we need to do some preparation: |
|
|
|
|
|
Download the files that match Juju and operating system version
|
|
|
|
|
|
7. Change the files permission
|
|
|
## Change the files permission
|
|
|
|
|
|
```shell
|
|
|
cd /var/www/html/stack
|
|
|
sudo chmod -R 777 ./*
|
|
|
```
|
|
|
|
|
|
8. Bootstrap Juju
|
|
|
## Bootstrap Juju
|
|
|
|
|
|
```shell
|
|
|
juju switch openstack
|
... | ... | |