-
Notifications
You must be signed in to change notification settings - Fork 111
[WIP] Split up _topics/automation_management_providers #1854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
agrare
wants to merge
2
commits into
ManageIQ:master
Choose a base branch
from
agrare:split_up_automation_providers
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
672 changes: 7 additions & 665 deletions
672
managing_providers/_topics/automation_management_providers.md
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
264 changes: 264 additions & 0 deletions
264
managing_providers/automation_management_providers/ansible_tower.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,264 @@ | ||
--- | ||
--- | ||
|
||
# Ansible Tower | ||
|
||
**Ansible Tower** is a management tool that is integrated with {{ site.data.product.title_short }}, designed to help automate infrastructure operations utlizizing existing Ansible Tower providers in your inventory. {{ site.data.product.title_short }} allows you to execute Ansible Tower jobs by using service catalogs and Automate. Using Ansible Tower, you can schedule Ansible playbook runs and monitor current and historical results, allowing for troubleshooting or identification of issues before they occur. | ||
|
||
Ansible Tower is a management tool integrated with {{ site.data.product.title_short }}, designed to help automate infrastructure operations. {{ site.data.product.title_short }} allows you to execute Ansible Tower jobs or workflows using service catalogs and Automate. No custom configuration or Ruby scripting is needed in {{ site.data.product.title_short }}, as configuration is done in Ansible Tower using playbooks. | ||
|
||
You can use the large library of existing Ansible playbooks as {{ site.data.product.title_short }} state machines to automate tasks such as deployments, backups, package updates, and maintenance in your {{ site.data.product.title_short }} environment. This can be particularly useful for quickly applying changes across large environments with many virtual machines or instances. | ||
|
||
Using Ansible Tower, you can schedule Ansible playbook runs and monitor current and historical results, allowing for troubleshooting or identification of issues before they occur. | ||
|
||
{{ site.data.product.title_short }} supports Ansible Tower API v2 provider integration. | ||
|
||
#### Working with an Ansible Tower Provider | ||
|
||
The basic workflow when using {{ site.data.product.title_short }} with an Ansible Tower provider is as follows: | ||
|
||
1. Create an Ansible playbook which performs a specific task. | ||
|
||
2. A new Ansible Tower job template is created from the playbook (or workflow template created from disparate jobs), which is then retrieved by {{ site.data.product.title_short }}. | ||
|
||
3. From the Ansible Tower job or workflow template, create a new catalog item in {{ site.data.product.title_short }}, optionally with a service dialog that allows the user to enter parameters if needed. | ||
|
||
4. The user orders the service from the {{ site.data.product.title_short }} user interface, and fills out any additional arguments (for example, limiting the task to run on a specific set of virtual machines). | ||
|
||
5. The job or workflow executes. | ||
|
||
**Notes:** | ||
|
||
- For more information about Ansible playbooks, see the [Ansible playbook documentation](https://docs.ansible.com/ansible/latest/user_guide/playbooks.html). | ||
|
||
- For more information about worklows, see [Workflows](https://docs.ansible.com/ansible-tower/latest/html/userguide/workflows.html) in the Ansible Tower *User Guide*. | ||
|
||
#### Adding an Ansible Tower Provider | ||
|
||
To access your Ansible Tower inventory from {{ site.data.product.title_short }}, you must add Ansible Tower as a provider. | ||
|
||
**Notes:** | ||
|
||
- Ensure **ENABLE HTTP BASIC AUTH** is set to **On** in the Ansible Tower configuration settings before adding the provider. See [Tower Configuration](https://docs.ansible.com/ansible-tower/latest/html/administration/configure_tower_in_tower.html) in the Ansible Tower *Administration Guide*. | ||
|
||
- A trailing slash is **not** required at the end of the Ansible Tower provider URL. Adding the trailing slash to the provider URL may result in a validation error. | ||
|
||
1. Browse to menu: **Automation > Ansible Tower > Explorer** and click on the **Providers** accordion tab. | ||
|
||
2. Under **Configuration**, click  **Add a new Provider**. | ||
|
||
3. In the **Add a new Provider** area: | ||
|
||
 | ||
|
||
1. Enter a **Name** for the new provider. | ||
|
||
2. Add a **Zone** for the provider. | ||
|
||
3. Enter the **URL** location or IP address to the Ansible Tower server. Add a trailing slash to the end of the Ansible Tower provider URL. | ||
|
||
4. Select the **Verify Peer Certificate** checkbox if desired. | ||
|
||
5. In the **Credentials** area, provide the **Username** and **Password**, and **Confirm Password**. | ||
|
||
6. Click **Validate** to verify credentials. | ||
|
||
7. Click **Add**. | ||
|
||
After adding the Ansible Tower provider, refresh its relationships and power states in order to view the current inventory. | ||
|
||
#### Refreshing an Ansible Tower Provider | ||
|
||
Refresh relationships of all items related to an existing Ansible Tower configuration management provider including inventory, hosts, virtual machines, and clusters. | ||
|
||
You can refresh inventory from {{ site.data.product.title_short }}, or by enabling the **Update on Launch** option for inventory groups in Ansible Tower. The **Update on Launch** option allows Ansible Tower to automatically update inventory using a dynamic inventory script before launching an Ansible Tower job from a playbook. For more information, see the [Ansible Tower documentation](http://docs.ansible.com/ansible-tower/index.html). | ||
|
||
**Important:** It can take a long time to retrieve information from providers containing many virtual machines or instances. The Ansible Tower dynamic inventory script can be modified to limit updates to specific items and reduce refresh time. | ||
|
||
To refresh an Ansible Tower provider’s inventory in {{ site.data.product.title_short }}: | ||
|
||
1. Browse to menu: **Automation > Ansible Tower > Explorer** and click the **Providers** accordion tab. | ||
|
||
2. Select the checkboxes for the Ansible Tower providers to refresh under **All Ansible Tower Providers**. | ||
|
||
3. Click **Configuration**, and then  (**Refresh Relationships and Power States**). | ||
|
||
4. Click **OK**. | ||
|
||
{{ site.data.product.title_short }} then queries the Ansible Tower API and obtains an inventory of all available hosts, job, and workflow templates. | ||
|
||
#### Viewing Ansible Tower Providers and Inventory | ||
|
||
{{ site.data.product.title_short }} automatically updates its inventory from Ansible Tower. This includes system groups (known as Inventories in Ansible Tower), basic information about individual systems, and available Ansible Tower job or workflow templates to be executed from the service catalog or Automate. | ||
|
||
**Note:** To view and access Ansible Tower inventories and job or workflow templates in {{ site.data.product.title_short }}, you must first create them in Ansible Tower. | ||
|
||
To view a list of Ansible Tower providers and inventory: | ||
|
||
1. Browse to menu: **Automation > Ansible Tower > Explorer**. | ||
|
||
2. select the **Providers** accordion menu to display a list of **All Ansible Tower Providers**. | ||
|
||
3. Select your Ansible Tower provider to expand and list the inventory groups on that Ansible Tower system. The inventory groups can be expanded to view the systems contained within each group, as well as configuration details for these systems. | ||
|
||
Similarly, all discovered job and workflow templates are accessed under the provider by expanding the menu: **Automation > Ansible Tower > Explorer** and click the **Templates** accordion menu. | ||
|
||
#### Viewing Ansible Tower Configured Systems | ||
|
||
To view the systems in your Ansible Tower inventory: | ||
|
||
1. Browse to menu: **Automation > Ansible Tower > Explorer** and click **Configured Systems**. | ||
|
||
2. Under **All Ansible Tower Configured Systems**, select **Ansible Tower Configured Systems** to display a list. | ||
|
||
#### Executing an Ansible Tower Job or Workflow Template from a Service Catalog | ||
|
||
You can execute an Ansible Tower playbook from {{ site.data.product.title_short }} by creating a service catalog item from an Ansible Tower job or workflow template. | ||
|
||
**Important:** You must first create the job or workflow template in Ansible Tower. The job or workflow templates are automatically discovered by {{ site.data.product.title_short }} when refreshing your Ansible Tower provider’s inventory. | ||
|
||
First, create a catalog: | ||
|
||
1. Browse to menu: **Services > Catalogs** and click **Catalogs**. | ||
|
||
2. Click **Configuration**, then  (**Add a New Catalog**) | ||
|
||
3. Enter a **Name** and **Description** for the catalog. | ||
|
||
4. Click **Add**. | ||
|
||
Then, create an Ansible Tower service catalog item: | ||
|
||
1. Browse to menu: **Automation > Ansible Tower > Explorer**, then click the **Templates** according menu. | ||
|
||
2. Click **Ansible Tower Templates** and select an Ansible Tower job or workflow template. | ||
|
||
3. Click **Configuration**, then  (**Create Service Dialog from this Template**). | ||
|
||
4. Enter a **Service Dialog Name** (for example, *ansible\_tower\_job*)and click **Save**. | ||
|
||
5. Browse to menu: **Services > Catalogs** and click **Catalog Items**. | ||
|
||
6. Click **Configuration**, then  (**Add a New Catalog Item**) to create a new catalog item with the following details, at minimum: | ||
|
||
- For **Catalog Item type**, select **Ansible Tower**. | ||
|
||
- Enter a **Name** for the service catalog item. | ||
|
||
- Select **Display in Catalog**. | ||
|
||
- In **Catalog**, select the catalog you created previously. | ||
|
||
- In **Dialog**, select the service dialog you created previously (in this example, *ansible\_tower\_job*). To ask the user to enter extra information when running the task, **Service Dialog** must be selected. A dialog is required if **Display in Catalog** is chosen. | ||
|
||
- In **Provider**, select your Ansible Tower provider. This brings up the **Ansible Tower Template** option and configures the **Provisioning Entry Point State Machine** automatically. | ||
|
||
- Add configuration information for **Reconfigure Entry Point** and **Retirement Entry Point** as applicable. | ||
|
||
- Select your desired **Ansible Tower Template** from the list. Generally, this is the Ansible Tower job or workflow template previously used to create the service dialog. | ||
|
||
7. Click **Add**. The catalog item you created will appear in the **All Service Catalog Items** list. | ||
|
||
To execute the Ansible Tower job: | ||
|
||
1. Browse to menu: **Service > Catalogs** and click on **Service Catalogs** then click **Ansible Tower catalog**. | ||
|
||
 | ||
|
||
2. Click **Order** for the catalog item. | ||
|
||
3. Enter any variables requested and click **Submit**. | ||
|
||
{{ site.data.product.title_short }} takes you to the **Requests** queue page and show the status of the job. | ||
|
||
The service item’s details can be viewed in menu: **Services > My Services** in {{ site.data.product.title_short }}. | ||
|
||
**Note:** Instead of running a single job at a time, multiple service catalog items can also be grouped together as a catalog bundle to create one deployment with multiple job templates. For more information, see [Catalogs and Services](../provisioning_virtual_machines_and_hosts/index.html#catalogs-and-services). | ||
|
||
#### Executing an Ansible Tower Job Using a Custom Automate Button | ||
|
||
{{ site.data.product.title_short }} can execute Ansible Tower jobs on virtual machines or instances using custom buttons in Automate. | ||
|
||
Ansible Tower jobs can either be noncustomizable, which do not require any extra configuration from the user, or alternatively, they can allow the user to specify a parameter (for example, a package name to install). In Ansible Tower jobs containing a dialog, {{ site.data.product.title_short }} accepts additional information from the user and adds it to the appropriate API call in Automate, and then sends it into Ansible Tower. | ||
|
||
**Prerequisites.** | ||
|
||
Before creating an Automate button to execute an Ansible Tower job, the following must be configured: | ||
|
||
- An Ansible playbook in Ansible Tower. See the [Ansible Tower documentation](https://docs.ansible.com/) for instructions. | ||
|
||
- Ansible Tower must be able to reach virtual machines or instances deployed by {{ site.data.product.title_short }} at the IP level. | ||
|
||
- The virtual machine template must have the Ansible Tower environment’s public SSH key injected. For cloud instances, `cloud-init` can be used and the public SSH key can be passed without rebuilding the image. | ||
|
||
- Any dynamic inventory scripts used must be configured to return the virtual machine names exactly as they are stored in {{ site.data.product.title_short }}, without the UUID appended. | ||
|
||
**Executing an Ansible Tower Job using a Custom Automate Button.** | ||
|
||
To configure a custom button to execute an Ansible Tower job on a virtual machine or instance, first create the button: | ||
|
||
1. Browse to menu: **Automation > Automate > Customization**. | ||
|
||
2. Click the **Buttons** accordion menu. | ||
|
||
3. Click menu: **VM and Instance > Unassigned Buttons**. This configures the button to run on virtual machines or instances. | ||
|
||
4. Click **Configuration**, then click  (**Add a new Button**). | ||
|
||
1. In the **Adding a new Button** screen, configure the **Action** parameters as desired. **Dialog** can be left blank if the playbook does not require extra variables. To ask the user to enter extra information when running the task, **Service Dialog** must be selected. | ||
|
||
2. Configure **Object Details** fields with the following request details: | ||
|
||
- For **System/Process**, select **Request**. | ||
|
||
- For **Message**, enter **create**. | ||
|
||
- For **Request**, enter **Ansible\_Tower\_Job**. | ||
|
||
3. Configure **Attribute/Value Pairs** with the following parameters: | ||
|
||
- **job\_template\_name** is the Ansible Tower job template name to associate with the button. The **job\_template\_name** field is mandatory; other parameters are provided by the Tower job dialog. | ||
|
||
- Configure **Visibility** to all users, or limit visibility by role as desired. | ||
|
||
 | ||
|
||
4. Click **Add**. | ||
|
||
If you do not have an existing button group to assign the new button to, create a new button group: | ||
|
||
1. From menu: **Automation > Automate > Customization**, browse to menu: **Buttons** and click **VM and Instance > Add a new Button Group**, and configure the following: | ||
|
||
1. Configure **Basic Info** as desired. For example, name the button group `VM Actions`. | ||
|
||
2. In **Assign Buttons**, select the button you just created from the **Unassigned** list and click  to assign it to **Selected**. | ||
|
||
 | ||
|
||
3. Click **Add**. | ||
|
||
To assign the button to an existing button group: | ||
|
||
1. Browse to menu: **Buttons > VM and Instance > VM Actions > Edit this Button Group**. | ||
|
||
2. In **Assign Buttons**, select the button you just created from the **Unassigned** list and click  to assign it to **Selected**. | ||
|
||
3. Click **Add**. | ||
|
||
To use the button to run an Ansible Tower job on a virtual machine: | ||
|
||
1. Browse to menu: **Compute > Infrastructure > Virtual Machines**. | ||
|
||
2. Select the virtual machine to run the Ansible Tower job template on. | ||
|
||
3. Click the **VM Actions** button to show the button you created, and click the button from the list to run the Ansible Tower job template. | ||
|
||
 | ||
|
||
4. Click **Submit** to execute the job. | ||
|
||
{{ site.data.product.title_short }} then confirms the job has been executed. | ||
|
||
If you selected a service dialog to run when creating the button, {{ site.data.product.title_short }} will then prompt you to enter variables to complete the task. After entering your desired parameters, {{ site.data.product.title_short }} takes you to the **Requests** page. | ||
|
||
The service item’s details can be viewed in menu: **Services > My Services** in {{ site.data.product.title_short }}. |
6 changes: 6 additions & 0 deletions
6
managing_providers/automation_management_providers/automate.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
--- | ||
|
||
# Automate | ||
|
||
**Automate** enables real-time, bidirectional process integration. This embedded automate feature provides you with a method to implement adaptive automation for management events and administrative or operational activities. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be Ansible Automation Platform now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also do we have AWX? Or perhaps this should be Ansible Automation Platform / AWX?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't have to be for this PR - the existing stuff is all Ansible Tower anyway, and this is a clean reorg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we can definitely do that, I was avoiding moving&changing in the same PR but that makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed - let's make it a different PR