Skip to main content
NetApp Automation

Prepare to use the ONTAP day 0/1 solution

Contributors netapp-aoife dmp-netapp

Before you deploy the automation solution, you must prepare the ONTAP environment and install and configure Ansible.

Initial planning considerations

You should review the following requirements and considerations before using this solution to deploy an ONTAP cluster.

Basic requirements

You must meet the following basic requirements to use this solution:

  • You must have access to ONTAP software, either on-premises or through an ONTAP simulator.

  • You must know how to use ONTAP software.

  • You must know how to use Ansible automation software tools.

Planning considerations

Before deploying this automation solution, you must decide:

  • The location where you are going to run the Ansible control node.

  • The ONTAP system, either on-premises hardware or an ONTAP simulator.

  • Whether or not you will require customization.

Prepare the ONTAP system

Whether you are using an on-premises ONTAP system or Simulate ONTAP, you must prepare the environment before you can deploy the automation solution.

Optionally, install and configure Simulate ONTAP

If you want to deploy this solution through an ONTAP simulator, you must download and run Simulate ONTAP.

Before you begin
  • You must download and install the VMware hypervisor that you are going to use to run Simulate ONTAP.

    • If you have a Windows or Linux OS, use VMware Workstation.

    • If you have a Mac OS, use VMware Fusion.

      Note If you are using a Mac OS, you must have an Intel processor.
Steps

Use the following procedure to install two ONTAP simulators in your local environment:

  1. Download Simulate ONTAP from the NetApp support site.

    Note Although you install two ONTAP simulators, you only need to download one copy of the software.
  2. If it is not already running, start your VMware application.

  3. Locate the simulator file that was downloaded and right click to open it with the VMware application.

  4. Set the name of the first ONTAP instance.

  5. Wait for the simulator boot up and follow the directions to create a single node cluster.

    Repeat the steps for the second ONTAP instance.

  6. Optionally, add a full disk complement.

    From each cluster, run the following commands:

    security unlock -username <user_01>
    security login password -username <user_01>
    set -priv advanced
    systemshell local
    disk assign -all -node <Cluster-01>-01

State of the ONTAP system

You must verify the initial state of the ONTAP system, whether it is on-premises or running through an ONTAP simulator.

Verify that the following ONTAP system requirements are met:

  • ONTAP is installed and running with no cluster defined yet.

  • ONTAP is booted and displaying the IP address to access the cluster.

  • The network is reachable.

  • You have admin credentials.

  • The Message of the Day (MOTD) banner is displayed with the management address.

Install the required automation software

This section provides information on how to install Ansible and prepare the automation solution for deployment.

Install Ansible

Ansible can be installed on Linux or Windows systems.

The default communication method that Ansible uses to communicate with an ONTAP cluster is SSH.

Note Ansible must be installed on the control node of the system.

Download and prepare the automation solution

You can use the following steps to download and prepare the automation solution for deployment.

  1. Download the ONTAP - Day 0/1 & Health Checks automation solution through the BlueXP web UI. The solution is packaged as ONTAP_DAY0_DAY1.zip.

  2. Extract the zip folder and copy the files to the desired location on the control node within your Ansible environment.

Initial Ansible framework configuration

Perform the initial configuration of the Ansible framework:

  1. Navigate to playbooks/inventory/group_vars/all.

  2. Decrypt the vault.yml file:

    ansible-vault decrypt playbooks/inventory/group_vars/all/vault.yml

    When prompted for the vault password, enter the following temporary password:

    NetApp123!

    Important "NetApp123!" is a temporary password to decrypt the vault.yml file and the corresponding vault password. After first use, you must encrypt the file using your own password.
  3. Modify the following Ansible files:

    • clusters.yml - Modify the values in this file to suit your environment.

    • vault.yml - After decrypting the file, modify the ONTAP cluster, username and password values to suit your environment.

    • cfg.yml - Set the file path for log2file and set show_request under cfg to True to display the raw_service_request.

      The raw_service_request variable is displayed in the log files and during execution.

      Note Each file listed contains comments with instructions on how to modify it according to your requirements.
  4. Re-encrypt the vault.yml file:

    ansible-vault encrypt playbooks/inventory/group_vars/all/vault.yml

    Note You are prompted to choose a new password for the vault upon encryption.
  5. Navigate to playbooks/inventory/hosts and set a valid Python interpreter.

  6. Deploy the framework_test service:

    The following command runs the na_ontap_info module with a gather_subset value of cluster_identity_info. This validates that the basic configuration is correct and verifies that you can communicate with the cluster.

    ansible-playbook -i inventory/hosts site.yml -e cluster_name=<CLUSTER_NAME>
    -e logic_operation=framework-test

    Run the command for each cluster.

    If successful, you should see output similar to the following example:

    PLAY RECAP *********************************************************************************
    localhost : ok=12 changed=1 unreachable=0 failed=0 skipped=6
    The key is ‘rescued=0’ and ‘failed=0’..