Is the name given to the general process of managing a changing software system
What is Configuration Management?
Support the system integration process so that all developers can:
access the project code and documents in a controlled way
find out what changes have been made
compile and link components to create a system
The aim of configuration management is to
(Continuous Integration/Continuous Delivery)
What does CI/CD stands for?
To be fully automated, with each run fully logged and visible to the entire team
The main goal of the CI/CD processes is
The bits and pieces of a microservices-based application to evolve and mature individually, reducing blockers.
CI/CD allows
continuous integration
continuous delivery
continuous deployment
The CI/CD pipeline involves
Cloud-native companies adopted a fairly extreme approach of
continuously improving their online services by having a fully automated process for building, testing, and deploying new code
The pipeline run is triggered by
a source code repository
The Build stage on CI/CD includes
The compilation of programs written in languages such as Java, C/C++, and Go
In the CI/CD Test stage, automated tests are run in order to
Validate the code and the application behavior.
Why is the Test stage an important stage?
Because it acts as a “safety net” to prevent easily reproducible bugs from being introduced.
Depending on the size and complexity of the project, the Test phase can last from
seconds to hours
What is Ansible?
is an open-source IT automation/ a configuration management tool
What does Ansible automates?
Application deployment
Cloud provisioning
Configuration management
configuration of multiple servers/networks/clouds
Who created Ansible?
Michael DeHaan
In witch year was ansible created?
2012
In witch language is Ansible written?
Python and Powershell
How does Ansible automates configuration?
By the use of Ansible playbooks
What are playbooks?
Ansible configuration, deployment and orchestration language, written in YAML
The ansible inventory file defines
The hosts and groups of hosts upon which commands, modules, and tasks in a playbook operate
What does Agentless means?
No client / server concept
What are some ansible features?
Simple to setup
Declarative
Idempoten
What does declarative means?
that a playbook does not require any knowledge of the current state of the server, only its desirable state
What does idempotent means?
That running the same "playbook" multiple times producces the same output/configuraiton
ssh-keygen is used to
Generate private and public keys on the control node
What command can you use to send public key to the ~/.ssh/authorized_keys file in the target node user home directory?
ssh-copy-id user@remotehost
What is the ansible command?
The main Ansible command to run ad-hoc commands on remote nodes
What is the ansible-playbook command?
A command to run playbooks
What is the ansible-pull command?
The main Ansible pull command
What is the ansible-doc command?
The ansible documentation program
What is the ansible-galaxy command?
An ansible Galaxy interaction program
What is the ansible-vault command?
The Ansible password vault
What is the ansible-inventory command?
A command to display or dump the inventory
What is the ansible-console command?
The Ansible interactive console against a chosen inventory
What is the ansible-config command?
A command to view, edit and manage configuration
How do you Transfer a file directly to multiple servers with Ansible?
ansible -i hosts local -m copy -a "src=/etc/hosts dest=/tmp/hosts"
How do you change ownership and permissions on files with Ansible?
ansible -i hosts local -m file -a "dest=/ansible/a.txt mode=600 owner=instructor group=instructor"
How do you delete directories (recursively) and delete files with Ansible?
ansible -i hosts local -m file -a "dest=/path/to/dir state=absent“
How do you ensure a package is installed, but don’t update it with ansible?
ansible -i hosts local -m apt -a "name=acme state=present"
You use -m on ansible to
Select an Ansible module to run the command against
you use -a on ansible to
provide options to the selected module
How do you ensure a package is at the latest version with ansible?
ansible -i hosts local -m apt -a "name=acme state=latest"
How do you ensure a package is not installed with ansible?
ansible -i hosts local -m apt -a "name=acme state=absent"
How do you create or manipulate an existing user account with ansible?
How do you gather discovered vars about remote hosts with ansible?
ansible all -m setup
How do you ensure a service is started on all web servers with ansible?
ansible -i hosts webservers -m service -a "name=httpd state=started"
How do you restart a service on all web servers with ansible?
ansible webservers -m service -a "name=httpd state=restarted"
How do you ensure a service is stopped with ansible?
ansible webservers -m service -a "name=httpd state=stopped“
How do you create a directory with ansible?
ansible local -i hosts -m ansible.builtin.file -a "path=/tmp/testfile1 state=touch mode=700"