-
Notifications
You must be signed in to change notification settings - Fork 3
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
QOLDEV-833 add template to stand up instances for generating golden AMIs #540
Merged
Merged
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
235891f
Merge branch 'develop' of https://github.com/qld-gov-au/ckan-qld-infr…
ThrawnCA b1697a9
Merge branch 'develop' of https://github.com/qld-gov-au/ckan-qld-infr…
ThrawnCA dcb4d4f
[QOLDEV-833] add CloudFormation stack to generate EC2 instances as te…
ThrawnCA 04a5763
[QOLDEV-833] add CloudFormation stack to generate EC2 instances as te…
ThrawnCA 52241c0
[QOLDEV-833] adjust setup script behaviour to support warm instances
ThrawnCA 2e69cf9
[QOLDEV-833] add CloudFormation template to create standby instances …
ThrawnCA f38f135
Merge branch 'QOLDEV-833-autoscaling-ami' of https://github.com/qld-g…
ThrawnCA 0c3899c
Merge branch 'develop' of https://github.com/qld-gov-au/ckan-qld-infr…
ThrawnCA 52c8619
Merge branch 'develop' of https://github.com/qld-gov-au/ckan-qld-infr…
ThrawnCA ca57328
Merge branch 'develop' of https://github.com/qld-gov-au/ckan-qld-infr…
ThrawnCA 4f77999
Merge branch 'QOLDEV-833-autoscaling-ami' of https://github.com/qld-g…
ThrawnCA 420881f
[QOLDEV-833] sync AMI template file with autoscaling template
ThrawnCA f662acc
Merge branch 'develop' of https://github.com/qld-gov-au/ckan-qld-infr…
ThrawnCA 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 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,39 @@ | ||
--- | ||
- name: Cloudformation Playbook | ||
hosts: local | ||
connection: local | ||
|
||
pre_tasks: | ||
- name: get basic_facts | ||
set_fact: | ||
basic_fact={{ item }} | ||
# CKANSource={{ item.CKANSource }} | ||
when: item.Environment == Environment | ||
with_items: "{{ basic_facts }}" | ||
|
||
- name: set facts to environment from basic_fact | ||
set_fact: "{{ item.key }}={{ item.value }}" | ||
with_dict: "{{ basic_fact }}" | ||
when: basic_fact is defined | ||
|
||
- name: kms alias fact | ||
aws_kms_facts: | ||
filters: | ||
alias: "aws/ssm" | ||
region: "{{ region }}" | ||
register: ssmKeyFacts | ||
|
||
- name: set KMS key from alias | ||
set_fact: | ||
SSMKey: "{{ ssmKeyFacts['keys'][0].key_arn }}" | ||
|
||
- name: Generate Lambda file hash | ||
shell: > | ||
md5sum files/instanceSetupLambda.js | awk '{print substr($1, 1, 20)}' | ||
register: hash_output | ||
- set_fact: | ||
instance_setup_source_hash: "{{ hash_output.stdout_lines[0] }}" | ||
|
||
- include_vars: vars/AMI-template-instances.var.yml | ||
roles: | ||
- ansible_cloudformation |
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.
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.
when i see the options of
setup, deploy, configure.
I do not envision 'setup' doing everything. nor 'deploy' only making a 'warm' instance.
@chris-randall-qol and others, what is your thoughts on this.
I know this is from legacy deployPhase's we got from inheriting this codebase but i think its time to make it less confusing.
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.
Yes, those were the OpsWorks terms. We could change them, it would just mean a lot of renaming.
Note that the distinction between 'deploy' and 'configure' creating warm vs hot instances did not come from OpsWorks. It's just something that I've observed to be useful if we want to make custom images.