Skip to main content
NetApp Solutions

Getting Started with NetApp solution automation

Contributors kevin-hoke

NetApp solution automation provides simplicity and repeatability for many of the common tasks utilized by the NetApp Solutions.

Prior to running any solution automation, the environment must be configured for how the automation will be executed. There are options to run the automation from the command line or through a tool such as AWX or tower.

The following sections will outline the steps required to configure the environment for each of the specified environments.

Setup the Ansible Control Node for CLI deployments on RHEL / CentOS
  1. Requirements for the Ansible control node,:

    1. A RHEL/CentOS machine with the following packages installed:

      1. Python3

      2. Pip3

      3. Ansible (version greater than 2.10.0)

      4. Git

If you have a fresh RHEL/CentOS machine without the above requirements installed, follow the below steps to setup that machine as the Ansible control node:

  1. Enable the Ansible repository for RHEL-8/RHEL-7

    1. For RHEL-8 (run the below command as root)

      subscription-manager repos --enable ansible-2.9-for-rhel-8-x86_64-rpms
    2. For RHEL-7 (run the below command as root)

      subscription-manager repos --enable rhel-7-server-ansible-2.9-rpms
  2. Paste the below content in the Terminal

    sudo yum -y install python3 >> install.log
    sudo yum -y install python3-pip >> install.log
    python3 -W ignore -m pip --disable-pip-version-check install ansible >> install.log
    sudo yum -y install git >> install.log
Setup the Ansible Control Node for CLI deployments on Ubuntu / Debian
  1. Requirements for the Ansible control node,:

    1. A Ubuntu/Debian machine with the following packages installed:

      1. Python3

      2. Pip3

      3. Ansible (version greater than 2.10.0)

      4. Git

If you have a fresh Ubuntu/Debian machine without the above requirements installed, follow the below steps to setup that machine as the Ansible control node:

  1. Paste the below content in the terminal

    sudo apt-get -y install python3 >> outputlog.txt
    sudo apt-get -y install python3-pip >> outputlog.txt
    python3 -W ignore -m pip --disable-pip-version-check install ansible >> outputlog.txt
    sudo apt-get -y install git >> outputlog.txt
Setup Ansible Tower or AWX for Tower / AWX deployments

This section describes the steps required to configure the parameters in AWX/Ansible Tower that prepare the environment for consuming NetApp automated solutions.

  1. Configure the inventory.

    1. Navigate to Resources → Inventories → Add and click Add Inventory.

    2. Provide name and organization details and click Save.

    3. In the Inventories page, click the inventory resources you just created.

    4. If there are any inventory variables, paste them into the variables field.

    5. Go to the Groups sub-menu and click Add.

    6. Provide the name of the group, copy in the group variables (if necessary), and click Save.

    7. Click the group created, go to the Hosts sub-menu and click Add New Host.

    8. Provide the hostname and IP address of the host, paste in the host variables (if necessary), and click Save.

  2. Create credential types. For solutions involving ONTAP, Element, VMware, or any other HTTPS-based transport connection, you must configure the credential type to match the username and password entries.

    1. Navigate to Administration → Credential Types and click Add.

    2. Provide the name and description.

    3. Paste the following content into the Input Configuration:

fields:
- id: username
type: string
label: Username
- id: password
type: string
label: Password
secret: true
- id: vsadmin_password
type: string
label: vsadmin_password
secret: true
  1. Paste the following content into the Injector Configuration:

extra_vars:
password: '{{ password }}'
username: '{{ username }}'
vsadmin_password: '{{ vsadmin_password }}'
  1. Configure credentials.

    1. Navigate to Resources → Credentials and click Add.

    2. Enter the name and organization details.

    3. Select the correct credential type; if you intend to use the standard SSH login, select the type Machine or alternatively select the custom credential type that you created.

    4. Enter the other corresponding details and click Save.

  2. Configure the project.

    1. Navigate to Resources → Projects and click Add.

    2. Enter the name and organization details.

    3. Select Git for the Source Control Credential Type.

    4. Paste the source control URL (or git clone URL) corresponding to the specific solution.

    5. Optionally, if the Git URL is access controlled, create and attach the corresponding credential in Source Control Credential.

    6. Click Save.

  3. Configure the job template.

    1. Navigate to Resources → Templates → Add and click Add Job Template.

    2. Enter the name and description.

    3. Select the Job type; Run configures the system based on a playbook and Check performs a dry run of the playbook without actually configuring the system.

    4. Select the corresponding inventory, project, and credentials for the playbook.

    5. Select the playbook that you would like to run as a part of the job template.

    6. Usually the variables are pasted during runtime. Therefore, to get the prompt to populate the variables during runtime, make sure to tick the checkbox Prompt on Launch corresponding to the Variable field.

    7. Provide any other details as required and click Save.

  4. Launch the job template.

    1. Navigate to Resources → Templates.

    2. Click the desired template and then click Launch.

    3. Fill in any variables if prompted on launch and then click Launch again.

To request automation, please fill out the automation request form.