Skip to content

Commit

Permalink
cost tags for AWS QE system
Browse files Browse the repository at this point in the history
trying to make this easy for myself and @Spredzy
  • Loading branch information
Sean Cavanaugh committed Feb 10, 2021
1 parent d39cb9a commit b20c81e
Show file tree
Hide file tree
Showing 23 changed files with 96 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/contribute-aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ There are four components to the AWS `manage_ec2_instances` role:
- **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`

## Getting Help

Please [file issues on Github](https://github.com/ansible/workshops/issues). Please fill out all required information. Your issue will be closed if you skip required information in the Github issues template.

![Ansible-Workshop-Logo.png](../images/Ansible-Workshop-Logo.png)
6 changes: 6 additions & 0 deletions docs/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,9 @@ To make sure this is run everytime one commits a change, and hence one is not se
The following links will be helpful if you want to contribute code to the Ansible Workshops project, or any Ansible project:
- [Ansible Committer Guidelines](http://docs.ansible.com/ansible/latest/committer_guidelines.html)
- [Learning Git](https://git-scm.com/book/en/v2)

## Getting Help

Please [file issues on Github](https://github.com/ansible/workshops/issues). Please fill out all required information. Your issue will be closed if you skip required information in the Github issues template.

![Ansible-Workshop-Logo.png](../images/Ansible-Workshop-Logo.png)
6 changes: 6 additions & 0 deletions docs/exercises.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,9 @@ 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`

## Getting Help

Please [file issues on Github](https://github.com/ansible/workshops/issues). Please fill out all required information. Your issue will be closed if you skip required information in the Github issues template.

![Ansible-Workshop-Logo.png](../images/Ansible-Workshop-Logo.png)
6 changes: 6 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,9 @@ objc[43678]: +[__NSPlaceholderDate initialize] may have been in progress in anot
```
$ export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
```

## Getting Help

Please [file issues on Github](https://github.com/ansible/workshops/issues). Please fill out all required information. Your issue will be closed if you skip required information in the Github issues template.

![Ansible-Workshop-Logo.png](../images/Ansible-Workshop-Logo.png)
6 changes: 6 additions & 0 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,9 @@ cc @cloin @liquidat @goetzrieger @Spredzy
![passed ci](../images/passed.png)

7. If there are major changes, announce these to Roland to make sure they reach his newsletter :)

## Getting Help

Please [file issues on Github](https://github.com/ansible/workshops/issues). Please fill out all required information. Your issue will be closed if you skip required information in the Github issues template.

![Ansible-Workshop-Logo.png](../images/Ansible-Workshop-Logo.png)
6 changes: 6 additions & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@ https://docs.ansible.com/ansible-tower/latest/html/upgrade-migration-guide/virtu
[root@centos ~]# pip install --upgrade boto3
[root@centos ~]# deactivate
```

## Getting Help

Please [file issues on Github](https://github.com/ansible/workshops/issues). Please fill out all required information. Your issue will be closed if you skip required information in the Github issues template.

![Ansible-Workshop-Logo.png](../images/Ansible-Workshop-Logo.png)
Binary file added images/Ansible-Workshop-Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions provisioner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,5 @@ What does the AWS provisioner take care of automatically?
## Getting Help

Please [file issues on Github](https://github.com/ansible/workshops/issues). Please fill out all required information. Your issue will be closed if you skip required information in the Github issues template.

![Ansible-Workshop-Logo.png](../images/Ansible-Workshop-Logo.png)
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Students: "{{ student_total }}"
username: "{{ ec2_info[control_type].username }}"
short_name: "ansible-{{ sequence }}"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
short_name: 'attendance-host'
long_name: "attendance-host.{{ ec2_name_prefix }}.{{ workshop_dns_zone | default('') }}"
username: "{{ ec2_info['attendance_host']['username'] }}"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
register: attendance_output
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
short_name: "dev_web1"
username: "{{ ec2_info[rhel].username }}"
Devops_tag: dev_web1
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes:
Expand Down Expand Up @@ -70,6 +71,7 @@
short_name: "dev_web2"
username: "{{ ec2_info[rhel].username }}"
Devops_tag: dev_web2
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes:
Expand Down Expand Up @@ -117,6 +119,7 @@
short_name: "prod_web1"
username: "{{ ec2_info[rhel].username }}"
Devops_tag: prod_web1
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes:
Expand Down Expand Up @@ -164,6 +167,7 @@
short_name: "prod_web2"
username: "{{ ec2_info[rhel].username }}"
Devops_tag: prod_web2
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
Students: "{{ student_total }}"
username: "{{ ec2_info.f5node.username }}"
short_name: "f5"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
register: f5_output
Expand Down Expand Up @@ -64,6 +65,7 @@
Students: "{{ student_total }}"
short_name: node1
username: "{{ ec2_info[rhel].username }}"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
register: node1_output
Expand Down Expand Up @@ -105,6 +107,7 @@
Students: "{{ student_total }}"
short_name: node2
username: "{{ ec2_info[rhel].username }}"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
register: node2_output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
ansible_network_os: "{{ ec2_info[rtr1_type].os }}"
username: "{{ ec2_info[rtr1_type].username }}"
group: core
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes: "{{ec2_info[rtr1_type].volume | default(omit)}}"
Expand Down Expand Up @@ -80,6 +81,7 @@
ansible_network_os: "{{ ec2_info[rtr2_type].os }}"
username: "{{ ec2_info[rtr1_type].username }}"
group: core
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id2 }}"
volumes: "{{ ec2_info[rtr2_type].volume | default(omit) }}"
Expand Down Expand Up @@ -126,6 +128,7 @@
ansible_network_os: "{{ ec2_info[rtr3_type].os }}"
username: "{{ ec2_info[rtr1_type].username }}"
group: access
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes: "{{ ec2_info[rtr3_type].volume | default(omit) }}"
Expand Down Expand Up @@ -172,6 +175,7 @@
ansible_network_os: "{{ ec2_info[rtr4_type].os }}"
username: "{{ ec2_info[rtr1_type].username }}"
group: access
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id2 }}"
volumes: "{{ ec2_info[rtr4_type].volume | default(omit) }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
Students: "{{ student_total }}"
short_name: "node1"
username: "{{ ec2_info[rhel].username }}"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes:
Expand Down Expand Up @@ -68,6 +69,7 @@
Students: "{{ student_total }}"
short_name: "node2"
username: "{{ ec2_info[rhel].username }}"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes:
Expand Down Expand Up @@ -114,6 +116,7 @@
Students: "{{ student_total }}"
short_name: "node3"
username: "{{ ec2_info[rhel].username }}"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes:
Expand Down Expand Up @@ -160,6 +163,7 @@
Students: "{{ student_total }}"
short_name: "isonode"
username: "{{ ec2_info[rhel].username }}"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes:
Expand Down Expand Up @@ -205,6 +209,7 @@
Students: "{{ student_total }}"
short_name: "remotenode"
username: "{{ ec2_info[rhel].username }}"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
Students: "{{ student_total }}"
short_name: "satellite"
username: "{{ ec2_info[rhel].username }}"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
Students: "{{ student_total }}"
short_name: "netapp"
username: "{{ ec2_info[rhel].username }}"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
volumes:
Expand All @@ -54,6 +55,7 @@
Index: "{{ item[0] }}"
Student: "student{{ item.0 + 1 }}"
launch_time: "{{ item.1.launch_time }}"
ansible-workshops: true
with_indexed_items:
- "{{ netapp_output.instances }}"
when: netapp_output.instance_ids is not none
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
short_name: 'gitlab'
long_name: "gitlab.{{ ec2_name_prefix }}.{{ workshop_dns_zone | default('') }}"
username: "{{ ec2_info['skylight_rhel8_gitlab']['username'] }}"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
user_data: "{{ lookup('template', 'skylight_gitlab_userdata.j2') }}"
Expand Down Expand Up @@ -53,6 +54,7 @@
Linklight: "This was provisioned through the linklight provisioner"
Students: "{{ student_total }}"
short_name: "instance1"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
user_data: "{{ lookup('template', 'skylight_windows_userdata.j2', template_vars=dict(vm_name='instance1')) }}"
Expand Down Expand Up @@ -81,6 +83,7 @@
Linklight: "This was provisioned through the linklight provisioner"
Students: "{{ student_total }}"
short_name: "instance2"
ansible-workshops: true
wait: "{{ ec2_wait }}"
vpc_subnet_id: "{{ ec2_vpc_subnet_id }}"
user_data: "{{ lookup('template', 'skylight_windows_userdata.j2', template_vars=dict(vm_name='instance2')) }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
Students: "{{ student_total }}"
Workshop_type: "{{ workshop_type }}"
Workshop: "{{ ec2_name_prefix }}"
ansible-workshops: true
register: create_vpc
until: create_vpc is not failed
retries: 5
Expand Down Expand Up @@ -41,6 +42,7 @@
Students: "{{ student_total }}"
Workshop_type: "{{ workshop_type }}"
Workshop: "{{ ec2_name_prefix }}"
ansible-workshops: true
rules: "{{ all_rules }}"
rules_egress:
- proto: all
Expand All @@ -64,6 +66,7 @@
Students: "{{ student_total }}"
Workshop_type: "{{ workshop_type }}"
Workshop: "{{ ec2_name_prefix }}"
ansible-workshops: true
rules:
- proto: tcp
from_port: 22
Expand Down Expand Up @@ -108,6 +111,7 @@
Students: "{{ student_total }}"
Workshop_type: "{{ workshop_type }}"
Workshop: "{{ ec2_name_prefix }}"
ansible-workshops: true
register: create_subnet
when: ec2_vpc_id is undefined
until: create_subnet is not failed
Expand All @@ -128,6 +132,7 @@
Students: "{{ student_total }}"
Workshop_type: "{{ workshop_type }}"
Workshop: "{{ ec2_name_prefix }}"
ansible-workshops: true
register: create_subnet2
until: create_subnet2 is not failed
retries: 15
Expand All @@ -143,6 +148,7 @@
Students: "Total {{ student_total }}"
Workshop_type: "{{ workshop_type }}"
Workshop: "{{ ec2_name_prefix }}"
ansible-workshops: true
register: igw
until: igw is not failed
retries: 15
Expand All @@ -164,6 +170,7 @@
Students: "{{ student_total }}"
Workshop_type: "{{ workshop_type }}"
Workshop: "{{ ec2_name_prefix }}"
ansible-workshops: true
register: routetable
until: routetable is not failed
retries: 5
Expand All @@ -181,6 +188,8 @@
name: "{{ ec2_name_prefix|lower }}.{{ workshop_dns_zone|lower }}.private"
state: present
region: "{{ ec2_region }}"
tags:
ansible-workshops: true
retries: 4
delay: 15
register: s3_result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Info: "Username that provisioned this-> {{ aws_user }}"
Linklight: "This was provisioned through the linklight provisioner"
Students: "{{student_total}}"
ansible-workshops: true
register: create_vpc2
when: ec2_vpc_id2 is undefined
until: create_vpc2 is not failed
Expand All @@ -25,6 +26,7 @@
Info: "Username that provisioned this-> {{ aws_user }}"
Linklight: "This was provisioned through the linklight provisioner"
Students: "{{student_total}}"
ansible-workshops: true
rules:
- proto: 47
to_port: -1
Expand Down Expand Up @@ -78,6 +80,7 @@
Info: "Username that provisioned this-> {{ aws_user }}"
Linklight: "This was provisioned through the linklight provisioner"
Students: "{{student_total}}"
ansible-workshops: true
register: create_subnet2
until: create_subnet2 is not failed
retries: 15
Expand All @@ -92,6 +95,7 @@
Info: "Username that provisioned this-> {{ aws_user }}"
Linklight: "This was provisioned through the linklight provisioner"
Students: "Total {{student_total}}"
ansible-workshops: true
register: igw2
until: igw2 is not failed
retries: 15
Expand All @@ -111,6 +115,7 @@
Info: "Username that provisioned this-> {{ aws_user }}"
Linklight: "This was provisioned through the linklight provisioner"
Students: "{{student_total}}"
ansible-workshops: true
register: routetablenetworking
until: routetablenetworking is not failed
retries: 5
Expand Down
Loading

0 comments on commit b20c81e

Please sign in to comment.