|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * networking/rosa-hcp-shared-vpc-config.adoc |
| 4 | +:_mod-docs-content-type: PROCEDURE |
| 5 | +[id="rosa-hcp-sharing-vpc-dns-and-roles_{context}"] |
| 6 | += Step Two - Cluster Creator: Reserving your DNS entries and creating cluster Operator roles |
| 7 | + |
| 8 | +After the *VPC Owner* creates a virtual private cloud (VPC), subnets, and an IAM role for sharing the VPC resources, reserve an `openshiftapps.com` DNS domain and create Operator roles to communicate back to the *VPC Owner*. |
| 9 | + |
| 10 | +[NOTE] |
| 11 | +==== |
| 12 | +For shared VPC clusters, you can choose to create the Operator roles after the cluster creation steps. The cluster will be in a `waiting` state until the Ingress Operator role ARN is added to the shared VPC role trusted relationships. |
| 13 | +==== |
| 14 | + |
| 15 | +image::522-shared-vpc-step-2.png[] |
| 16 | +.Prerequisites |
| 17 | + |
| 18 | +* You have the `Route 53 role` ARN for the IAM role from the *VPC Owner*. |
| 19 | +* You have the `VPC endpoint role` ARN for the IAM role from the *VPC Owner*. |
| 20 | +
|
| 21 | +.Procedure |
| 22 | + |
| 23 | +. Reserve an `openshiftapps.com` DNS domain with the following command: |
| 24 | ++ |
| 25 | +[source,terminal] |
| 26 | +---- |
| 27 | +$ rosa create dns-domain --hosted-cp |
| 28 | +---- |
| 29 | ++ |
| 30 | +The command creates a reserved `openshiftapps.com` DNS domain. |
| 31 | ++ |
| 32 | +[source,terminal] |
| 33 | +---- |
| 34 | +I: DNS domain '14eo.p3.openshiftapps.com' has been created. |
| 35 | +I: To view all DNS domains, run 'rosa list dns-domains' |
| 36 | +---- |
| 37 | +. Create an OIDC configuration. |
| 38 | ++ |
| 39 | +Review this article for more information on the link:https://access.redhat.com/articles/7031018[OIDC configuration process]. The following command produces the OIDC configuration ID that you need: |
| 40 | ++ |
| 41 | +[source,terminal] |
| 42 | +---- |
| 43 | +$ rosa create oidc-config |
| 44 | +---- |
| 45 | ++ |
| 46 | +You receive confirmation that the command created an OIDC configuration: |
| 47 | ++ |
| 48 | +[source,terminal] |
| 49 | +---- |
| 50 | +I: To create Operator Roles for this OIDC Configuration, run the following command and remember to replace <user-defined> with a prefix of your choice: |
| 51 | + rosa create operator-roles --prefix <user-defined> --oidc-config-id 25tu67hq45rto1am3slpf5lq6jargg |
| 52 | +---- |
| 53 | + |
| 54 | +. Create the account roles by entering the following command: |
| 55 | ++ |
| 56 | +[source,terminal] |
| 57 | +---- |
| 58 | +$ rosa create account-roles |
| 59 | + --route53-role-arn <Created_Route_53_Role_Arn> <1> |
| 60 | + --vpc-endpoint-role-arn <Created_VPC_Endpoint_Role_Arn> <2> |
| 61 | + --prefix <user_defined_account_role_prefix> <3> |
| 62 | + --hosted-cp |
| 63 | +---- |
| 64 | ++ |
| 65 | +-- |
| 66 | +<1> Provide the ARN for the Route 53 role that the *VPC Owner* created. |
| 67 | +<2> Provide the ARN for the VPC endpoint role that the *VPC Owner* created. |
| 68 | +<3> Provide a prefix for the Operator roles. |
| 69 | +-- |
| 70 | + |
| 71 | +. Create the Operator roles by entering the following command: |
| 72 | ++ |
| 73 | +[source,terminal] |
| 74 | +---- |
| 75 | +$ rosa create operator-roles --oidc-config-id <oidc-config-ID> <1> |
| 76 | + --installer-role-arn <Installer_Role> <2> |
| 77 | + --route53-role-arn <Created_Route_53_Role_Arn> <3> |
| 78 | + --vpc-endpoint-role-arn <Created_VPC_Endpoint_Role_Arn> <4> |
| 79 | + --prefix <operator-prefix> <5> |
| 80 | + --hosted-cp |
| 81 | +---- |
| 82 | ++ |
| 83 | +-- |
| 84 | +<1> Provide the OIDC configuration ID that you created in the previous step. |
| 85 | +<2> Provide your installer ARN that was created as part of the `rosa create account-roles` process. |
| 86 | +<3> Provide the ARN for the Route 53 role that the *VPC Owner* created. |
| 87 | +<4> Provide the ARN for the VPC endpoint role that the *VPC Owner* created. |
| 88 | +<5> Provide a prefix for the Operator roles. |
| 89 | +-- |
| 90 | ++ |
| 91 | +[NOTE] |
| 92 | +==== |
| 93 | +The Installer account role and the shared VPC roles must have a one-to-one relationship. If you want to create multiple shared VPC roles, you should create one set of account roles per shared VPC role. |
| 94 | +==== |
| 95 | + |
| 96 | +. After you create the Operator roles, share your _Ingress Operator Cloud Credentials_ role's ARN, your _Installer_ role's ARN, and your _Control plane Operator Cloud Credentials_ role's ARN with the *VPC Owner* to continue configuration. |
| 97 | ++ |
| 98 | +The shared information resembles these examples: |
| 99 | ++ |
| 100 | +* ``my-rosa-cluster.14eo.p1.openshiftapps.com`` |
| 101 | +* ``arn:aws:iam::111122223333:role/ManagedOpenShift-Installer-Role`` |
| 102 | +* ``arn:aws:iam::111122223333:role/my-rosa-cluster-openshift-ingress-operator-cloud-credentials`` |
| 103 | +* ``arn:aws:iam::111122223333:role/my-rosa-cluster-control-plane-operator`` |
0 commit comments