Skip to content

Commit 476792c

Browse files
Merge pull request #1664 from slagle/edpm_playbook_environment
Document edpm_playbook_environment for proxy configuration
2 parents cd26788 + 80c221d commit 476792c

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

docs/assemblies/common_configurations.adoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,27 @@ https://access.redhat.com/documentation/en-us/red_hat_satellite/6.13/html-single
5252
If not using Satellite version 6.13, then refer to the specific version of the
5353
documentation for the version of Satellite that is in use.
5454

55+
=== Using `edpm_bootstrap_command` for configuring system proxy settings
56+
57+
`edpm_bootstrap_command` can be used to configure system proxy settings by
58+
creating a file under `/etc/profile.d` that defines the proxy environment
59+
variables.
60+
61+
----
62+
edpm_bootstrap_command: |
63+
cat >/etc/profile.d/proxy.sh <<EOF
64+
export http_proxy="http://USERNAME:[email protected]:3128/"
65+
export https_proxy="http://USERNAME:[email protected]:3128/"
66+
export no_proxy="localhost,127.0.0.1,::1" # Add any hosts to bypass the proxy
67+
EOF
68+
----
69+
70+
Note that these variable values won't always apply to tasks executed by
71+
ansible. To ensure ansible tasks always use a proxy, create the
72+
`edpm_playbook_environment` secret and reference it on the
73+
`OpenStackDataPlaneNodeSet` as shown in
74+
xref:proc_creating-a-set-of-data-plane-nodes.adoc.
75+
5576
=== Customizing container image locations
5677

5778
The container images used by the various roles from edpm-ansible can pull from

docs/assemblies/proc_creating-a-set-of-data-plane-nodes.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,17 @@ $ oc create secret generic redhat-registry \
170170
* Replace `<registry_username>` with the applicable user name.
171171
* Replace `<registry_password>` with the applicable password.
172172

173+
. Optional: Configure environment variables for all playbooks, such as proxy settings:
174+
+
175+
The `edpm_playbook_environment` variable sets environment variables that are applied to all tasks within all playbooks. This is useful for configuring proxy settings or other environment variables needed across the data plane deployment.
176+
+
177+
----
178+
$ oc create secret generic edpm-playbook-environment \
179+
--from-literal edpm_playbook_environment='{"HTTP_PROXY": "http://proxy.example.com:8080", "HTTPS_PROXY": "http://proxy.example.com:8080", "NO_PROXY": "localhost,127.0.0.1", "http_proxy": "http://proxy.example.com:8080", "https_proxy": "http://proxy.example.com:8080", "no_proxy": "localhost,127.0.0.1"}'
180+
----
181+
+
182+
* Replace the proxy values with your actual proxy server addresses.
183+
173184
+
174185
----
175186
apiVersion: dataplane.openstack.org/v1beta1
@@ -188,11 +199,14 @@ spec:
188199
name: subscription-manager
189200
- secretRef:
190201
name: redhat-registry
202+
- secretRef:
203+
name: edpm-playbook-environment
191204
----
192205

193206
+
194207
For a complete list of the Red Hat Customer Portal registration commands, see https://access.redhat.com/solutions/253273. For information about how to log into `registry.redhat.io`, see https://access.redhat.com/RegistryAuthentication#creating-registry-service-accounts-6.
195208
endif::[]
209+
196210
. If your nodes are bare metal, you must configure the bare metal template, see xref:con_provisioning-bare-metal-data-plane-nodes_{context}[Provisioning bare metal data plane nodes].
197211

198212
. Optional: The sample `OpenStackDataPlaneNodeSet` CR you copied includes default node configurations under the `nodes` section. You can add additional nodes, and edit the configured values as required. For example, to add node-specific Ansible variables that customize the node, add the following configuration to your `openstack-edpm.yaml` file:

0 commit comments

Comments
 (0)