Skip to content

Commit eb99c1a

Browse files
authored
Merge pull request #93726 from maxwelldb/hypershiftstack-osdocs14600
[OSDOCS-14600] HCP for Openstack
2 parents 281812d + 63f3035 commit eb99c1a

20 files changed

+989
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2492,6 +2492,8 @@ Topics:
24922492
File: hcp-deploy-ibmz
24932493
- Name: Deploying hosted control planes on IBM Power
24942494
File: hcp-deploy-ibm-power
2495+
- Name: Deploying hosted control planes on OpenStack
2496+
File: hcp-deploy-openstack
24952497
- Name: Managing hosted control planes
24962498
Dir: hcp-manage
24972499
Topics:
@@ -2505,6 +2507,8 @@ Topics:
25052507
File: hcp-manage-non-bm
25062508
- Name: Managing hosted control planes on IBM Power
25072509
File: hcp-manage-ibm-power
2510+
- Name: Managing hosted control planes on OpenStack
2511+
File: hcp-manage-openstack
25082512
- Name: Deploying hosted control planes in a disconnected environment
25092513
Dir: hcp-disconnected
25102514
Topics:
@@ -2562,6 +2566,8 @@ Topics:
25622566
File: hcp-destroy-ibmz
25632567
- Name: Destroying a hosted cluster on IBM Power
25642568
File: hcp-destroy-ibm-power
2569+
- Name: Destroying a hosted cluster on OpenStack
2570+
File: hcp-destroy-openstack
25652571
- Name: Destroying a hosted cluster on non-bare-metal agent machines
25662572
File: hcp-destroy-non-bm
25672573
- Name: Manually importing a hosted cluster
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="hcp-deploy-openstack"]
3+
include::_attributes/common-attributes.adoc[]
4+
= Deploying {hcp} on OpenStack
5+
:context: hcp-deploy-openstack
6+
7+
toc::[]
8+
9+
:FeatureName: Deploying {hcp} clusters on {rh-openstack-first}
10+
include::snippets/technology-preview.adoc[]
11+
12+
You can deploy {hcp} with hosted clusters that run on {rh-openstack-first} 17.1.
13+
14+
A _hosted cluster_ is an {product-title} cluster with its API endpoint and control plane that are hosted on a management cluster. With {hcp}, control planes exist as pods on a management cluster without the need for dedicated virtual or physical machines for each control plane.
15+
16+
include::modules/hosted-clusters-openstack-prerequisites.adoc[leveloffset=+1]
17+
18+
include::modules/hosted-clusters-openstack-prepare-etcd.adoc[leveloffset=+1]
19+
20+
include::modules/hosted-clusters-openstack-create-floating-ip.adoc[leveloffset=+1]
21+
22+
include::modules/hosted-clusters-openstack-upload-rhcos.adoc[leveloffset=+1]
23+
24+
include::modules/hcp-deploy-openstack-create.adoc[leveloffset=+1]
25+
26+
include::modules/hcp-deploy-openstack-parameters.adoc[leveloffset=+2]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="hcp-destroy-openstack"]
3+
include::_attributes/common-attributes.adoc[]
4+
= Destroying a hosted control plane on OpenStack
5+
:context: hcp-destroy-openstack
6+
7+
toc::[]
8+
9+
include::modules/hosted-clusters-openstack-destroy.adoc[leveloffset=+1]
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="hcp-manage-openstack"]
3+
include::_attributes/common-attributes.adoc[]
4+
= Managing {hcp} on OpenStack
5+
:context: hcp-manage-openstack
6+
7+
toc::[]
8+
9+
After you deploy {hcp} on {rh-openstack-first} agent machines, you can manage a hosted cluster by completing the
10+
following tasks.
11+
12+
include::modules/hcp-openstack-accessing.adoc[leveloffset=+1]
13+
14+
include::modules/hcp-openstack-autoscale.adoc[leveloffset=+1]
15+
16+
include::modules/hcp-manage-openstack-az.adoc[leveloffset=+1]
17+
18+
[id="hosted-clusters-openstack-additional-ports"]
19+
== Configuring additional ports for node pools
20+
21+
You can configure additional ports for node pools to support advanced networking scenarios, such as SR-IOV or multiple networks.
22+
23+
include::modules/hosted-clusters-openstack-addl-ports-cases.adoc[leveloffset=+2]
24+
25+
include::modules/hosted-clusters-openstack-addl-ports-options.adoc[leveloffset=+2]
26+
27+
include::modules/hosted-clusters-openstack-addl-ports-creating.adoc[leveloffset=+2]
28+
29+
[id="hosted-clusters-openstack-performance"]
30+
== Configuring additional ports for node pools
31+
32+
You can tune hosted cluster node performance on {rh-openstack} for high-performance workloads, such as cloud-native network functions (CNFs). Performance tuning includes configuring {rh-openstack} resources, creating a performance profile, deploying a tuned `NodePool` resource, and enabling SR-IOV device support.
33+
34+
CNFs are designed to run in cloud-native environments. They can provide network services such as routing, firewalling, and load balancing. You can configure the node pool to use high-performance computing and networking devices to run CNFs.
35+
36+
include::modules/hosted-clusters-openstack-performance-tuning.adoc[leveloffset=+2]
37+
38+
include::modules/hosted-clusters-openstack-performance-enabling.adoc[leveloffset=+2]
39+
40+
[role="_additional-resources"]
41+
.Additional resources
42+
43+
* xref:../../networking/networking_operators/sr-iov-operator/installing-sriov-operator.adoc#installing-sr-iov-operator_installing-sriov-operator[Installing the SR-IOV Network Operator]
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
[id="hcp-deploy-openstack-create_{context}"]
3+
= Creating a hosted cluster on OpenStack
4+
5+
You can create a hosted cluster on {rh-openstack-first} by using the `hcp` CLI.
6+
7+
.Prerequisites
8+
9+
* You completed all prerequisite steps in "Preparing to deploy hosted control planes".
10+
* You reviewed "Prerequisites for OpenStack".
11+
* You completed all steps in "Preparing the management cluster for etcd local storage".
12+
* You have access to the management cluster.
13+
* You have access to the {rh-openstack} cloud.
14+
15+
.Procedure
16+
17+
* Create a hosted cluster by running the `hcp create` command. For example, for a cluster that takes advantage of the performant etcd configuration detailed in "Preparing the management cluster for etcd local storage", enter:
18+
+
19+
[source,terminal]
20+
----
21+
$ hcp create cluster openstack \
22+
--name my-hcp-cluster \
23+
--openstack-node-flavor m1.xlarge \
24+
--base-domain example.com \
25+
--pull-secret /path/to/pull-secret.json \
26+
--release-image quay.io/openshift-release-dev/ocp-release:4.19.0-x86_64 \
27+
--node-pool-replicas 3 \
28+
--etcd-storage-class lvms-etcd-class
29+
----
30+
31+
NOTE: Many options are available at cluster creation. For {rh-openstack}-specific options, see "Options for creating a Hosted Control Planes cluster on OpenStack". For general options, see the `hcp` documentation.
32+
33+
.Verification
34+
. Verify that the hosted cluster is ready by running the following command on it:
35+
+
36+
[source,terminal]
37+
----
38+
$ oc -n clusters-<cluster_name> get pods
39+
----
40+
+
41+
--
42+
where:
43+
44+
`<cluster_name>`:: Specifies the name of the cluster.
45+
--
46+
+
47+
After several minutes, the output should show that the hosted control plane pods are running.
48+
+
49+
.Example output
50+
[source,terminal]
51+
----
52+
NAME READY STATUS RESTARTS AGE
53+
capi-provider-5cc7b74f47-n5gkr 1/1 Running 0 3m
54+
catalog-operator-5f799567b7-fd6jw 2/2 Running 0 69s
55+
certified-operators-catalog-784b9899f9-mrp6p 1/1 Running 0 66s
56+
cluster-api-6bbc867966-l4dwl 1/1 Running 0 66s
57+
...
58+
...
59+
...
60+
redhat-operators-catalog-9d5fd4d44-z8qqk 1/1 Running 0
61+
----
62+
63+
. To validate the etcd configuration of the cluster:
64+
65+
.. Validate the etcd persistent volume claim (PVC) by running the following command:
66+
+
67+
[source,terminal]
68+
----
69+
$ oc get pvc -A
70+
----
71+
72+
.. Inside the {hcp} etcd pod, confirm the mount path and device by running the following command:
73+
+
74+
[source,terminal]
75+
----
76+
$ df -h /var/lib
77+
----
78+
79+
[NOTE]
80+
====
81+
The {rh-openstack} resources that the cluster API (CAPI) provider creates are tagged with the label `openshiftClusterID=<infraID>`.
82+
83+
You can define additional tags for the resources as values in the `HostedCluster.Spec.Platform.OpenStack.Tags` field of a YAML manifest that you use to create the hosted cluster. The tags are applied when you scale up the node pool.
84+
====
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted-control-planes/hcp-deploy/hcp-deploy-openstack.adoc
4+
5+
:_mod-docs-content-type: REFERENCE
6+
[id="hcp-deploy-openstack-parameters_{context}"]
7+
= Options for creating a Hosted Control Planes cluster on OpenStack
8+
9+
You can supply several options to the `hcp` CLI while deploying a Hosted Control Planes Cluster on {rh-openstack-first}.
10+
11+
|===
12+
|Option|Description|Required
13+
14+
|`--openstack-ca-cert-file`
15+
|Path to the OpenStack CA certificate file. If not provided, this will be automatically extracted from the cloud entry in `clouds.yaml`.
16+
|No
17+
18+
|`--openstack-cloud`
19+
|Name of the cloud entry in `clouds.yaml`. The default value is `openstack`.
20+
|No
21+
22+
|`--openstack-credentials-file`
23+
a|Path to the OpenStack credentials file. If not provided, `hcp` will search the following directories:
24+
25+
* The current working directory
26+
* `$HOME/.config/openstack`
27+
* `/etc/openstack`
28+
29+
|No
30+
31+
|`--openstack-dns-nameservers`
32+
|List of DNS server addresses that are provided when creating the subnet.
33+
|No
34+
35+
|`--openstack-external-network-id`
36+
|ID of the OpenStack external network.
37+
|No
38+
39+
|`--openstack-ingress-floating-ip`
40+
|A floating IP for OpenShift ingress.
41+
|No
42+
43+
|`--openstack-node-additional-port`
44+
|Additional ports to attach to nodes. Valid values are: `network-id`, `vnic-type`, `disable-port-security`, and `address-pairs`.
45+
|No
46+
47+
|`--openstack-node-availability-zone`
48+
|Availability zone for the node pool.
49+
|No
50+
51+
|`--openstack-node-flavor`
52+
|Flavor for the node pool.
53+
|Yes
54+
55+
|`--openstack-node-image-name`
56+
|Image name for the node pool.
57+
|No
58+
|===

modules/hcp-manage-openstack-az.adoc

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-manage/hcp-manage-openstack.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-manage-openstack-az_{context}"]
7+
= Configuring node pools for availability zones
8+
9+
You can distribute node pools across multiple {rh-openstack-first} Nova availability zones to improve the high availability of your hosted cluster.
10+
11+
NOTE: Availability zones do not necessarily correspond to fault domains and do not inherently provide high availability benefits.
12+
13+
.Prerequisites
14+
15+
* You created a hosted cluster.
16+
* You have access to the management cluster.
17+
* The `hcp` and `oc` CLIs are installed.
18+
19+
.Procedure
20+
21+
. Set environment variables that are appropriate for your needs. For example, if you want to create two additional machines in the `az1` availability zone, you could enter:
22+
+
23+
[source,terminal]
24+
----
25+
$ export NODEPOOL_NAME="${CLUSTER_NAME}-az1" \
26+
&& export WORKER_COUNT="2" \
27+
&& export FLAVOR="m1.xlarge" \
28+
&& export AZ="az1"
29+
----
30+
31+
. Create the node pool by using your environment variables by entering the following command:
32+
+
33+
[source,terminal]
34+
----
35+
$ hcp create nodepool openstack \
36+
--cluster-name <cluster_name> \
37+
--name $NODEPOOL_NAME \
38+
--replicas $WORKER_COUNT \
39+
--openstack-node-flavor $FLAVOR \
40+
--openstack-node-availability-zone $AZ
41+
----
42+
+
43+
--
44+
where:
45+
46+
`<cluster_name>`:: Specifies the name of your hosted cluster.
47+
--
48+
49+
. Check the status of the node pool by listing `nodepool` resources in the clusters namespace by running the following command:
50+
+
51+
[source,terminal]
52+
----
53+
$ oc get nodepools --namespace clusters
54+
----
55+
+
56+
.Example output
57+
[source,terminal]
58+
----
59+
NAME CLUSTER DESIRED NODES CURRENT NODES AUTOSCALING AUTOREPAIR VERSION UPDATINGVERSION UPDATINGCONFIG MESSAGE
60+
example example 5 5 False False 4.17.0
61+
example-az1 example 2 False False True True Minimum availability requires 2 replicas, current 0 available
62+
----
63+
64+
. Observe the notes as they start on your hosted cluster by running the following command:
65+
+
66+
[source,terminal]
67+
----
68+
$ oc --kubeconfig $CLUSTER_NAME-kubeconfig get nodes
69+
----
70+
+
71+
.Example output
72+
[source,terminal]
73+
----
74+
NAME STATUS ROLES AGE VERSION
75+
...
76+
example-extra-az-zh9l5 Ready worker 2m6s v1.27.4+18eadca
77+
example-extra-az-zr8mj Ready worker 102s v1.27.4+18eadca
78+
...
79+
----
80+
81+
. Verify that the node pool is created by running the following command:
82+
+
83+
[source,terminal]
84+
----
85+
$ oc get nodepools --namespace clusters
86+
----
87+
+
88+
.Example output
89+
[source,terminal]
90+
----
91+
NAME CLUSTER DESIRED CURRENT AVAILABLE PROGRESSING MESSAGE
92+
<node_pool_name> <cluster_name> 2 2 2 False All replicas are available
93+
----

modules/hcp-openstack-accessing.adoc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-manage/hcp-manage-openstack.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-openstack-accessing_{context}"]
7+
= Accessing the hosted cluster
8+
9+
You can access hosted clusters on {rh-openstack-first} by extracting the kubeconfig secret directly from resources by using the `oc` CLI.
10+
11+
The _hosted cluster (hosting)_ namespace contains hosted cluster resources and the access secrets. The _hosted control plane_ namespace is where the hosted control plane runs.
12+
13+
The secret name formats are as follows:
14+
15+
** `kubeconfig` secret: `<hosted_cluster_namespace>-<name>-admin-kubeconfig`. For example, `clusters-hypershift-demo-admin-kubeconfig`.
16+
** `kubeadmin` password secret: `<hosted_cluster_namespace>-<name>-kubeadmin-password`. For example, `clusters-hypershift-demo-kubeadmin-password`.
17+
18+
The `kubeconfig` secret contains a Base64-encoded `kubeconfig` field. The `kubeadmin` password secret is also Base64-encoded; you can extract it and then use the password to log in to the API server or console of the hosted cluster.
19+
20+
.Prerequisites
21+
22+
* The `oc` CLI is installed.
23+
24+
.Procedure
25+
26+
. Extract the `admin-kubeconfig` secret by entering the following command:
27+
+
28+
[source,terminal]
29+
----
30+
$ oc extract -n <hosted_cluster_namespace> \
31+
secret/<hosted_cluster_name>-admin-kubeconfig \
32+
--to=./hostedcluster-secrets --confirm
33+
----
34+
+
35+
.Example output
36+
----
37+
hostedcluster-secrets/kubeconfig
38+
----
39+
40+
. View a list of nodes of the hosted cluster to verify your access by entering the following command:
41+
+
42+
[source,terminal]
43+
----
44+
$ oc --kubeconfig ./hostedcluster-secrets/kubeconfig get nodes
45+
----

0 commit comments

Comments
 (0)