DevOps
What is DevOps?
DevOps
- Creating automation for the entire build / test / release cycle
- Allow development, test and production environments to be built, tested and deployed easily and systematically
- Allow new components to be added automatically
- DevOps = Culture + Practices + Tools
Amazon's Case
Amazon.com Monolith -> Microservices
- develping faster than ever
- However, many teams were still being slowed down by manual processes and workflows
- Introduce automated actions and transitions
- faster, safer, consistent & standardized, visualization of the process
Five Major Phases of Software Release
Source > Build > Test > Deploy > Monitor
Source
- Checkin souce code, Peer Review
Build
- Compile code, Unit test, Style checkers, Code metrics
- Create container images
Test
- Integration test, Load test, UI test, Penestration test
Deploy
- Deployment to production environments
Monitor
- Monitor code in production
CI / CD
Continuous Integration (CI)
Continuous Integration (CI)
- integrating code from multiple developers into a central repository, multiple times per day
- continually validating the state of a codebase through automated testing
- ex, developers push code changes to Git repository, for every push you can create scripts to build and test automatically
- best achieved through integration with version control
- each change is built and tested automatically and continously
CI build consists of automated process:
- Run automatic code quality scan, and generate a report
- Build code and run any automated tests (mostly unit tests)
- Generate and publish a test coverage report
Continous Delivery (CD)
Continuous Delivery
- extension of continuous integration where code changes are automatically prepared for a release to production
- expands CI upon deploying code changes to testing environment and running test and so on after build stage
Continuous Deployment (CD)
Continuous Deployment
- every change is deployed to production automatically, without explicit approval from a developer
- building, testing, and releasing software faster and more frequently
- increase quality, reduce cycle time
- Build + test + deploy continuously
Continuous Delivery: 소프트웨어를 지속적으로 릴리스 가능한 상태로 유지
Continous Deployment: 소프트웨어 변경사항이 자동으로 프로덕션 환경에 배포
Benefits of CI/CD
Higher quality
- less bugs and are captured early by automated tests
- developers are alerted as soon as they break a build
Low risk releases
- integration issues have been solved early -> releasing is easire
- deploy small batches of changes -> easy to fix
Lower costs
- cost for fixing an issue in development phase is much lesser than in production
- testing codes are reduced significantly
Better products
- team can focus on what customers care about most - business logic, UX ..
Time to market faster
- eveyrthing is automated
- remove a large amount of re-work effort
- customers see continuous stream of improvements and quality increases every day
Happier team 🤔
- make releases are less painful
CI/CD Tools
- Jenkins is the most popular CI tools: open source, on-premise
Github Actions
GitHub Actions
- CI/CD platform that allows you to automate your build, test, and deployment pipeline
Componenets of Github Actions
Workflow
- configurable automated process that will run one or more jobs
- defined by a YAML file and will run when triggered by an event in your repository, or they can be triggered manually, or at a defined schedule
- .yml file in the
.github/workflows
directory
Event
- specific activity in a repository that triggers a workflow run
- activity can originate from GitHub when someone creates a pull request, open an issue, or pushes a commit to a repository
- you can also trigger a workflow to run on a schedule, by posting to a REST API, or manually
Job
- set of steps in workflow that is executed on the same runner
- each step is either a shell script that will be executed, or an action that will be run
- you can configure a job's dependencies with other jobs
- by default, jobs have no dependencies and run in parallel with each other
Action
- custom application that performs a complex but frequently repeated task
- use an action to help reduce the amount of repetitive code
- can pull your git repository from GitHub, set up correct toolchain for your build environment, or set up the authentication to your cloud provider
- you can write your own actions, or you can find actions to use in your workflows in the GitHub Marketplace
Runner
- runner is a server that runs your workflows when they're triggered
- each runner can run a single job at a time
- GitHub provides Ubuntu Linux, Microsoft Windows, and macOS runners
- each workflow run executes in a fresh, newly-provisioned virtual machine
'CS > 클라우드컴퓨팅' 카테고리의 다른 글
18. Cloud-Based AI (0) | 2023.12.09 |
---|---|
17. MapReduce (0) | 2023.12.08 |
15. Reliability and Availability (1) | 2023.12.07 |
14. Container (0) | 2023.12.07 |
12, 13. Virtualization (0) | 2023.12.07 |