-
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
Implement CircleCI deployment when pushing to develop #101
Merged
Conversation
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
…ation Refactor lambda package generation in CDK
…aging Updated circleCI config to deploy to staging on pushes to develop
This reverts commit 2a4db76.
…enable docker to mount filesystem
…enable docker to mount filesystem
ciaransweet
requested changes
Jan 7, 2021
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.
Looks good to me, I think you've just left some debugging statements in... maybe?
I appreciate the direct quote 🤣
On the VPC topic, if one of those VPCs does what you need, you could just set your deployment to go into one of those for now, which is a quick fix!
ciaransweet
approved these changes
Jan 7, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What I did:
Implemented CircleCI deployments to a staging CDK stack off of pushes to deployment. There are 2 main reasons for this feature:
How I did it:
I added a new step to the deployment script which deploys to a
staging
CDK stack when pushing to develop.The lambda deployment package generation had originally been disabled in the CDK script and was being done directly CircleCI, due to the fact that lambda deployment package generation in CDK uses docker and it is not possible to mount docker container volumes in CircleCI, since CircleCI also runs in docker, and according to @CiaranEvans:
In order to enable the CDK script to use docker when deploying the stack from within CircleCI I switched from a docker image executor to a machine executor, which runs the CI pipeline in a Linux VM rather than a docker container. This gives me full controls of the underlying file system, and allows me to mount the volumes needed when generating the lambda deployment package.
How you can test it:
Merge this PR to
develop
and watch a newstaging
stack get created in the NASA Impact AWS account!Note:
Currently the
staging
stack fails to create because of a limit of 5 VPC's per region in AWS.us-east-1
has one for theprod
stack, one for a stack I stood up to share contrail detections with the dev's at Impact, one for atest
stack that used to be used by ESA devs (unclear wether it is still being used or not, I didn't want to delete it, just in case). There are 2 VPC's that don't belong to any Cloudformation stack.Possible solutions:
test
stack if we can confirm it's no longer in use by the folks at ESAus-east-1
and delete one if it is not neededstaging
stack to a different region