-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy CloudFront distributions in front of CopWatch (#307)
Co-authored-by: Ronard <[email protected]> Co-authored-by: ronardcaktus <[email protected]>
- Loading branch information
1 parent
6699867
commit afbc723
Showing
47 changed files
with
1,850 additions
and
602 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
cloudfront_domain_name: "{{ k8s_domain_names[0] }}" | ||
cloudfront_domain_name_origin: "{{ env_name }}-origin.nccopwatch.org" | ||
|
||
cloudformation_stack_state: present | ||
cloudformation_stack_profile: '{{ aws_profile }}' | ||
cloudformation_stack_region: '{{ aws_region }}' | ||
cloudformation_stack_name: 'cdn-{{ env_name }}' | ||
cloudformation_stack_template_bucket: 'aws-web-stacks-trafficstops' | ||
cloudformation_stack_template_bucket_path: 'templates/cdn.yml' | ||
cloudformation_stack_template_local_path: '{{ playbook_dir + "/stack/cloudfront.yml" }}' | ||
cloudformation_stack_template_parameters: | ||
AppCloudFrontCertArn: arn:aws:acm:us-east-1:606178775542:certificate/379950bb-4b29-4308-8418-122674fe1076 | ||
AppCloudFrontForwardedHeaders: "Host,Authorization" | ||
DomainName: "{{ cloudfront_domain_name }}" | ||
AppCloudFrontOriginDomainName: "{{ cloudfront_domain_name_origin }}" | ||
# Allow key-less access to create CloudFront invalidations | ||
AppCloudFrontRoleArn: trafficstops-stack-ContainerInstanceRole-1XMBM3VLAYOVE | ||
# Required for the CloudFront template | ||
DomainNameAlternates: "" | ||
CustomAppCertificateArn: "" | ||
CertificateValidationMethod: "(none)" | ||
cloudformation_stack_tags: | ||
Environment: "{{ env_name }}" |
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ k8s_ingress_tls_domains_extra: | |
|
||
env_contact_us_emails: | ||
- [email protected] | ||
env_cache_cloudfront_distribution_id: "" # TODO: Set this value once the CloudFront distribution is created | ||
|
||
database_password: !vault | | ||
$ANSIBLE_VAULT;1.1;AES256 | ||
|
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ env_contact_us_emails: | |
- [email protected] | ||
|
||
env_media_location: "staging/" | ||
env_cache_cloudfront_distribution_id: E2OFFI0H5HY2N8 | ||
|
||
database_password: !vault | | ||
$ANSIBLE_VAULT;1.1;AES256 | ||
|
@@ -16,6 +17,19 @@ database_password: !vault | | |
3263343333363130630a373033353533613064653033623138313334623537383037356262383662 | ||
36613231353732663637316637383061376566663466373865356539626539376161 | ||
env_basicauth_username: forwardjustice | ||
# Update `k8s_container_htpasswd` below if this password changes. I wasn't able to | ||
# manually hash the password and get it to work. | ||
# https://httpd.apache.org/docs/2.4/misc/password_encryptions.html | ||
# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/password_hash_filter.html | ||
# My failed attempt: "{{ env_basicauth_username }}:{SHA}{{ env_basicauth_password | hash('sha1') | b64encode }}" | ||
env_basicauth_password: !vault | | ||
$ANSIBLE_VAULT;1.1;AES256 | ||
64363233356237323034303932306231333765383966306639663465323664643065386635626464 | ||
3463303836643531613363636239646463383936383837380a316463386662656238653439353431 | ||
66616461386237636538366165613332306538623038343936316366613832343636313433326534 | ||
3565623766653963620a333937333535376666346165343036623964623037343461316135663230 | ||
3662 | ||
k8s_container_htpasswd: !vault | | ||
$ANSIBLE_VAULT;1.1;AES256 | ||
31356461656536343532333632356338616462346436386566643438376237333935373531633762 | ||
|
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.