Catalog / DevOps Deployment Tools Cheatsheet
DevOps Deployment Tools Cheatsheet
A comprehensive cheat sheet covering essential DevOps and Cloud deployment tools, their functionalities, and usage, with practical examples.
Ansible
Core Concepts
Ansible: An open-source automation tool used for configuration management, application deployment, task automation, and IT orchestration. |
Playbooks: YAML files that define the tasks to be executed on managed nodes. |
Inventory: A list of managed nodes (hosts) that Ansible manages, typically defined in a file. |
Modules: Reusable, standalone scripts that Ansible uses to perform tasks on managed nodes. |
Roles: A way to organize and reuse Ansible playbooks. Roles group together related tasks, variables, and handlers. |
Common Commands
|
Check the Ansible version. |
|
Ping all hosts in the inventory file. |
|
Run an Ansible playbook against the inventory. |
|
Install a role from Ansible Galaxy. |
|
Encrypt a file using Ansible Vault. |
Example Playbook
|
Terraform
Key Concepts
Terraform: An infrastructure as code (IaC) tool that enables you to define and provision infrastructure using a declarative configuration language. |
Providers: Plugins that allow Terraform to interact with different infrastructure platforms (e.g., AWS, Azure, GCP). |
Resources: Components of your infrastructure, such as virtual machines, networks, and databases. |
Modules: Reusable and composable units of Terraform configuration, similar to functions in programming. |
State: Terraform uses a state file to track the current configuration of your infrastructure. |
Common Commands
|
Initialize a Terraform working directory. |
|
Show changes required by the current configuration. |
|
Apply the changes to the infrastructure. |
|
Destroy the infrastructure managed by Terraform. |
|
Inspect the current Terraform state. |
Example Configuration
|
Kubernetes Deployments
Core Components
Deployment: Manages the desired state of your application by ensuring the specified number of replicas are running. |
Pod: The smallest deployable unit in Kubernetes, representing a single instance of a running process. |
Service: An abstraction that defines a logical set of Pods and a policy by which to access them. |
Namespace: A way to divide cluster resources between multiple users or teams. |
Ingress: Manages external access to the services in a cluster, typically via HTTP. |
Common kubectl Commands
|
Apply a configuration file to create or update resources. |
|
List all deployments in the current namespace. |
|
Show detailed information about a deployment. |
|
Scale the number of replicas in a deployment. |
|
Delete a deployment. |
Example Deployment YAML
|
Jenkins
Key Features
Jenkins: An open-source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery. |
Pipelines: Jenkins pipelines allow you to define your entire build, test, and deployment process as code. |
Plugins: Jenkins has a wide variety of plugins available to extend its functionality, such as integrations with source control systems, build tools, and deployment platforms. |
Jobs: Automated tasks or series of tasks defined within Jenkins to perform specific actions such as building or deploying applications. |
Nodes/Agents: Machines or containers that Jenkins uses to execute build jobs. |
Pipeline Syntax
|
Defines the overall pipeline structure. |
|
Specifies where the pipeline will execute (e.g., any node, a specific label). |
|
Defines the different stages of the pipeline. |
|
Contains the actual commands to execute in each stage. |
|
Defines actions to be performed after the pipeline, regardless of the outcome. |
Example Jenkinsfile
|