Configure proxies for data plane nodes
The edpm_bootstrap_command Ansible variable configures system proxy settings by passing shell commands that run during the bootstrap service deployment. If custom services run before bootstrap, the edpm-bootstrap-command commands run after those services.
Procedure
- Open the
OpenStackDataPlaneNodeSetCR definition file for the node set you want to update, for example,openstack_data_plane.yaml. - Locate the
ansibleVarssection of the definition file. - Use the
edpm_bootstrap_commandvariable to append proxy values to the/etc/environmentfile on the node. The following is an example of using the variable for this purpose:apiVersion: dataplane.openstack.org/v1beta1 kind: OpenStackDataPlaneNodeSet metadata: name: openstack-data-plane namespace: openstack spec: ... ansibleVars: edpm_bootstrap_command: | set -e cat >>/etc/environment <<EOF http_proxy=<http_proxy> https_proxy=<https_proxy> no_proxy=<no_proxy>where:
- set -e
-
The
set -eflag forces theedpm_bootstrap_commandsequence to exit immediately if any command fails. This prevents the system from treating a partial or corrupted configuration as a success. - http_proxy
- The proxy that you want to use for standard HTTP requests.
- https_proxy
- The proxy that you want to use for HTTPs requests.
- no_proxy
- A comma-separated list of domains that you want to exclude from proxy communications.
- Save the
OpenStackDataPlaneNodeSetCR definition file. - Apply the updated
OpenStackDataPlaneNodeSetCR configuration:$ oc apply -f openstack_data_plane.yaml - Verify that the data plane resource has been updated by confirming that the status is
SetupReady:$ oc wait openstackdataplanenodeset openstack-data-plane --for condition=SetupReady --timeout=10mWhen the status is
SetupReadythe command returns acondition metmessage, otherwise it returns a timeout error.For information about the data plane conditions and states, see Data plane conditions and states in Deploying Red Hat OpenStack Services on OpenShift.
- If there are any failed
OpenStackDataPlaneDeploymentCRs in your environment, remove them to allow a newOpenStackDataPlaneDeploymentto run Ansible with an updated Secret. - Create a file on your workstation to define the new
OpenStackDataPlaneDeploymentCR:apiVersion: dataplane.openstack.org/v1beta1 kind: OpenStackDataPlaneDeployment metadata: name: <node_set_deployment_name>- Replace
<node_set_deployment_name>with the name of theOpenStackDataPlaneDeploymentCR. The name must be unique, must consist of lower case alphanumeric characters,-(hyphen) or.(period), and must start and end with an alphanumeric character.
Tip Give the definition file and theOpenStackDataPlaneDeploymentCR unique and descriptive names that indicate the purpose of the modified node set. - Replace
- Add the
OpenStackDataPlaneNodeSetCR that you modified:spec: nodeSets: - <nodeSet_name> - Save the
OpenStackDataPlaneDeploymentCR deployment file. - Deploy the modified
OpenStackDataPlaneNodeSetCR:$ oc create -f openstack_data_plane_deploy.yaml -n openstackYou can view the Ansible logs while the deployment executes:
$ oc get pod -l app=openstackansibleee -w $ oc logs -l app=openstackansibleee -f --max-log-requests 10If the
oc logscommand returns an error similar to the following error, increase the--max-log-requestsvalue:error: you are attempting to follow 19 log streams, but maximum allowed concurrency is 10, use --max-log-requests to increase the limit - Verify that the modified
OpenStackDataPlaneNodeSetCR is deployed:$ oc get openstackdataplanedeployment -n openstack NAME STATUS MESSAGE openstack-data-plane True Setup Complete $ oc get openstackdataplanenodeset -n openstack NAME STATUS MESSAGE openstack-data-plane True NodeSet ReadyFor information about the meaning of the returned status, see Data plane conditions and states in the Deploying Red Hat OpenStack Services on OpenShift guide.
If the status indicates that the data plane has not been deployed, then troubleshoot the deployment. For information, see Troubleshoot data plane creation and deployment.
- If you added a new node to the node set, then map the node to the Compute cell it is connected to:
$ oc rsh nova-cell0-conductor-0 nova-manage cell_v2 discover_hosts --verboseIf you did not create additional cells, this command maps the Compute nodes to
cell1.Access the remote shell for the
openstackclientpod and verify that the deployed Compute nodes are visible on the control plane:$ oc rsh -n openstack openstackclient $ openstack hypervisor list