-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquickstart.html
More file actions
456 lines (359 loc) · 16.5 KB
/
Copy pathquickstart.html
File metadata and controls
456 lines (359 loc) · 16.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quick Start — Nutanix OpenShift Onboarding</title>
<link rel="stylesheet" href="https://unpkg.com/@patternfly/patternfly@6.4.0/patternfly.css">
<script src="https://cdn.jsdelivr.net/npm/marked@18.0.5/lib/marked.umd.js" integrity="sha384-ZD0fTOwPMHi7zM6WTVIWJR21I07lq0ccnqz3J6WMvQKG9thh4y7TA1QE6PJu0Af8" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.16.0/dist/mermaid.min.js" integrity="sha384-T/0lMUdJpd2S1ZHtRiofG3htU3xPCrFVeAQ1UUE2TJwlEJSV5NUwn30kP28n238E" crossorigin="anonymous"></script>
<style>
.pf-v6-c-masthead { background-color: #151515 !important; }
.pf-v6-c-page__sidebar { background-color: #fff !important; border-right: 1px solid #d2d2d2; }
.pf-v6-c-nav__link { color: #151515 !important; }
.pf-v6-c-nav__link:hover { color: #06c !important; background-color: #f0f0f0 !important; }
.pf-v6-c-nav__link.pf-m-current { color: #06c !important; font-weight: 600; border-left: 3px solid #06c; }
.pf-v6-c-page__main-section { background-color: #fff; }
.content-body { max-width: 960px; padding: 1rem 2rem; color: #151515; }
.content-body h1 { border-bottom: 2px solid #d2d2d2; padding-bottom: 0.3em; color: #151515; }
.content-body h2 { border-bottom: 1px solid #d2d2d2; padding-bottom: 0.3em; margin-top: 2em; color: #151515; }
.content-body h3 { margin-top: 1.5em; color: #151515; }
.content-body h4 { margin-top: 1.2em; color: #151515; }
.content-body p, .content-body li, .content-body td { color: #333; }
.content-body table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.content-body th, .content-body td { border: 1px solid #d2d2d2; padding: 8px 12px; text-align: left; }
.content-body th { background: #f0f0f0; font-weight: 600; color: #151515; }
.content-body tr:nth-child(even) { background: #fafafa; }
.content-body pre { background: #f0f0f0; border: 1px solid #d2d2d2; border-radius: 6px; padding: 16px; overflow-x: auto; font-size: 0.9em; color: #151515; }
.content-body code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 0.9em; color: #151515; }
.content-body :not(pre) > code { background: #e8e8e8; padding: 2px 6px; border-radius: 3px; }
.content-body blockquote { border-left: 4px solid #d2d2d2; margin: 1em 0; padding: 0.5em 1em; color: #555; }
.content-body a { color: #0066cc; text-decoration: none; }
.content-body a:hover { text-decoration: underline; }
.content-body hr { border: none; border-top: 1px solid #d2d2d2; margin: 2em 0; }
.content-body .mermaid { text-align: center; margin: 1.5em 0; }
.content-body img { max-width: 100%; }
.content-body ul, .content-body ol { padding-left: 2em; }
.content-body strong { font-weight: 600; color: #151515; }
</style>
</head>
<body>
<div class="pf-v6-c-page">
<header class="pf-v6-c-masthead">
<div class="pf-v6-c-masthead__main">
<div class="pf-v6-c-masthead__brand">
<span style="font-size:1.1em; font-weight:700; color:#fff;">Nutanix OpenShift Onboarding</span>
</div>
</div>
</header>
<div class="pf-v6-c-page__sidebar">
<div class="pf-v6-c-page__sidebar-body">
<nav class="pf-v6-c-nav" aria-label="Global">
<ul class="pf-v6-c-nav__list">
<li class="pf-v6-c-nav__item">
<a class="pf-v6-c-nav__link" href="introduction.html">Introduction</a>
</li>
<li class="pf-v6-c-nav__item">
<a class="pf-v6-c-nav__link" href="repositories.html">Repositories</a>
</li>
<li class="pf-v6-c-nav__item">
<a class="pf-v6-c-nav__link" href="architecture.html">Architecture</a>
</li>
<li class="pf-v6-c-nav__item">
<a class="pf-v6-c-nav__link" href="installation.html">Installation</a>
</li>
<li class="pf-v6-c-nav__item">
<a class="pf-v6-c-nav__link pf-m-current" href="quickstart.html">Quick Start</a>
</li>
</ul>
</nav>
</div>
</div>
<main class="pf-v6-c-page__main" tabindex="-1">
<section class="pf-v6-c-page__main-section">
<div class="content-body" id="content"></div>
</section>
</main>
</div>
<script id="raw-markdown" type="text/markdown">
# OpenShift on Nutanix — Developer Quick-Start
This guide walks through installing an OpenShift cluster on the Nutanix development environments.
## Environments
| Environment | Prism Central URL |
|---|---|
| Development-STS2 (nutanix-dev) | `https://prismcentral.sts2-cluster.internal.nutanix-dev.devcluster.openshift.com:9440/` |
---
## Step 1: Determine VIP Addresses
OpenShift requires two static Virtual IP (VIP) addresses:
| VIP | Purpose |
|---|---|
| **API VIP** | Kubernetes API access (`api.<cluster_name>.<base_domain>` and `api-int.<cluster_name>.<base_domain>`) |
| **Ingress VIP** | Application route access (`*.apps.<cluster_name>.<base_domain>`) |
### Environment: Development-STS2 (nutanix-dev)
- **AWS Account:** nutanix-dev (`950746161084`)
- **Hosted Zone:** `nutanix-dev.devcluster.openshift.com`
- **Cluster:** Development-STS2
- **Nutanix Subnet:** `Nutanix_Cluster_FDE303E4D564_UVM2` (has static IP assignments)
- **VIP Range:** `10.0.131.4` – `10.0.131.62` (subnet `10.0.131.0/24`)
### Networking Warnings
> **Do not use `10.128.x.x` addresses.** The `10.128.0.0/14` range is reserved for CVM/Hosts on most clusters.
> **Do not use `management` networks** for OpenShift VMs. Networks labeled "management" are for infrastructure, not user VMs. Use networks labeled **"UVM"** or **"Zonal"**.
> **Do not modify infrastructure VMs.** VMs named `pc_vm_*`, `NTNX-aws-master-CVM`, `central`, or `NTNX-*-PCVM-*` are Nutanix infrastructure. Do not stop, delete, or reconfigure them.
> **Note:** This environment runs on Nutanix Cloud Clusters (NC2) on AWS. Nutanix handles DHCP/networking, but the underlying infrastructure is AWS — `10.0.0.2` is AWS DNS.
### Find an Available VIP
Pick two unused addresses from the VIP range by checking which IPs already have A records in the hosted zone.
1. Sign in to the [AWS Console](https://auth.redhat.com/auth/realms/EmployeeIDP/protocol/saml/clients/itaws) using the appropriate account (e.g., `nutanix-dev` / `950746161084` for Development-STS2).
2. Navigate to **Route 53** → **Hosted zones**.
3. Select the hosted zone (e.g., `nutanix-dev.devcluster.openshift.com`).
4. Review the existing **A records**. Each A record's value is an IP address already in use.
5. Choose two IP addresses from the VIP range that do **not** appear in any existing A record.
For example, if `10.0.131.4` through `10.0.131.10` are already in use, you could pick `10.0.131.11` as the API VIP and `10.0.131.12` as the Ingress VIP.
### Create DNS Records
Once you have selected your two VIP addresses, create the following A records in the hosted zone. Use your chosen cluster name (e.g., `mycluster`):
| Record Name | Type | Value | Notes |
|---|---|---|---|
| `api.mycluster.nutanix-dev.devcluster.openshift.com` | A | `<API_VIP>` | API endpoint |
| `api-int.mycluster.nutanix-dev.devcluster.openshift.com` | A | `<API_VIP>` | Internal API — same address as `api` |
| `*.apps.mycluster.nutanix-dev.devcluster.openshift.com` | A | `<INGRESS_VIP>` | Wildcard for application routes |
To create these in the AWS Console:
1. In the hosted zone, click **Create record**.
2. Enter the record name (e.g., `api.mycluster`).
3. Set **Record type** to **A**.
4. Enter the VIP address in **Value**.
5. Click **Create records**.
6. Repeat for `api-int.mycluster` (same IP as `api`) and `*.apps.mycluster` (Ingress VIP).
---
## Step 2: Download the Installer and CLI Tools
Download the `openshift-install` binary and `oc` CLI from the [OpenShift mirror](https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.22.3/).
```bash
# Download and extract the installer
curl -L -o openshift-install-linux.tar.gz \
https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.22.3/openshift-install-linux.tar.gz
tar -xvf openshift-install-linux.tar.gz
# Download and extract the oc CLI
curl -L -o openshift-client-linux.tar.gz \
https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.22.3/openshift-client-linux.tar.gz
tar -xvf openshift-client-linux.tar.gz
sudo mv oc kubectl /usr/local/bin/
```
Verify the tools are working:
```bash
./openshift-install version
oc version --client
```
---
## Step 3: Obtain the Prism Central CA Certificate
The OpenShift installer must trust the Prism Central API endpoint. Download the root CA certificate chain and point the installer to it using the `SSL_CERT_FILE` environment variable.
For the full reference, see [Adding Nutanix root CA certificates](https://docs.redhat.com/en/documentation/openshift_container_platform/4.12/html/installing_on_nutanix/installing-restricted-networks-nutanix-installer-provisioned#installation-adding-nutanix-root-certificates_installing-restricted-networks-nutanix-installer-provisioned).
### Download the CA chain
Extract the full certificate chain from the Prism Central TLS connection using `openssl`:
```bash
# Replace <prism_central_address> with your environment's Prism Central hostname.
# For Development-STS2:
# prismcentral.lts2-cluster.internal.nutanix-dev.devcluster.openshift.com
# For Development (nutanix-ci):
# prismcentral.lts2-cluster.in.nutanix-ci.devcluster.openshift.com
openssl s_client -showcerts -connect <prism_central_address>:9440 \
</dev/null 2>/dev/null \
| awk '/BEGIN CERTIFICATE/,/END CERTIFICATE/{ print }' \
> nutanix-ca.pem
```
### Set the environment variable
Export `SSL_CERT_FILE` so the installer and `oc` CLI trust the Prism Central certificate:
```bash
export SSL_CERT_FILE=$(realpath nutanix-ca.pem)
```
Keep this variable set for every subsequent step (install-config creation, manifest generation, cluster deployment, and teardown).
---
## Step 4: Create the install-config.yaml
Create an installation directory and write your `install-config.yaml`:
```bash
mkdir <installation_directory>
```
### Environment: Development-STS2 (nutanix-dev)
```yaml
additionalTrustBundlePolicy: Proxyonly
apiVersion: v1
baseDomain: nutanix-dev.devcluster.openshift.com
compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
platform: {}
replicas: 3
controlPlane:
architecture: amd64
hyperthreading: Enabled
name: master
platform: {}
replicas: 3
credentialsMode: Manual
metadata:
name: <user-id>
networking:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
machineNetwork:
- cidr: 10.0.0.0/16
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
platform:
nutanix:
apiVIPs:
- <API_VIP from Step 1>
dnsRecordsType: Internal
ingressVIPs:
- <INGRESS_VIP from Step 1>
prismCentral:
endpoint:
address: prismcentral.sts2-cluster.internal.nutanix-dev.devcluster.openshift.com
port: 9440
password: <password>
username: <user-id>
prismElements:
- endpoint:
address: 10.0.128.42
port: 9440
uuid: 000648ff-141a-e38a-c723-b195ffdac614
subnetUUIDs:
- 87999059-6106-4f88-85ee-7401ad5c39b2
publish: External
pullSecret: '<pull secret from https://console.redhat.com/openshift/downloads>'
sshKey: |
<your ssh public key>
```
### Fields to fill in
| Placeholder | Where to get it |
|---|---|
| `<user-id>` | Your username — used as both the cluster name in `metadata.name` and the Prism Central login in `platform.nutanix.prismCentral.username` |
| `<password>` | Your Prism Central password |
| `<API_VIP from Step 1>` | The API VIP address you selected and registered in Route 53 (e.g., `10.0.131.11`) |
| `<INGRESS_VIP from Step 1>` | The Ingress VIP address you selected and registered in Route 53 (e.g., `10.0.131.12`) |
| `<pull secret>` | Download from [Red Hat Console](https://console.redhat.com/openshift/downloads) |
| `<your ssh public key>` | Your SSH public key (e.g., contents of `~/.ssh/id_ed25519.pub` or `~/.ssh/id_rsa.pub`) |
Save the file:
```bash
cp install-config.yaml <installation_directory>/install-config.yaml
```
**Important:** The installer consumes (deletes) `install-config.yaml` during manifest generation. Always keep a backup copy outside the installation directory.
---
## Step 5: Configure IAM (Manual Credentials)
Nutanix uses manual credential mode. You must generate credential secrets using the `ccoctl` utility before deploying.
### 5a. Download the ccoctl binary
Download `ccoctl` from the [OpenShift mirror](https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.22.3/):
```bash
curl -L -o ccoctl-linux.tar.gz \
https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.22.3/ccoctl-linux.tar.gz
tar -xvf ccoctl-linux.tar.gz
chmod 775 ccoctl
```
### 5b. Generate installation manifests
```bash
./openshift-install create manifests --dir <installation_directory>
```
### 5c. Extract CredentialsRequest objects
```bash
oc adm release extract \
--from=$RELEASE_IMAGE \
--credentials-requests \
--included \
--install-config=<installation_directory>/install-config.yaml \
--to=<credentials_requests_directory>
```
### 5d. Create a credentials file
Create a YAML file (e.g., `credentials.yaml`) with your Prism Central and Prism Element credentials:
```yaml
credentials:
- type: basic_auth
data:
prismCentral:
username: <prism_central_username>
password: <prism_central_password>
prismElements:
- name: <prism_element_name>
username: <prism_element_username>
password: <prism_element_password>
```
### 5e. Generate the credential secrets
```bash
ccoctl nutanix create-shared-secrets \
--credentials-requests-dir=<credentials_requests_directory> \
--output-dir=<ccoctl_output_dir> \
--credentials-source-filepath=credentials.yaml
```
### 5f. Copy the generated manifests
```bash
cp <ccoctl_output_dir>/manifests/* <installation_directory>/manifests/
```
---
## Step 6: Deploy the Cluster
Ensure `SSL_CERT_FILE` is still set (from Step 3), then run:
```bash
./openshift-install create cluster --dir <installation_directory> \
--log-level=info
```
The installation takes approximately 45–60 minutes. The installer will:
1. Create a temporary bootstrap node
2. Deploy 3 control plane nodes
3. Deploy 3 compute nodes
4. Wait for the cluster to initialize
5. Destroy the bootstrap node
On success, the installer outputs the console URL and `kubeadmin` credentials:
```
INFO Install complete!
INFO To access the cluster as the system:admin user when using 'oc', run
'export KUBECONFIG=<installation_directory>/auth/kubeconfig'
INFO Access the OpenShift web-console here: https://console-openshift-console.apps.<cluster_name>.nutanix-dev.devcluster.openshift.com
INFO Login to the console with user: "kubeadmin", and password: "XXXXX-XXXXX-XXXXX-XXXXX"
```
**Important:** You can only run `create cluster` once for a given installation directory. To retry, you must destroy the cluster first and start fresh.
---
## Destroying the Cluster
When you are done, remove the cluster and all associated Nutanix resources:
```bash
./openshift-install destroy cluster --dir <installation_directory> \
--log-level=info
```
After destruction, clean up the DNS records you created in Step 1:
1. Go to the Route 53 hosted zone in the AWS Console.
2. Delete the `api`, `api-int`, and `*.apps` A records for your cluster.
The `metadata.json` file in the installation directory is required for destruction — do not delete it before running `destroy cluster`.
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
mermaid.initialize({ startOnLoad: false, theme: 'default' });
var md = document.getElementById('raw-markdown').textContent;
var renderer = new marked.Renderer();
var mermaidBlocks = [];
renderer.code = function(token) {
var code, lang;
if (typeof token === 'object' && token !== null) {
code = token.text;
lang = token.lang;
} else {
code = token;
lang = arguments[1];
}
if (lang === 'mermaid') {
var id = 'mermaid-' + mermaidBlocks.length;
mermaidBlocks.push({ id: id, code: code });
return '<div class="mermaid" id="' + id + '">' + code + '</div>';
}
var escaped = code
.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>');
var cls = lang ? ' class="language-' + lang + '"' : '';
return '<pre><code' + cls + '>' + escaped + '</code></pre>';
};
marked.setOptions({ renderer: renderer, gfm: true, breaks: false });
document.getElementById('content').innerHTML = marked.parse(md);
if (mermaidBlocks.length > 0) {
mermaid.run({ querySelector: '.mermaid' });
}
});
</script>
</body>
</html>