Getting Started with NetApp solution automation
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
-
Requirements for the Ansible control node,:
-
A RHEL/CentOS machine with the following packages installed:
-
Python3
-
Pip3
-
Ansible (version greater than 2.10.0)
-
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:
-
Enable the Ansible repository for RHEL-8/RHEL-7
-
For RHEL-8 (run the below command as root)
subscription-manager repos --enable ansible-2.9-for-rhel-8-x86_64-rpms
-
For RHEL-7 (run the below command as root)
subscription-manager repos --enable rhel-7-server-ansible-2.9-rpms
-
-
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
-
Requirements for the Ansible control node,:
-
A Ubuntu/Debian machine with the following packages installed:
-
Python3
-
Pip3
-
Ansible (version greater than 2.10.0)
-
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:
-
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.
-
Configure the inventory.
-
Navigate to Resources → Inventories → Add and click Add Inventory.
-
Provide name and organization details and click Save.
-
In the Inventories page, click the inventory resources you just created.
-
If there are any inventory variables, paste them into the variables field.
-
Go to the Groups sub-menu and click Add.
-
Provide the name of the group, copy in the group variables (if necessary), and click Save.
-
Click the group created, go to the Hosts sub-menu and click Add New Host.
-
Provide the hostname and IP address of the host, paste in the host variables (if necessary), and click Save.
-
-
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.
-
Navigate to Administration → Credential Types and click Add.
-
Provide the name and description.
-
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
-
Paste the following content into the Injector Configuration:
extra_vars: password: '{{ password }}' username: '{{ username }}' vsadmin_password: '{{ vsadmin_password }}'
-
Configure credentials.
-
Navigate to Resources → Credentials and click Add.
-
Enter the name and organization details.
-
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.
-
Enter the other corresponding details and click Save.
-
-
Configure the project.
-
Navigate to Resources → Projects and click Add.
-
Enter the name and organization details.
-
Select Git for the Source Control Credential Type.
-
Paste the source control URL (or git clone URL) corresponding to the specific solution.
-
Optionally, if the Git URL is access controlled, create and attach the corresponding credential in Source Control Credential.
-
Click Save.
-
-
Configure the job template.
-
Navigate to Resources → Templates → Add and click Add Job Template.
-
Enter the name and description.
-
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.
-
Select the corresponding inventory, project, and credentials for the playbook.
-
Select the playbook that you would like to run as a part of the job template.
-
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.
-
Provide any other details as required and click Save.
-
-
Launch the job template.
-
Navigate to Resources → Templates.
-
Click the desired template and then click Launch.
-
Fill in any variables if prompted on launch and then click Launch again.
-
For more information, please visit Getting started with NetApp solution automation and Ansible
To request automation, please fill out the automation request form.