Skip to content

Commit 64f4a22

Browse files
committed
ASH UPI now supports internal CAs
1 parent 621bcb9 commit 64f4a22

File tree

4 files changed

+54
-10
lines changed

4 files changed

+54
-10
lines changed

installing/installing_azure_stack_hub/installing-azure-stack-hub-user-infra.adoc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ Several link:https://docs.microsoft.com/en-us/azure/azure-resource-manager/templ
1515
The steps for performing a user-provisioned infrastructure installation are provided as an example only. Installing a cluster with infrastructure you provide requires knowledge of the cloud provider and the installation process of {product-title}. Several ARM templates are provided to assist in completing these steps or to help model your own. You are also free to create the required resources through other methods; the templates are just an example.
1616
====
1717

18-
[IMPORTANT]
19-
====
20-
You can only install {product-title} on Azure Stack Hub with public endpoints, such as the ARM endpoint, that are secured with certificates signed by a publicly trusted certificate authority (CA). Support for internal CAs will be added in a future z-stream release of {product-title}. (link:https://bugzilla.redhat.com/show_bug.cgi?id=2012173[*BZ#2012173*])
21-
====
22-
2318
[id="prerequisites_installing-azure-stack-hub-user-infra"]
2419
== Prerequisites
2520

modules/installation-azure-stack-hub-config-yaml.adoc

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,18 @@ platform:
5050
pullSecret: '{"auths": ...}' <8>
5151
ifndef::openshift-origin[]
5252
fips: false <9>
53-
sshKey: ssh-ed25519 AAAA... <10>
53+
additionalTrustBundle: | <10>
54+
-----BEGIN CERTIFICATE-----
55+
<MY_TRUSTED_CA_CERT>
56+
-----END CERTIFICATE-----
57+
sshKey: ssh-ed25519 AAAA... <11>
5458
endif::openshift-origin[]
5559
ifdef::openshift-origin[]
56-
sshKey: ssh-ed25519 AAAA... <9>
60+
additionalTrustBundle: | <9>
61+
-----BEGIN CERTIFICATE-----
62+
<MY_TRUSTED_CA_CERT>
63+
-----END CERTIFICATE-----
64+
sshKey: ssh-ed25519 AAAA... <10>
5765
endif::openshift-origin[]
5866
----
5967
<1> The `controlPlane` section is a single mapping, but the compute section is a sequence of mappings. To meet the requirements of the different data structures, the first line of the `compute` section must begin with a hyphen, `-`, and the first line of the `controlPlane` section must not. Although both sections currently define a single machine pool, it is possible that future versions of {product-title} will support defining multiple compute pools during installation. Only one control plane pool is used.
@@ -71,10 +79,12 @@ ifndef::openshift-origin[]
7179
====
7280
The use of FIPS Validated / Modules in Process cryptographic libraries is only supported on {product-title} deployments on the `x86_64` architecture.
7381
====
74-
<10> You can optionally provide the `sshKey` value that you use to access the machines in your cluster.
82+
<10> If your Azure Stack Hub environment uses an internal certificate authority (CA), add the necessary certificate bundle in `.pem` format.
83+
<11> You can optionally provide the `sshKey` value that you use to access the machines in your cluster.
7584
endif::openshift-origin[]
7685
ifdef::openshift-origin[]
77-
<9> You can optionally provide the `sshKey` value that you use to access the machines in your cluster.
86+
<9> If your Azure Stack Hub environment uses an internal certificate authority (CA), add the necessary certificate bundle in `.pem` format.
87+
<10> You can optionally provide the `sshKey` value that you use to access the machines in your cluster.
7888
endif::openshift-origin[]
7989
+
8090
[NOTE]

modules/installation-creating-azure-bootstrap.adoc

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ support with your installation logs.
4141
this topic and save it as `04_bootstrap.json` in your cluster's installation directory. This template
4242
describes the bootstrap machine that your cluster requires.
4343

44-
. Export the bootstrap ignition variable:
44+
. Export the bootstrap URL variable:
4545
+
4646
[source,terminal]
4747
----
@@ -52,12 +52,36 @@ $ bootstrap_url_expiry=`date -u -d "10 hours" '+%Y-%m-%dT%H:%MZ'`
5252
----
5353
$ export BOOTSTRAP_URL=`az storage blob generate-sas -c 'files' -n 'bootstrap.ign' --https-only --full-uri --permissions r --expiry $bootstrap_url_expiry --account-name ${CLUSTER_NAME}sa --account-key ${ACCOUNT_KEY} -o tsv`
5454
----
55+
56+
. Export the bootstrap ignition variable:
57+
ifdef::azure[]
58+
+
59+
[source,terminal]
60+
----
61+
$ export BOOTSTRAP_IGNITION=`jq -rcnM --arg v "3.2.0" --arg url ${BOOTSTRAP_URL} '{ignition:{version:$v,config:{replace:{source:$url}}}}' | base64 | tr -d '\n'`
62+
----
63+
endif::azure[]
64+
ifdef::ash[]
65+
.. If your environment uses a public certificate authority (CA), run this command:
5566
+
5667
[source,terminal]
5768
----
5869
$ export BOOTSTRAP_IGNITION=`jq -rcnM --arg v "3.2.0" --arg url ${BOOTSTRAP_URL} '{ignition:{version:$v,config:{replace:{source:$url}}}}' | base64 | tr -d '\n'`
5970
----
6071

72+
.. If your environment uses an internal CA, you must add your PEM encoded bundle to the bootstrap ignition stub so that your bootstrap virtual machine can pull the bootstrap ignition from the storage account. Run the following commands, which assume your CA is in a file called `CA.pem`:
73+
+
74+
[source,terminal]
75+
----
76+
$ export CA="data:text/plain;charset=utf-8;base64,$(cat CA.pem |base64 |tr -d '\n')"
77+
----
78+
+
79+
[source,terminal]
80+
----
81+
$ export BOOTSTRAP_IGNITION=`jq -rcnM --arg v "3.2.0" --arg url "$BOOTSTRAP_URL" --arg cert "$CA" '{ignition:{version:$v,security:{tls:{certificateAuthorities:[{source:$cert}]}},config:{replace:{source:$url}}}}' | base64 | tr -d '\n'`
82+
----
83+
endif::ash[]
84+
6185
. Create the deployment by using the `az` CLI:
6286
+
6387
ifdef::azure[]

modules/installation-user-infra-generate-k8s-manifest-ignition.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,21 @@ status:
311311

312312
endif::user-infra-vpc[]
313313

314+
ifdef::ash[]
315+
. Optional: If your Azure Stack Hub environment uses an internal certificate authority (CA), you must update the `.spec.trustedCA.name` field in the `<installation_directory>/manifests/cluster-proxy-01-config.yaml` file to use `user-ca-bundle`:
316+
+
317+
[source,yaml]
318+
----
319+
...
320+
spec:
321+
trustedCA:
322+
name: user-ca-bundle
323+
...
324+
----
325+
+
326+
Later, you must update your bootstrap ignition to include the CA.
327+
endif::ash[]
328+
314329
ifdef::azure-user-infra[]
315330
. When configuring Azure on user-provisioned infrastructure, you must export
316331
some common variables defined in the manifest files to use later in the Azure

0 commit comments

Comments
 (0)