This example uses a simple maven based webapp project.
For build use : mvn clean package
Development Team
GitHub
JENKINS MAVEN
SONATYPE NEXUS
ANSIBLE: open source automation tool for
-
Provisioning
- infrastructure provisioning: IAC (Terraform for data center; VPC, subnets, EC2, etc)
-
Config managment
- applying OS patches
- checking server
- installation of services
-
Application deployment
PLAYBOOKS - App deployment
- YAML format
- instructs ansible on what needs to be executed
- to do list for ansible
- Tasks are run sequentially
AGENTLESS: don't need to install on managed nodes DECLARITIVE/Can Be Procedural
- Declare what you want and don't think about how to get there
- Playbooks=declarative; Tasks=procedural
- Idempotent - can execute an application multiple times without changing
ansible [name-of-group] -m [module] -a [arguments] -i [inventory]
-
m perform actual tasks
-
a
-
i required if not using default host file at /etc/ansible
cd /opt
mkdir playbooks
sudo chown -R ansibleadmin:ansibleadmin playbooks/
cd playbooks
vim hosts :i [tomcat]
[tomcat] 172.20.10.135
[docker] 172.20.10.27