AWS regions & availability zones
EC2 autoscaling
helps you maintain application availability and allows you to automatically add or remove EC2 instances according to conditions you define
benefits:
groups: collections of EC2 instances with similar charcteristics
launch configuration: template used by auto scaling group to launch EC2 instances
Git flow & Branching
branching: a reference to commit, branch itself represents the HEAD of a series of commits
- default branch name in Git is master, which commonly represents the official, working version of your project
- a strategy that allows developers to take a snapshot of the master branch and test a new feature without corrupting the project in production. If the tests are successful, that feature can be merged back to the master branch and pushed to production.
virtual machines
simulate a physical server so that multiple “servers” can run on a single machine
Pros:
near total isolation
Provides virtualization, virtualizing the entire OS
Ensures an application runs reliably regardless of Host
Cons:
considered “bulky”, expensive in the context of resources
containers
bundle together applications with their supporting libraries and dependencies, allowing them to run isolated from one another
Pros:
Cons:
containerization
helps to ensure the application or set of processes can run reliably regardless of the host environment
managing containers
docker architecture
dockerfile
Defines everything needed for an image. It outlines the starting point, dependencies and commands that make up all the processes needed for an image and in turn a container.
docker volumes
a way to persist data for a container
They facillitate:
docker best practices
dockerfile commands
FROM image name: specifies the parent image from which the new image should be based
RUN: used to set up image
ADD : adds files from build context or url to the image
COPY : adds files from the build context to the image
EXPOSE: outlines the ports that the are being listened on by processes in the container
VOLUME [“/nameofdir”]: indicates what directory to connect a volume to when running the docker container
WORKDIR : sets the working directory in the image and eventual container of commands that follow
CMD: used to run the app, processes etc. needed inside of your container
building an image
create image with build: “> docker build anyflags PATH”
create image with commit: “> docker commit flags CONTAINER imagename”
image management: “docker images”
creating containers
> docker create imagename - creates a container that is in the “created” state
docker run flags imagename - pulls the image from the registry, then creates and runs the container
docker compose
the tool that makes creating and managing multi-container applications easier.
file components: version services: image, build, ports, environment, env_file, restart volumes networks
DevOps
steps:
Agile
approach to SDLC that is based on iterative development; wherein, requirements, solutions and systems evolve throughout the production of software, and collaboration between cross-functional teams. Due to its flexibility Agile is considered the standard for development.
Benefits of Agile:
Risks/Considerations:
- Not as useful for smaller development projects
- Generally there are higher costs associated with an Agile workflow
- Development time can bloat if managed improperly or requirements are not clear during each step of the development
Requires more experienced members during the planning and management of projects
continuous integration
process of regularly and consistently merging code into a central repository and reviewing new code to ensure that it integrates well within the previously established code base.
benefits:
continuous deployment
process of releasing software in which changes are tested for stability and correctness automatically
Costs/Risks of Continuous Deployment:
Benefits of Continuous Deployment:
continuous delivery
paradigm in which the building, management and testing of produced software is automated such that deployments can be performed at the push of a button.
Benefits of Continuous Delivery:
Costs/Considerations of Continuous Delivery:
Jenkins
Disadvantages of Jenkins: - Requires custom jenkinsfile syntax for pipeline configuration Advantages of Jenkins: - Completely Open Source - Free - Supports all Operating systems - Supports all source code repositories
Jenkins projects/jobs and builds
Each job is a repeatable set of steps that automate a task, such as building, testing, and deploying your software. When a job is triggered, Jenkins creates a build of the project.
Maven review
default maven lifecycle is:
Validate => project is correct and all necessary information is available
Compile => compiles project source code
Test => tests all compiled code
Package => packages all compiled code to WAR/JAR file
Integration => performs all integration tests on WAR/JAR
Verify => runs checks on the results of integration tests
Install => installs WAR/JAR to local repository
Deploy => copies final WAR/JAR to the remote repositor
Sonar