Get a quick overview of the application used to explore several CI/CD tools in this video.
- [Instructor] As we explore CICD tools, it's helpful to have a sample pipeline to work with. We'll be configuring a pipeline that builds, tests, and deploys a web application. Our application is a Python script that serves JSON data over a simple API. The application will be packaged as a Docker container, and then deployed to an AWS Elastic Beanstalk environment. If you have access to the exercise files, you can find the complete Python script there. For now, we won't worry too much about the application. Instead, we'll be focusing on the steps needed to build it, test it, and deploy it to the target environment. Our pipeline will have seven steps. We'll trigger the pipeline by pushing an update to the Git repository where the application code is stored. Or, in some cases, we may trigger the pipeline manually if needed. In the first two stages, we'll put any required libraries in place and do a sanity check. We'll scan our code against Python linters, and run some unit tests to make sure the specification has been followed correctly. It makes sense to do these checks early in the pipeline to keep from building and deploying bad code. This is the integration part of our CICD pipeline. At this stage, we can also include additional tests that improve the quality of our application. We could run security tests by a scan for vulnerabilities or checking to make sure secrets like passwords or API keys have not been committed to the repository. In the third stage, we'll build the application. We'll bundle the contents of the working directory into a ZIP file and upload the ZIP to an S3 bucket. Then we'll trigger Elastic Beanstalk to store the bundle as a new version of our app. This step is the delivery portion of our CICD pipeline since we're making a new version available to deployed. And you might've guessed what comes next. Deployment. We'll use stages four and five to deploy our application to a staging environment. In this environment, we'll be able to run tests on the application before it goes live in production. If those tests pass, then our application will be ready for the big time. In the last stages of the pipeline, we can confidently deploy our application to a production environment. By this time, the code has been integrated, linted, tested at the unit level, built into a deliverable artifact, and deployed and tested in a staging environment. But just to make sure nothing went wrong, we'll run one more test on the live site. As you're viewing this course, you might already have a pipeline in mind that you're looking to implement. Just know that all the stages I've mentioned here might not apply to your project. But at the least, they should give you an idea of some of the building blocks of a typical CICD pipeline. Are you ready to explore? Let's get started.
- Key considerations in picking your stack
- The landscape of CI/CD tools
- Self-hosted options such as Jenkins and Bamboo
- SaaS tools such as Travis CI
- Using AWS CodePipeline and CodeBuild
- Tools for code repositories