Skip to content

Commit

Permalink
Merge pull request #808 from IPvSean/gh-pages
Browse files Browse the repository at this point in the history
various documentation fixes, including release PR process
  • Loading branch information
IPvSean authored May 2, 2020
2 parents d443cfd + 81ecc11 commit 67b29c3
Show file tree
Hide file tree
Showing 16 changed files with 98 additions and 11 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The Red Hat Ansible Automation Workshops project is intended for effectively dem
- [How to contribute](docs/contribute.md)
- [How to use the AWS Lab Provisioner](provisioner/README.md)
- [FAQ](docs/faq.md)
- [Release Process](docs/release.md)

---
![Red Hat Ansible Automation](images/rh-ansible-automation-platform.png)
4 changes: 4 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# FAQ for the Provisioner
Frequently Asked Questions... or rather common problems that people have hit.

## How do I do a release PR?

Read this [guide](release.md)

## Problem: boto3 missing

```
Expand Down
53 changes: 53 additions & 0 deletions docs/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Release PR

The Ansible Automation Workshops have two main branches

- `master` - this is the stable supported branch. This is what RHPDS (Red Hat Product Demo System) points to
- `devel` - this is the development branch. This is where PRs (Pull Requests) go into, and get tested.

A **release** is when we move `devel` into `master`. This means the stable `master` branch will pickup all new features, bug fixes and changes that `devel` branch has been testing.

# How to push a release

1. An administrator has to create a PR (pull request) from `devel` into `master` from `https://github.com/ansible/workshops`

![release pr](../images/release_pr.png)

2. Title the PR with `Date Release PR`

For example:
`April 16th, 2020 Release PR`

3. Copy the last PR's contents into your new PR contents, here is an example: [https://github.com/ansible/workshops/pull/800](https://github.com/ansible/workshops/pull/800)

e.g. here is a template you can use

```
# SUMMARY
this is a release PR, a release PR merges the devel branch to the master branch taking in multiple PRs over the last period of time. The last release was on April 16th, 2020 https://github.com/ansible/workshops/pull/784
this merges PRs for the following since the last review:
- https://github.com/ansible/workshops/pull/785 - cleaning up tower exercises
- https://github.com/ansible/workshops/pull/786 - Fix start of YAML marker
- https://github.com/ansible/workshops/pull/790 - add synchronization with ansible/product-demos
- https://github.com/ansible/workshops/pull/795 - new exercise for rhel lab with system roles
- https://github.com/ansible/workshops/pull/799 - fixing RHEL workshop exercises
# ISSUE TYPE
Release PR
cc @cloin @liquidat @goetzrieger @Spredzy
```

4. The goal of the PR summary is to:

- indicate this is a release PR
- link to the last release PR
- summarize all PRs into `devel` since the last time there was a release (this means only purple merged PRs, not closed PRs, or PRs still not merged yet)

5. wait for CI testing to complete

![ci testing](../images/ci.png)

6. merge when you get passing CI

![passed ci](../images/passed.png)

7. If there are major changes, announce these to Roland to make sure they reach his newsletter :)
Binary file added images/ci.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/passed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/release_pr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions provisioner/provision_lab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@
loop:
- "ansible-galaxy collection install ansible.product_demos"
- "ansible-galaxy collection install awx.awx"
register: galaxy
until: galaxy is not failed
retries: 5

- name: Create lab instances in AWS
hosts: localhost
Expand Down Expand Up @@ -207,6 +210,8 @@
when:
- dns_type is defined
- dns_type == "aws"
- towerinstall is defined
- towerinstall
tags: control_node

- name: Setup Amazon S3 Website for Student Login
Expand Down
7 changes: 5 additions & 2 deletions provisioner/roles/aws_dns/tasks/tower.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
- name: CHANGE TOWER BASE URL
tower_settings:
- name: change ansible tower base URL
awx.awx.tower_settings:
name: TOWER_URL_BASE
value: "https://{{username}}.{{ec2_name_prefix|lower}}.{{workshop_dns_zone}}"
tower_verify_ssl: false
tower_host: localhost
tower_username: admin
tower_password: "{{admin_password}}"
register: change_base_url
until: change_base_url is not failed
retries: 5

# directions found here https://certbot.eff.org/lets-encrypt/centosrhel8-other
- name: Download and install certbot
Expand Down
3 changes: 3 additions & 0 deletions provisioner/roles/code_server/tasks/codeserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
- hnw.vscode-auto-open-markdown-preview-0.0.4.vsix
- vscoss.vscode-ansible-0.5.2.vsix
ignore_errors: true
register: install_extension
until: install_extension is not failed
retries: 5

- name: start code-server service
service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
short_name: "f5"
Workshop_f5: "{{ec2_name_prefix}}-f5"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item.0 + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand Down Expand Up @@ -60,6 +61,7 @@
Name: "{{ ec2_name_prefix }}-student{{item.0 + 1}}-node1"
Workshop_node1: "{{ec2_name_prefix}}-node1"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item.0 + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand Down Expand Up @@ -97,6 +99,7 @@
Name: "{{ ec2_name_prefix }}-student{{item.0 + 1}}-node2"
Workshop_node2: "{{ec2_name_prefix}}-node2"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item.0 + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
Name: "{{ ec2_name_prefix }}-student{{item.0 + 1}}-rtr1"
Workshop_rtr1: "{{ec2_name_prefix}}-rtr1"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item.0 + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand All @@ -44,6 +45,7 @@
ansible_network_os: "{{ec2_info[rtr1_type].os}}"
username: "{{ec2_info[rtr1_type].username}}"
launch_time: "{{item.1.launch_time}}"
group: core
with_indexed_items:
- "{{ rtr1_output.instances }}"
when: rtr1_output.instance_ids is not none
Expand Down Expand Up @@ -75,6 +77,7 @@
Name: "{{ ec2_name_prefix }}-student{{item.0 + 1}}-rtr2"
Workshop_rtr2: "{{ec2_name_prefix}}-rtr2"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item.0 + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand All @@ -85,6 +88,7 @@
ansible_network_os: "{{ec2_info[rtr2_type].os}}"
username: "{{ec2_info[rtr1_type].username}}"
launch_time: "{{item.1.launch_time}}"
group: core
with_indexed_items:
- "{{ rtr2_output.instances }}"
when: rtr2_output.instance_ids is not none
Expand Down Expand Up @@ -116,6 +120,7 @@
Name: "{{ ec2_name_prefix }}-student{{item.0 + 1}}-rtr3"
Workshop_rtr3: "{{ec2_name_prefix}}-rtr3"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item.0 + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand All @@ -126,6 +131,7 @@
ansible_network_os: "{{ec2_info[rtr3_type].os}}"
username: "{{ec2_info[rtr1_type].username}}"
launch_time: "{{item.1.launch_time}}"
group: access
with_indexed_items:
- "{{ rtr3_output.instances }}"
when: rtr3_output.instance_ids is not none
Expand Down Expand Up @@ -157,6 +163,7 @@
Name: "{{ ec2_name_prefix }}-student{{item.0 + 1}}-rtr4"
Workshop_rtr4: "{{ec2_name_prefix}}-rtr4"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item.0 + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand All @@ -167,6 +174,7 @@
ansible_network_os: "{{ec2_info[rtr4_type].os}}"
username: "{{ec2_info[rtr1_type].username}}"
launch_time: "{{item.1.launch_time}}"
group: access
with_indexed_items:
- "{{ rtr4_output.instances }}"
when: rtr4_output.instance_ids is not none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
Name: "{{ ec2_name_prefix }}-student{{item.0 + 1}}-node1"
Workshop_node1: "{{ec2_name_prefix}}-node1"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item.0 + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand Down Expand Up @@ -70,6 +71,7 @@
Name: "{{ ec2_name_prefix }}-student{{item.0 + 1}}-node2"
Workshop_node2: "{{ec2_name_prefix}}-node2"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item.0 + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand Down Expand Up @@ -112,6 +114,7 @@
Name: "{{ ec2_name_prefix }}-student{{item.0 + 1}}-node3"
Workshop_node3: "{{ec2_name_prefix}}-node3"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item.0 + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand Down
11 changes: 3 additions & 8 deletions provisioner/roles/manage_ec2_instances/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
- include_tasks: teardown.yml
when: teardown|bool

- name: provision workshop in AWS public cloud
block:
- name: provision aws resources and instances
include_tasks: provision.yml
tags: provisioned

- name: create instructor_inventory, and student files
include_tasks: create_inventory.yml
- name: provision aws resources and instances
include_tasks: provision.yml
tags: provisioned
when: not teardown|bool
3 changes: 3 additions & 0 deletions provisioner/roles/manage_ec2_instances/tasks/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@
## Instance creation
- name: provision workshop instances
include_tasks: 'instances/instances_{{workshop_type}}.yml'

- name: create instructor_inventory, and student files
include_tasks: create_inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Name: "{{ ec2_name_prefix }}-student{{item[0] + 1}}-splunk"
Workshop_splunk: "{{ec2_name_prefix}}-splunk"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item[0] + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand All @@ -34,6 +35,7 @@
Name: "{{ ec2_name_prefix }}-student{{item[0] + 1}}-qradar"
Workshop_qradar: "{{ec2_name_prefix}}-qradar"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item[0] + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand Down Expand Up @@ -67,6 +69,7 @@
Name: "{{ ec2_name_prefix }}-student{{item[0] + 1}}-snort"
Workshop_snort: "{{ec2_name_prefix}}-snort"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item[0] + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand All @@ -92,6 +95,7 @@
Name: "{{ ec2_name_prefix }}-student{{item[0] + 1}}-attacker"
Workshop_attacker: "{{ec2_name_prefix}}-attacker"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item[0] + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand All @@ -118,6 +122,7 @@
Name: "{{ ec2_name_prefix }}-student{{item[0] + 1}}-checkpoint_mgmt"
Workshop_checkpoint_mgmt: "{{ec2_name_prefix}}-checkpoint"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item[0] + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand Down Expand Up @@ -145,6 +150,7 @@
Name: "{{ ec2_name_prefix }}-student{{item[0] + 1}}-windows_ws"
Workshop_windows: "{{ec2_name_prefix}}-windows"
Workshop: "{{ec2_name_prefix}}"
Workshop_type: "{{ workshop_type }}"
Index: "{{ item[0] }}"
Student: "student{{item[0] + 1}}"
AWS_USERNAME: "{{ aws_user }}"
Expand Down
2 changes: 1 addition & 1 deletion provisioner/roles/populate_tower/tasks/rhel_90.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
my_tower_host: "{{ ansible_host }}"
demo: hardening
include_role:
name: "ipvsean.product_demos.install_demo"
name: "ansible.product_demos.install_demo"

0 comments on commit 67b29c3

Please sign in to comment.