Skip to content

Commit 2c389f3

Browse files
authored
Merge pull request #41308 from codyhoag/ash-upi-internal-ca
OSDOCS-3219 ASH UPI now supports internal CAs
2 parents 7e9104b + 64f4a22 commit 2c389f3

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
@@ -42,7 +42,7 @@ support with your installation logs.
4242
this topic and save it as `04_bootstrap.json` in your cluster's installation directory. This template
4343
describes the bootstrap machine that your cluster requires.
4444

45-
. Export the bootstrap ignition variable:
45+
. Export the bootstrap URL variable:
4646
+
4747
[source,terminal]
4848
----
@@ -53,12 +53,36 @@ $ bootstrap_url_expiry=`date -u -d "10 hours" '+%Y-%m-%dT%H:%MZ'`
5353
----
5454
$ 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`
5555
----
56+
57+
. Export the bootstrap ignition variable:
58+
ifdef::azure[]
59+
+
60+
[source,terminal]
61+
----
62+
$ 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'`
63+
----
64+
endif::azure[]
65+
ifdef::ash[]
66+
.. If your environment uses a public certificate authority (CA), run this command:
5667
+
5768
[source,terminal]
5869
----
5970
$ 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'`
6071
----
6172

73+
.. 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`:
74+
+
75+
[source,terminal]
76+
----
77+
$ export CA="data:text/plain;charset=utf-8;base64,$(cat CA.pem |base64 |tr -d '\n')"
78+
----
79+
+
80+
[source,terminal]
81+
----
82+
$ 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'`
83+
----
84+
endif::ash[]
85+
6286
. Create the deployment by using the `az` CLI:
6387
+
6488
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
@@ -314,6 +314,21 @@ status:
314314

315315
endif::user-infra-vpc[]
316316

317+
ifdef::ash[]
318+
. 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`:
319+
+
320+
[source,yaml]
321+
----
322+
...
323+
spec:
324+
trustedCA:
325+
name: user-ca-bundle
326+
...
327+
----
328+
+
329+
Later, you must update your bootstrap ignition to include the CA.
330+
endif::ash[]
331+
317332
ifdef::azure-user-infra[]
318333
. When configuring Azure on user-provisioned infrastructure, you must export
319334
some common variables defined in the manifest files to use later in the Azure

0 commit comments

Comments
 (0)