Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
[IT-435] upgrade to use Sceptre ver 2
Browse files Browse the repository at this point in the history
Upgrade from Sceptre 1.x to 2.x because V1 is end of life[1].
Followed the migration guide[2] to do the upgrade.

[1] Sceptre/sceptre#593
[2] https://github.com/cloudreach/sceptre/wiki/Migration-Guide:-V1-to-V2
  • Loading branch information
zaro0508 committed Jan 29, 2019
1 parent 866ea02 commit fe8d009
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 376 deletions.
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ __pycache__/

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
Expand Down Expand Up @@ -111,14 +112,14 @@ git-crypt.key
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml

# sceptre artifacts
remote-templates
# sceptre remote templates
templates/remote/

# lambda artifacts
lambdas/*.zip

# MAC Crap
.DS_Store

# temp
temp/
# temp files
/temp/
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
sudo: false
language: python
python: 3.5
python: 3.6
cache: pip
fast_finish: true
install:
- pip install cfn-lint
- wget https://github.com/Sage-Bionetworks/infra-utils/archive/master.zip -O /tmp/infra-utils.zip
- unzip -j -n /tmp/infra-utils.zip -x "infra-utils-master/.gitignore" "infra-utils-master/LICENSE" "infra-utils-master/*.md" "infra-utils-master/aws/*"
- ./setup_aws_cli.sh || travis_terminate 1
- ./setup_sceptre.sh || travis_terminate 1
- pip install cfn-lint
- pip install git+git://github.com/zaro0508/sceptre@issue-586
- pip install git+git://github.com/zaro0508/sceptre-ssm-resolver.git
- pip install git+git://github.com/zaro0508/sceptre-date-resolver.git
- pip install git+git://github.com/Sage-Bionetworks/sceptre-provisioner-hooks.git
stages:
- name: validate
- name: deploy
if: branch = master AND type = push
jobs:
include:
- stage: validate
script: cfn-lint ./templates/**/*.yaml
script: cfn-lint ./templates/**/*
- stage: deploy
script:
- sceptre --var "profile=default" --var "region=us-east-1" launch-env prod
script: sceptre launch prod --yes
6 changes: 5 additions & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ project_code: sage-bionetworks
profile: {{ var.profile | default("default") }}
region: {{ var.region | default("us-east-1") }}
template_bucket_name: bootstrap-awss3cloudformationbucket-z6hnifi9i3p
template_key_prefix: {{ environment_variable.TRAVIS_BRANCH | default("testing") }}
template_key_prefix: {{ environment_variable.TRAVIS_BRANCH | default("testing") }}
admincentral_cf_bucket: "bootstrap-awss3cloudformationbucket-19qromfd235z9"
# AWS account for this repo
aws_account_name: Sandbox
aws_account_email: aws.sandbox@sagebase.org
4 changes: 2 additions & 2 deletions config/prod/gene-drug-db-test-instance-ec2.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Provision an EC2 instance
template_path: templates/managed-ec2-v2.yaml
template_path: managed-ec2-v2.yaml
stack_name: gene-drug-db-test-instance-ec2
parameters:
# The Sage deparment for this resource
Expand All @@ -16,5 +16,5 @@ parameters:
JcSystemsGroupId: !ssm /infra/JcSystemsGroupId
hooks:
after_create:
- !notify_ec2
- !ec2_notify {{stack_group_config.aws_account_name}} {{stack_group_config.aws_account_email}}

2 changes: 1 addition & 1 deletion config/prod/genie.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
template_path: templates/genie.yaml
template_path: genie.yaml
stack_name: genie
parameters:
# AWS batch requires the instance to have pre-installed packages.
Expand Down
4 changes: 2 additions & 2 deletions config/prod/neurolincs-unique-objects.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Provision an EC2 instance
template_path: templates/managed-ec2-v4.yaml
template_path: managed-ec2-v4.yaml
stack_name: neurolincs-unique-objects-ec2
parameters:
# The Sage deparment for this resource
Expand All @@ -18,5 +18,5 @@ parameters:
JcSystemsGroupId: !ssm /infra/JcSystemsGroupId
hooks:
after_create:
- !notify_ec2
- !ec2_notify {{stack_group_config.aws_account_name}} {{stack_group_config.aws_account_email}}

4 changes: 2 additions & 2 deletions config/prod/pmc-test-ec2.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Instance to test integration with parkmycloud
template_path: templates/managed-ec2-v4.yaml
template_path: managed-ec2-v4.yaml
stack_name: pmc-test-ec2
parameters:
# The Sage deparment for this resource
Expand All @@ -17,4 +17,4 @@ parameters:
JcSystemsGroupId: !ssm /infra/JcSystemsGroupId
hooks:
after_create:
- !notify_ec2
- !ec2_notify {{stack_group_config.aws_account_name}} {{stack_group_config.aws_account_email}}
178 changes: 0 additions & 178 deletions hooks/notify_ec2.py

This file was deleted.

Loading

0 comments on commit fe8d009

Please sign in to comment.