So you want to create a demo? What do you do? These demos are considered "demos as code" so every demo must adhere to our standards and be highly re-usable.
- Must work with Ansible Tower / Ansible Automation Platform. There has to be a UX component to the demo.
- Must be ephemeral and require no service that cannot be reproduced in an automated fashion. This means a demo that requires the user to create a personalized token with an external service (e.g. ServiceNow, Slack) is not appropriate here because it would require manual steps for a user to recreate your demo.
- Must align with Red Hat use-cases. A demo that programs your lawn mower is not something we would actually demonstrate. You can easily create a fork of this repo and make your own fun project.
You need three major components to get a demo accepted
In the principle of "everything as code", these are "demos as code". Each demo has its own individual var file. All var files are installed under:
/roles/install_demo/vars/main
There are four categories of demos:
- infrastructure - automation for IT infrastructure such as Linux and Windows.
- network - automation for network infrastructure such as routers and switches.
- security - automation for SIEMs, firewalls, and IPS such as IBM Qradar, Splunk and Checkpoint.
- developer - automation for developer persona, such as CI/CD pipelines, web hooks, developer environments and automated testing
Look at a very specific example here: deploy_application.yml
Location: roles/install_demo/vars/main/infrastructure/deploy_application.yml
Link: https://github.com/ansible/product-demos/blob/master/roles/install_demo/vars/main/infrastructure/deploy_application.yml
In the demo var file above you will notice a playbook
line. For example in the deploy_application.yml
example:
playbook: "playbooks/infrastructure/deploy_application.yml"
There is also a project section of the demo var file
project:
name: "Ansible official demo project"
description: "prescriptive demos from Red Hat Management Business Unit"
organization: "Default"
scm_type: git
scm_url: "https://github.com/ansible/product-demos"
The Ansible Playbook does NOT have to exist in this repo. In fact it is encouraged to fork this repo and test it out by pointing to your own repo. It is also recommended to create Ansible Playbooks that work on the Ansible Automation Workshop topologies. This makes them extremely re-usable.
Each demo should have a walkthrough. In the demo var file there is a line with the key readme
. For example for the deploy_application.yml
:
readme: "https://github.com/ansible/product-demos/blob/master/docs/infrastructure/deploy_application.md"
Here is an example walkthrough for the deploy_application.yml
demo: https://github.com/ansible/product-demos/blob/master/docs/infrastructure/deploy_application.md
There is no way in the Ansible Tower API to access the workflow schema at this time (March 2020). Please refer to the docs and use the awx-cli/tower-cli command to export existing Workflow schema: https://github.com/ansible/tower-cli/blob/master/docs/source/cli_ref/usage/WORKFLOWS.rst.
The Workflow schema can be automated by using the tower_workflow_template module to load Ansible Tower with an entire Workflow.
The awx.awx collection has some new enhancements to allow installation of Ansible workflows Please coordinate with Ansible API team if you need help.
The following links will be helpful if you want to contribute code to the Ansible Workshops project, or any Ansible project: