Search

Chapter 3. Deploying extension nodes

download PDF

The foundation deployment is deployed with two automation controller nodes and one automation hub node by default. You can add execution nodes to scale out Ansible Automation Platform from GCP Marketplace. Extension node offers can be mixed and matched together to scale up and out the Ansible Automation Platform deployment.

You must create a backup of the Ansible Automation Platform deployment before deploying new extension nodes.

The procedure contains the following steps:

  1. Decide the offer type for the extension nodes.
  2. Ensure the minimum permissions are met to manage extension nodes.
  3. Pull the ansible-on-clouds-ops container image.
  4. Generate data files by running the ansible-on-clouds-ops container.
  5. Populate the data file.
  6. Run the ansible-on-clouds-ops container to deploy extension nodes.

Prerequisite

  • A Linux or macOS system (where the ansible-on-clouds-ops container image will run).
  • Docker

3.1. Deciding the offer type

The following table lists the offer types and the corresponding GCP instance types. Depending on the workload needs, you can choose a more suitable offer type for the extension nodes.

Offer Type (nodes)GCP Instance Type

100

n2-standard-2

200

n2-standard-4

400

n2-standard-8

Extension node offers can be mixed and matched together to scale the Ansible Automation Platform deployment up.

3.2. IAM minimum permissions

Your GCP account must have the following Identity and Access Management (IAM) permissions to successfully create and manage extension nodes on Ansible Automation Platform.

Your GCP account must also be licensed to deploy extension node offers for Ansible Automation Platform from GCP Marketplace.

Minimum Permissions -

Cloud SQL Client
Cloud SQL Instance User
Editor
Logs Writer
Secret Manager Secret Accessor
IAP-secured Tunnel User

3.3. Pulling the ansible-on-clouds-ops container image

Pull the Docker image for the Ansible on Clouds operational container with the same tag as the version you are deploying to. If you are unsure of the version you have deployed, see Command Generator and playbook gcp_get_aoc_version for more information on finding the current version of Ansible on Clouds deployment.

Note

Before pulling the docker image, make sure you are logged in to registry.redhat.io using docker. Use the following command to login to registry.redhat.io.

$ docker login registry.redhat.io

For more information about registry login, read Registry Authentication

For example, if your foundation deployment version is 2.4.20240215-00, you must pull the operational image with tag 2.4.20240215 to deploy extension nodes to the foundation deployment.

Use the following commands:

$ export IMAGE=registry.redhat.io/ansible-on-clouds/ansible-on-clouds-ops-rhel9:2.4.20240215
$ docker pull $IMAGE --platform=linux/amd64
Note

If your foundation deployment version is not 2.4.20240215-00, refer to the tables on the Released versions page for a matching deployment version, in the Ansible on Clouds version column. Find the corresponding operational image to use, in the Ansible-on-clouds-ops container image column, for the IMAGE environment variable.

3.4. Generating data files by running the ansible-on-clouds-ops container

The following commands generate the required data file. These commands create a directory, and an empty data template that, when populated, is used during the deployment of the extension nodes.

Procedure

  1. Create a folder to hold the configuration files.

    $ mkdir command_generator_data
  2. Populate the command_generator_data folder with the configuration file template.

    $ docker run --rm -v $(pwd)/command_generator_data:/data $IMAGE \
    command_generator_vars gcp_add_extension_nodes \
    --output-data-file /data/extra_vars.yml
  3. These commands create a command_generator_data/extra_vars.yml template file. This template file resembles the following:

    gcp_add_extension_nodes:
      cloud_credentials_path:
      deployment_name:
      extra_vars:
        gcp_compute_region:
        gcp_extension_node_subscription:
        gcp_instance_group_name:
        gcp_instance_template_name:
        gcp_offer_type:

3.5. Populate the data file

You must populate the data file before triggering the operation. The variables listed in the data file are defined below.

  • cloud_credentials_path is the path for your Google Cloud service account credentials file. This must be an absolute path.
  • deployment_name is the name of the AAP deployment manager deployment for which you want to create an extension node.
  • gcp_instance_group_name is the name of the GCP instance group to create for the extension nodes.
  • gcp_instance_template_name is the name of the GCP instance template to create.
  • gcp_offer_type is the offer type of the extension node. This must be 100, 200 or 400.
  • gcp_compute_region is the GCP region where the foundation deployment is deployed. This can be retrieved by checking the Deployments configuration in Deployment Manager.
  • gcp_extension_node_subscription is the flag to confirm whether extension node subscription is purchased. Must be true or false.

3.6. Deploying the extension node

Procedure

  1. To deploy the extension nodes, run the command generator to generate the CLI command.

    $ docker run --rm -v $(pwd)/command_generator_data:/data $IMAGE command_generator --data-file /data/extra_vars.yml

    Provides the following command:

    -----------------------------------------------
    Command to run playbook:
    
    docker run --rm --env PLATFORM=GCP -v </path/to/gcp/service-account.json>:/home/runner/.gcp/credentials:ro /
    --env ANSIBLE_CONFIG=../gcp-ansible.cfg --env DEPLOYMENT_NAME=<deployment_name> /
    --env GENERATE_INVENTORY=true  $IMAGE redhat.ansible_on_clouds.gcp_add_extension_nodes /
    -e 'gcp_deployment_name=<deployment_name> gcp_service_account_credentials_json_path=/home/runner/.gcp/credentials  gcp_compute_region=<region> gcp_instance_template_name=<instance_template_name> /
    gcp_instance_group_name=<instance_group_name> gcp_offer_type=100 gcp_extension_node_subscription=True'
    ===============================================
  2. Run the supplied command to add the extension nodes.

    $ docker run --rm --env PLATFORM=GCP -v </path/to/gcp/service-account.json>:/home/runner/.gcp/credentials:ro /
    --env ANSIBLE_CONFIG=../gcp-ansible.cfg --env DEPLOYMENT_NAME=leena1 /
    --env GENERATE_INVENTORY=true  $IMAGE redhat.ansible_on_clouds.gcp_add_extension_nodes /
    -e 'gcp_deployment_name=<deployment_name> gcp_service_account_credentials_json_path=/home/runner/.gcp/credentials  gcp_compute_region=<region> gcp_instance_template_name=<instance_template_name> /
    gcp_instance_group_name=<instance_group_name> gcp_offer_type=100 gcp_extension_node_subscription=True'
  3. When the playbook has finished running, the output resembles the following:

    TASK [redhat.ansible_on_clouds.standalone_gcp_add_extension_nodes : [deploy_extension_nodes] Extension node created] ***
    ok: [localhost] => {
        "msg": "Extension node is created for deployment test-ext1."
    }
    
    PLAY RECAP *********************************************************************
    localhost                  : ok=39   changed=5    unreachable=0    failed=0    skipped=6    rescued=0    ignored=0
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.