Scripts to provision and deploy to EC2
This MR adds a few scripts to make deployments to EC2 possible. This scripts will then be used to create a new CF-Provision-and_Deploy-EC2
template.
-
gl-cloudprovision create-stack
usesaws cloudformation create-stack
behind the scene. A JSON file based on the CloudFormation template must be passed in to that command. An example of such a JSON file can be found here. With this type of JSON file provided, this command will create a infrastructure on AWS, including an EC2 instance. The script exists once we get confirmation that the stack setup is complete or has failed (through periodic polling). -
gl-ec2 push-to-s3
will push code to an S3 bucket. Here's an example of the JSON file to pass to theaws deploy push
command. This code can be whatever artefact is built from a precedingbuild
job. -
gl-ec2 deploy-to-ec2
usesaws deploy create-deployment
behind the scenes to create a deployment to an EC2 instance. The template of the JSON file to pass in can be found here. Here's an example. The script ends once we get confirmation that the deployment has succeeded/failed (via polling)
Manual testing was done and logged in this MR.
Relates to gitlab#201742 (closed)
cc @ogolowinski
Edited by Etienne Baqué