Skip to content

Commit 165d081

Browse files
authored
feat: Add endpoints.yaml to hyperconverged lab script to enable external OpenStack Access (rackerlabs#986)
1 parent 3019741 commit 165d081

File tree

2 files changed

+427
-133
lines changed

2 files changed

+427
-133
lines changed

docs/build-test-envs.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ of deploying a test environment on an OpenStack cloud in a simple three node con
99
The following script will deploy a hyperconverged lab environment on an OpenStack cloud. The script can be found at
1010
[`scripts/hyperconverged-lab.sh`](https://raw.githubusercontent.com/rackerlabs/genestack/refs/heads/main/scripts/hyperconverged-lab.sh).
1111

12-
??? "View the Hyper-converged Lab Script"
12+
??? "View the Hyper-converged Lab Script"
1313

1414
``` shell
1515
--8<-- "scripts/hyperconverged-lab.sh"
@@ -110,6 +110,71 @@ After the deployment is complete, the script will output the internal and extern
110110

111111
With this information, operators can login to the Genestack instance and begin to explore the platform.
112112

113+
!!! Genestack
114+
Genestack uses DNS to route services in Kubernetes, which may be a bit different from what you might be used to in other lab environments, where
115+
IP addresses are used heavily. To be able to access OpenStack externally from the jumpbox, set `GATEWAY_DOMAIN` to a DNS domain that you control.
116+
117+
### Setting up DNS for a Hyper-Converged Lab
118+
119+
At the end of the hyper-converged lab script run, you will see output that looks like this:
120+
121+
```
122+
The lab is now ready for use and took 1298 seconds to complete.
123+
This is the jump host address WW.XX.YY.ZZ, write this down.
124+
This is the VIP address internally 192.168.100.NN with public address AA.BB.CC.DD within MetalLB, write this down.
125+
```
126+
127+
To make DNS correctly resolve the OpenStack services in the lab, you will need to set some DNS entries for the `GATEWAY_DOMAIN` you specified when building the lab. Using the "cluster.local" default example domain, you should configure something like this:
128+
129+
```
130+
jumpbox.cluster.local A WW.XX.YY.ZZ
131+
cluster.local A AA.BB.CC.DD
132+
*.cluster.local CNAME cluster.local
133+
```
134+
135+
!!! Warning
136+
Do **NOT** use `cluster.local` as your domain. You will need to use a domain that you control and you will need to set the `GATEWAY_DOMAIN` variable to this prior to building your hyper-converged lab.
137+
138+
### Accessing your Hyper-Converged Lab
139+
140+
When generating your hyper-converged lab, the script creates an SSH key pair and puts it into your `$HOME/.ssh` directory. The name of the key is derived from the `LAB_NAME_PREFIX` variable, and the default is `hyperconverged`.
141+
142+
To access the lab, you can SSH into the jumpbox using this key as the default user of the OpenStack Glance image you specified. The default image is Ubuntu 24.04 LTS which has a default user of `ubuntu`. In this case, the SSH command would be as follows:
143+
144+
```bash
145+
bash$ ssh -i $HOME/.ssh/hyperconverged-key.pem [email protected]
146+
```
147+
148+
The jumpbox user has passwordless sudo if configured in the Glance image. (The Ubuntu 24.04 LTS image has this.)
149+
150+
If you sudo to the `root` user, and look at the `clouds.yaml` file for that user, you will be able to see the OpenStack `admin` user password:
151+
152+
```
153+
bash$ sudo su - root
154+
bash# cat $HOME/.config/openstack/clouds.yaml
155+
cache:
156+
auth: true
157+
expiration_time: 3600
158+
clouds:
159+
default:
160+
auth:
161+
auth_url: http://keystone-api.openstack.svc.cluster.local:5000/v3
162+
project_name: admin
163+
tenant_name: default
164+
project_domain_name: default
165+
username: admin
166+
password: <PASSWORD>
167+
user_domain_name: default
168+
region_name: RegionOne
169+
interface: internal
170+
identity_api_version: "3"
171+
```
172+
173+
This can be used to login to the Skyline web console. To access the Skyline web console, you can just enter `https://skyline.cluster.local` (again, using `cluster.local` as an example) and access it from your web browser.
174+
175+
!!! Note
176+
If you get SSL errors, wait a bit. Cert Manager takes time to generate all the SSL certs it using with Let's Encrypt.
177+
113178
## Demo
114179

115180
[![asciicast](https://asciinema.org/a/706976.svg)](https://asciinema.org/a/706976)

0 commit comments

Comments
 (0)