Skip to content

Commit 70d9401

Browse files
authored
fix: correct octavia docs so they're functional (#1320)
Signed-off-by: Kevin Carter <[email protected]>
1 parent 4ece0e1 commit 70d9401

File tree

2 files changed

+38
-36
lines changed

2 files changed

+38
-36
lines changed

ansible/playbooks/octavia-preconf-main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
octavia_os_identity_api_version: 3
1515
octavia_os_auth_version: 3
1616
octavia_nova_endpoint_type: "{{ octavia_os_endpoint_type }}"
17-
octavia_helm_values_file: "{{ octavia_helm_file }}"
17+
octavia_helm_values_file: "{{ octavia_helm_file | default(lookup('env', 'HOME') ~ '/octavia_amphora_provider.yaml') }}"
1818
interface: "{{ interface }}"
1919
endpoint_type: "{{ endpoint_type }}"
2020
environment:

docs/openstack-octavia.md

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ Before you can deploy octavia, it requires a few things to be setup ahead of tim
5252
In order to automate these tasks, we have provided an ansible role and a playbook. The playbook, `octavia-preconf-main.yaml`,
5353
is located in the ansible/playbook directory. You will need to update the variables in the playbook to match your deployment.
5454

55-
Make sure to udpate the octavia-preconf-main.yaml with the correct region, auth url, and password.
55+
Make sure to udpate the `octavia-preconf-main.yaml` with the correct region, auth url, and password.
5656

5757
!!! tip
5858

5959
The playbook requires a few pip packages to run properly. While the dependencies for this playbook should be installed by
6060
default, the playbook runtime can be isolated in a virtualenv if needed.
6161

62-
!!! example
62+
??? example "Create a virtualenv for running the Octavia pre-deployment playbook"
6363

6464
``` shell
6565
apt-get install python3-venv python3-pip
@@ -79,26 +79,13 @@ Review the settings and adjust as necessary. Depending on the size of your clust
7979

8080
### Run the playbook
8181

82-
You can get the Keystone url and region with the following command.
83-
84-
``` shell
85-
openstack --os-cloud=default endpoint list --service keystone --interface public -c Region -c URL -f value
86-
```
87-
88-
You can get the admin password by using kubectl.
89-
90-
``` shell
91-
kubectl get secrets keystone-admin -n openstack -o jsonpath='{.data.password}' | base64 -d
92-
```
93-
94-
Run the playbook
82+
Change to the playbook directory.
9583

9684
``` shell
9785
cd /opt/genestack/ansible/playbooks
98-
ansible-playbook octavia-preconf-main.yaml
9986
```
10087

101-
!!! tip "Dynamic values"
88+
=== "Dynamic values"
10289

10390
Running the playbook can be fully dynamic by using the following command:
10491

@@ -108,47 +95,62 @@ ansible-playbook octavia-preconf-main.yaml
10895
ansible-playbook /opt/genestack/ansible/playbooks/octavia-preconf-main.yaml \
10996
-e octavia_os_password=$(kubectl get secrets keystone-admin -n openstack -o jsonpath='{.data.password}' | base64 -d) \
11097
-e octavia_os_region_name=$(openstack --os-cloud=default endpoint list --service keystone --interface public -c Region -f value) \
111-
-e octavia_os_auth_url=$(openstack --os-cloud=default endpoint list --service keystone --interface public -c URL -f value)
98+
-e octavia_os_auth_url=$(openstack --os-cloud=default endpoint list --service keystone --interface public -c URL -f value) \
99+
-e octavia_helm_file=/tmp/octavia_amphora_provider.yaml
100+
```
101+
102+
=== "Static values skipping tags for post deploy updates"
103+
104+
You can get the Keystone url and region with the following command.
105+
106+
``` shell
107+
openstack --os-cloud=default endpoint list --service keystone --interface public -c Region -c URL -f value
108+
```
109+
110+
You can get the admin password by using kubectl.
111+
112+
``` shell
113+
kubectl get secrets keystone-admin -n openstack -o jsonpath='{.data.password}' | base64 -d
114+
```
115+
116+
!!! example "Run the playbook with optional skip-tags values"
117+
118+
``` shell
119+
ansible-playbook /opt/genestack/ansible/playbooks/octavia-preconf-main.yaml \
120+
-e octavia_os_password=$PASSWORD \
121+
-e octavia_os_region_name=$REGION_NAME \
122+
-e octavia_os_auth_url=$AUTH_URL \
123+
-e octavia_helm_file=/tmp/octavia_amphora_provider.yaml
112124
```
113125

114-
!!! tip "Dynamic values skipping tags for post deploy updates"
126+
=== "Skipping tags for pre deploy setup"
115127

116-
Use --skip-tags "post_deploy" to avoid quota, cert and keypair updates:
128+
If you have already run the pre-deployment steps and need to re-generate the helm values file, you can skip the
129+
pre-deployment steps by using the `--skip-tags "pre_deploy"` option.
117130

118131
!!! example "Run the playbook with optional skip-tags values"
119132

120133
``` shell
121134
ansible-playbook /opt/genestack/ansible/playbooks/octavia-preconf-main.yaml \
122-
-e octavia_os_password=$(kubectl get secrets keystone-admin -n openstack -o jsonpath='{.data.password}' | base64 -d) \
123-
-e octavia_os_region_name=$(openstack --os-cloud=default endpoint list --service keystone --interface public -c Region -f value) \
124-
-e octavia_os_auth_url=$(openstack --os-cloud=default endpoint list --service keystone --interface public -c URL -f value) \
125-
--skip-tags "post_deploy"
135+
--skip-tags "pre_deploy"
126136
```
127137

128-
Once everything is complete, a new file will be created in your home directory called `octavia_amphora_provider.yaml`, this file
138+
Once everything is complete, a new file will be created in your TMP directory called `/tmp/octavia_amphora_provider.yaml`, this file
129139
contains the necessary information to deploy Octavia via helm. Move this file into the `/etc/genestack/helm-configs/octavia`
130140
directory to have it automatically included when running the Octavia deployment script.
131141

132142
``` shell
133-
mv ~/octavia_amphora_provider.yaml /etc/genestack/helm-configs/octavia/
143+
mv /tmp/octavia_amphora_provider.yaml /etc/genestack/helm-configs/octavia/
134144
```
135145

136146
## Run the Helm deployment
137147

138-
!!! example "Run the Octavia deployment Script `/opt/genestack/bin/install-octavia.sh`"
148+
??? example "Run the Octavia deployment Script `/opt/genestack/bin/install-octavia.sh`"
139149

140150
``` shell
141151
--8<-- "bin/install-octavia.sh"
142152
```
143153

144-
**Make sure to include the file when you run the script by adding a `-f /<HOME_DIRECTORY>/octavia_amphora_provider.yaml`**
145-
146-
!!! example
147-
148-
``` shell
149-
/opt/genestack/bin/install-octavia.sh
150-
```
151-
152154
!!! tip
153155

154156
You may need to provide custom values to configure your openstack services, for a simple single region or lab deployment

0 commit comments

Comments
 (0)