|
| 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 | +==== |
0 commit comments