Overview of the ONTAP day 0/1 solution
You can use the ONTAP day 0/1 automation solution to deploy and configure an ONTAP cluster using Ansible. The solution is available from the BlueXP automation catalog.
Flexible ONTAP deployment options
Depending on your requirements, you can use on-premises hardware or Simulate ONTAP to deploy and configure an ONTAP cluster using Ansible.
You can deploy this solution using on-premises hardware running ONTAP, such as a FAS or an AFF system. You must use a Linux VM to deploy and configure the ONTAP cluster using Ansible.
To deploy this solution using an ONTAP simulator, you must download the latest version of Simulate ONTAP from the NetApp support site. Simulate ONTAP is a virtual simulator for ONTAP software. Simulate ONTAP runs in a VMware hypervisor on a Windows, Linux, or Mac system. For Windows and Linux hosts, you must use the VMware Workstation hypervisor to run this solution. If you have a Mac OS, use the VMware Fusion hypervisor.
Layered design
The Ansible framework simplifies the development and reuse of automation execution and logic tasks. The framework makes a distinction between decision-making tasks (logic layer), and the execution steps (execution layer) in automation. Understanding how these layers work enables you to customize the configuration.
An Ansible "playbook" executes a series of tasks from start to finish. The site.yml
playbook contains the logic.yml
playbook and the execution.yml
playbook.
When a request is run, the site.yml
playbook makes a call to the logic.yml
playbook first, and then calls the execution.yml
playbook to execute the service request.
You are not required to use the logic layer of the framework. The logic layer provides options to expand the capability of the framework beyond the hard-coded values for execution. This enables you to customize the framework capabilities if required.
The logic layer consists of the following:
-
The
logic.yml
playbook -
Logic task files within the
logic-tasks
directory
The logic layer provides the capability for complex decision making without the need for significant custom integration (for example, connecting to ServiceNOW). The logic layer is configurable and provides the input to microservices.
The ability to bypass the logic layer is also provided. If you want to bypass the logic layer, do not define the logic_operation
variable. Direct invocation of the logic.yml
playbook provides the ability to do some level of debugging without execution. You can use a "debug" statement to verify that the value of the raw_service_request
is correct.
Important considerations:
-
The
logic.yml
playbook searches for thelogic_operation
variable. If the variable is defined in the request, it loads a task file from thelogic-tasks
directory. The task file must be a .yml file. If there is no matching task file and thelogic_operation
variable is defined, the logic layer fails. -
The default value of the
logic_operation
variable isno-op
. If the variable is not explicitly defined, it defaults tono-op
, which does not run any operations. -
If the
raw_service_request
variable is already defined, then execution proceeds to the execution layer. If the variable is not defined, the logic layer fails.
The execution layer consists of the following:
-
The
execution.yml
playbook
The execution layer makes the API calls to configure an ONTAP cluster. The execution.yml
playbook requires that the raw_service_request
variable is defined when executed.
Support for customization
You can customize this solution in various ways depending on your requirements.
Customization options include:
-
Modifying Ansible playbooks
-
Adding roles
The following table describes the customizable Ansible files contained in this solution.
Location | Description |
---|---|
|
Contains a single file with a list of hosts and groups. |
|
Ansible provides a convenient way to apply variables to multiple hosts at once. You can modify any or all files in this this folder including |
|
Supports decision-making tasks within Ansible and maintains the separation of logic and execution. You can add files to this folder that correspond to the relevant service. |
|
Dynamic values used within Ansible playbooks and roles to enable customization, flexibility, and reusability of configurations. If necessary, you can modify any or all files in this folder. |
You can also customize the solution by adding or changing Ansible roles, also called microservices. For more details, see Customize.