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

  1. Open the OpenStackDataPlaneNodeSet CR definition file for the node set you want to update, for example, openstack_data_plane.yaml.
  2. Locate the ansibleVars section of the definition file.
  3. Use the edpm_bootstrap_command variable to append proxy values to the /etc/environment file 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 -e flag forces the edpm_bootstrap_command sequence 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.
  4. Save the OpenStackDataPlaneNodeSet CR definition file.
  5. Apply the updated OpenStackDataPlaneNodeSet CR configuration:
    $ oc apply -f openstack_data_plane.yaml
  6. 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=10m

    When the status is SetupReady the command returns a condition met message, 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.

  7. If there are any failed OpenStackDataPlaneDeployment CRs in your environment, remove them to allow a new OpenStackDataPlaneDeployment to run Ansible with an updated Secret.
  8. Create a file on your workstation to define the new OpenStackDataPlaneDeployment CR:
    apiVersion: dataplane.openstack.org/v1beta1
    kind: OpenStackDataPlaneDeployment
    metadata:
      name: <node_set_deployment_name>
    • Replace <node_set_deployment_name> with the name of the OpenStackDataPlaneDeployment CR. 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 the OpenStackDataPlaneDeployment CR unique and descriptive names that indicate the purpose of the modified node set.
  9. Add the OpenStackDataPlaneNodeSet CR that you modified:
    spec:
      nodeSets:
        - <nodeSet_name>
  10. Save the OpenStackDataPlaneDeployment CR deployment file.
  11. Deploy the modified OpenStackDataPlaneNodeSet CR:
    $ oc create -f openstack_data_plane_deploy.yaml -n openstack

    You 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 10

    If the oc logs command returns an error similar to the following error, increase the --max-log-requests value:

    error: you are attempting to follow 19 log streams, but maximum allowed concurrency is 10, use --max-log-requests to increase the limit
  12. Verify that the modified OpenStackDataPlaneNodeSet CR 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 Ready

    For 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.

  13. 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 --verbose

    If you did not create additional cells, this command maps the Compute nodes to cell1.

    Access the remote shell for the openstackclient pod and verify that the deployed Compute nodes are visible on the control plane:

    $ oc rsh -n openstack openstackclient
    $ openstack hypervisor list