Typical CI/CD Workflow

Welcome to module 4. In this module we're will be building continuous integration and continue delivery. Or CI/CD for short. So here's my question for you, how to get the source code to the remote machine or multiple machines which is even harder because if you have thousands of instances then you're not going to really go and manually deploy that code? And if you have to do that many times per day that's a problem. Leave your comments below. And here's some of my suggestions. First of all, getting the source code to an instance.

So yes ssh or secure copy, scp as sftp, those tools to those commands so they could be to some extent automated, so you can write a shell script that would use as ssh or as csp or rsync to put the code there. You can also use git. So from the machine, you can run some code put it in user data and similar with scp as well and pull the code from some git repository; you can use to git labs or github. Rsync—that's another option.

And then you can also leverage S3 which is the simple storage service by a AWS. And here's the command aws s3. So you can see that it follows the same pattern of the commands, the same methodology that we use for AWS EC2, only instead of EC2 you would type s3, and then you would type cp which is copy and the location of your bucket and the region. Here's a simple flow. First you can commit your code to bucket or repository or some folder somewhere preferably centralized location. Then number two, event is triggered, if you use github. There is a web hook; get labs, most of the other systems, they also have HTTP web hooks.

So what is a web hook? It's just an HTTP request typically it's a POST request from whatever service you are using such as Github to another service which is going to be your CI server. And then CI server does the code deployment. Developers can implement their own solutions from scratch. You could use tools such as Jenkins CI.

You could also use managed services such as CircleCI. It's not part of AWS. It's a separate service or since you're already watching this scores I assume you're interested in the solutions provided by AWS. So one of those solutions is called CodeDeploy. And that's what I recommend using. Go ahead and watch the YouTube video at the bottom and we will continue after that.