-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #784 from ansible/devel
April 16th, 2020 Release PR
- Loading branch information
Showing
123 changed files
with
1,535 additions
and
995 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,11 @@ | ||
# Contribute a new workshop environment for AWS (Amazon Web Services ) | ||
|
||
There are four components to the AWS `manage_ec2_instances` role: | ||
|
||
- **resources** - this provisions AWS Virtual Private Cloud (VPC), the associated Security Group, the EC2 subnet, route table and SSH key-pair. The network and security workshop types use two VPCs to create separate networks. Example for resources can be found in `provisioner/roles/manage_ec2_instances/tasks/resources`. If you only need a single VPC, you most likely do not have to worry about the resources, and can just copy the default `workshop_type: rhel` setup. | ||
|
||
- **instances** - this provisions the actual Amazon instances (e.g. Red Hat Enterprise Linux 8, Cisco IOS, Microsoft Windows, etc) onto the VPC recreated in the `resources` part of the provisioner. Examples for each `workshop_type` can be found in `provisioner/roles/manage_ec2_instances/tasks/instances` | ||
|
||
- **ami_find** - this dynamically figures out the correct AMI (Amazon Machine Image) to use depending on which Amazon region you are in (e.g. `us-east-1`). Examples for each `workshop_type` can be found in `provisioner/roles/manage_ec2_instances/tasks/ami_find` | ||
|
||
- **inventory** - this loads the newly created instances into Ansible Inventory so subsequent Ansible Plays can be executed. This is so Ansible can now configure the vanilla images by making changes to the newly created instances. For example we install Ansible for each student, configure their `/etc/hosts`, the `~/.ssh/config` and much more depending the `workshop_type`. Examples of inventory can be found in `provisioner/roles/manage_ec2_instances/tasks/inventory` |
This file contains 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
This file contains 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,92 @@ | ||
# Create New Exercise Content | ||
|
||
We encourage folks to create new exercise content, fork with your own content, and customize the workshop any way you want. This will give you the flexibility to customize workshops for your own friends, customers, community or project! | ||
|
||
## Table of Contents | ||
|
||
* [Using your own fork](#using-your-own-fork) | ||
* [Practical Example](#practical-example) | ||
* [Changing solution folder on control node](#changing-solution-folder-on-control-node) | ||
* [Practical Example](#practical-example-1) | ||
* [Changing source folder for exercise solutions](#changing-source-folder-for-exercise-solutions) | ||
* [Practical Example](#practical-example-2) | ||
|
||
# Using your own fork | ||
|
||
When a workshop is provisioned, the control node for every workbench (where the Red Hat Ansible Automation is installed and executed from) will load solution exercises into `~/{{workshop}}-workshop`. For example if you are running the `networking` workshop the home directory for every student will have `~/home/networking-workshop`. | ||
|
||
This can be customized! There are three variables that you can change with your provisioner code | ||
|
||
- `ansible_workshops_url` - points to the git repo where you want to load exercises from. By default this uses [https://github.com/ansible/workshops.git](https://github.com/ansible/workshops.git) if this is not specified. | ||
- `version` - points to the git [branch](https://git-scm.com/docs/git-branch) for the specified git repo. By default this uses `master` | ||
- `refspec` - points to the git [refspec](https://git-scm.com/book/en/v2/Git-Internals-The-Refspec). By default this is set to `""` (nothing). | ||
|
||
These variables are used in the `control_node` role which can found here: `provisioner/roles/control_node/tasks/main.yml` | ||
|
||
|
||
## Practical Example | ||
|
||
Here is the `extra_vars` example of provisioning the `workshop_type: rhel` with exercises from a forked repository on a different branch: | ||
|
||
``` | ||
--- | ||
ec2_region: us-east-2 | ||
ec2_name_prefix: sean-workshop | ||
admin_password: ansible123 | ||
student_total: 1 | ||
workshop_type: rhel | ||
create_login_page: true | ||
ansible_workshops_url: https://github.com/ipvsean/workshops.git | ||
ansible_workshops_version: "test_branch" | ||
``` | ||
|
||
This would load the exercises `/exercises/ansible_rhel` from fork `github.com/ipvsean/workshops.git` branch `test_branch` into the student home directory of `~/rhel-workshop` | ||
|
||
|
||
# Changing solution folder on control node | ||
|
||
It is possible to change the location of the destination folder where the exercises are loaded into with the `exercise_dest_location` variable. | ||
|
||
|
||
## Practical Example | ||
|
||
Here is the `extra_vars` example of provisioning the `workshop_type: rhel` with exercises from a forked repository on a different branch: | ||
|
||
``` | ||
--- | ||
ec2_region: us-east-1 | ||
ec2_name_prefix: sean-workshop2 | ||
admin_password: ansible123 | ||
student_total: 1 | ||
workshop_type: rhel | ||
create_login_page: true | ||
ansible_workshops_url: https://github.com/ipvsean/workshops.git | ||
ansible_workshops_version: "test_branch" | ||
exercise_dest_location: "my_folder" | ||
``` | ||
|
||
This would load the exercises `/exercises/ansible_rhel` from fork `github.com/ipvsean/workshops.git` branch `test_branch` into the student home directory of `~/my_folder` | ||
|
||
# Changing source folder for exercise solutions | ||
|
||
It is possible to change the location of the source folder with the `exercise_src_location` variable. This defaults to `exercises/ansible_{{workshop_type}}`. For example by default it would load `exercises/ansible_rhel` for the `workshop_type: rhel` workshop. | ||
|
||
## Practical Example | ||
|
||
Here is the `extra_vars` example of provisioning the `workshop_type: rhel` with different exercises from a forked repository on a different branch: | ||
|
||
``` | ||
--- | ||
ec2_region: us-east-1 | ||
ec2_name_prefix: sean-workshop2 | ||
admin_password: ansible123 | ||
student_total: 1 | ||
workshop_type: rhel | ||
create_login_page: true | ||
ansible_workshops_url: https://github.com/ipvsean/workshops.git | ||
ansible_workshops_version: "test_branch" | ||
exercise_dest_location: "my_folder" | ||
exercise_src_location: "exercises/my_exercises" | ||
``` | ||
|
||
This would load the exercises `/exercises/my_exercises` from fork `github.com/ipvsean/workshops.git` branch `test_branch` into the student home directory of `~/my_folder` |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.