SlideShare a Scribd company logo
1 of 4
Download to read offline
AtoM Camp: Installing AtoM with Ansible 
Document author​: David Juhasz
Date and time:​ Tuesday, 09 May 2017, 1pm - 2pm
Instructor: ​Steve Breker
1. Quick overview of Ansible
○ Automation and orchestration - like Chef, Puppet
○ FOSS, Project now managed and copyrighted by RedHat
○ Written in python and PowerShell
○ Agentless structure - ​no​ minimal software required on installation nodes (python
is​ required)
○ Idempotent (unless you do it wrong)
○ Uses SSH for secure connection and communication with remotes
○ Config uses ​YAML​ and ​Jinja templates​.
2. Install ansible
○ Centos/Redhat:
$ sudo yum install ansible
○ Ubuntu/Debian:
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt-get update
$ sudo apt-get install ansible
○ MacOSX: Install with pip
$ sudo pip install ansible
○ Windows: not supported (for control machine)
3. Clone ​https://github.com/djjuhasz/deploy-pub/tree/dev/add-ufw-role
$ git clone -b dev/atomcamp-deploy 
​git@github.com​:djjuhasz/deploy-pub.git
$ cd deploy-pub/playbooks/atom-xenial/
4. Overview of ansible directory structure and file types:
○ No hard and fast rules as far as I can tell. There are many variations on the
“recommended” directory structure shown below.
production # inventory file for production servers
staging # inventory file for staging environment
group_vars/
group1 # here we assign variables to particular
group2 # groups
host_vars/
hostname1 # if systems need specific variables, put
hostname2 # them here
library/ # if any custom modules, put them here
(optional)
filter_plugins/ # if any custom filter plugins, put them here
(optional)
site.yml # master playbook
webservers.yml # playbook for webserver tier
dbservers.yml # playbook for dbserver tier
roles/
common/ # this hierarchy represents a "role"
tasks/ #
main.yml # <-- tasks file can include smaller files
if warranted
handlers/ #
main.yml # <-- handlers file
templates/ # <-- files for use with the template
resource
ntp.conf.j2 # <------- templates end in .j2
files/ #
bar.txt # <-- files for use with the copy resource
foo.sh # <-- script files for use with the script
resource
vars/ #
main.yml # <-- variables associated with this role
defaults/ #
main.yml # <-- default lower priority variables for
this role
meta/ #
main.yml # <-- role dependencies
library/ # roles can also include custom modules
lookup_plugins/ # or other types of plugins, like lookup in
this case
○ playbook ​- top level of ansible script hierarchy - a collection of roles that are run
again a set of hosts.
○ roles - ​second level script files used to define a set of steps for deploying for a
particular “role” (e.g. atom, elasticsearch, mysql).
■ Roles can be defined locally, or can be linked and downloaded via a
“requirements.yml” file.
■ Roles can all be deployed to one host or split among multiple hosts.
■ Include tasks, handlers, variable files and more.
○ tasks - ​third level of script file hierarchy. Smaller units of code, that define the
tasks required for a deployment (e.g. copy config file, restart php, install
imagemagick package)
○ blocks ​- a single command within a task file, using multiple lines to split up
parameters, calls, options, etc.
○ handlers​ - tasks that are run once no matter how many times they are called
(triggered by a “notify” block)
○ vars - ​variables for roles and tasks
○ defaults​ - defaults for variables and config settings; “vars” overwrite these
defaults.
○ templates​ - config file templates for installed apps. Written in “Jinja” templating
language (.j2)
○ meta​ - metadata about playbook (author, license, etc.)
5. Not included in “recommend” structure, but used in Artefactual playbooks
○ hosts.yml - ​inventory file. A list of host systems that can be targets for
deployment. Groups of hosts (e.g. “webservers”) can be used to target playbooks
to a number of hosts simultaneously (e.g. updating nginx for all webserver hosts).
○ requirements.yml - ​manifest file of roles required for a playbook.
○ LICENSE
○ README.md
6. Download remote roles
○ Many are from https://github.com/artefactual-labs
$ ansible-galaxy install -f -p roles/ -r requirements.yml
7. Edit local config variables
○ hosts.yml
[atom]
192.168.1.1
○ vars-singlenode.yml
8. Deploy!
$ ansible-playbook singlenode.yml 
--inventory-file="./hosts.yml" 
--user="root" 
​--extra-vars="atom_flush_data=yes"​ 
--verbose
9. Ansible ecosystem
○ Galaxy - community roles
○ Vault - At rest encryption of sensitive data
○ Tower - Paid GUI management and reporting tool
10. Questions and troubleshooting

More Related Content

What's hot

Dependency management with Composer
Dependency management with ComposerDependency management with Composer
Dependency management with Composer
Jason Grimes
 

What's hot (20)

Flask Introduction - Python Meetup
Flask Introduction - Python MeetupFlask Introduction - Python Meetup
Flask Introduction - Python Meetup
 
Learn Dashing Widget in 90 minutes
Learn Dashing Widget in 90 minutesLearn Dashing Widget in 90 minutes
Learn Dashing Widget in 90 minutes
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
Dependency management with Composer
Dependency management with ComposerDependency management with Composer
Dependency management with Composer
 
backend
backendbackend
backend
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend development
 
Doing Things the WordPress Way
Doing Things the WordPress WayDoing Things the WordPress Way
Doing Things the WordPress Way
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
Installing and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command lineInstalling and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command line
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPress
 
BPMS1
BPMS1BPMS1
BPMS1
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practices
 
ADF in action 1.2
ADF in action 1.2ADF in action 1.2
ADF in action 1.2
 
Flask
FlaskFlask
Flask
 
Php Power Tools
Php Power ToolsPhp Power Tools
Php Power Tools
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress Plugin
 
Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sites
 
Introduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, TerminologiesIntroduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, Terminologies
 
Python Flask app deployed to OPenShift using Wercker CI
Python Flask app deployed to OPenShift using Wercker CIPython Flask app deployed to OPenShift using Wercker CI
Python Flask app deployed to OPenShift using Wercker CI
 
Web components Introduction
Web components IntroductionWeb components Introduction
Web components Introduction
 

Similar to Installing AtoM with Ansible

Similar to Installing AtoM with Ansible (20)

Ansible intro
Ansible introAnsible intro
Ansible intro
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
 
Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)
 
Basics of Ansible - Sahil Davawala
Basics of Ansible - Sahil DavawalaBasics of Ansible - Sahil Davawala
Basics of Ansible - Sahil Davawala
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Introduction to Ansible - Peter Halligan
Introduction to Ansible - Peter HalliganIntroduction to Ansible - Peter Halligan
Introduction to Ansible - Peter Halligan
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
 
Ansible 202
Ansible 202Ansible 202
Ansible 202
 
Ppt
PptPpt
Ppt
 
ansible : Infrastructure automation,idempotent and more
ansible : Infrastructure automation,idempotent and moreansible : Infrastructure automation,idempotent and more
ansible : Infrastructure automation,idempotent and more
 
Automating with ansible (Part A)
Automating with ansible (Part A)Automating with ansible (Part A)
Automating with ansible (Part A)
 
Ansible - Introduction
Ansible - IntroductionAnsible - Introduction
Ansible - Introduction
 
Intro to-puppet
Intro to-puppetIntro to-puppet
Intro to-puppet
 
Lamp ppt
Lamp pptLamp ppt
Lamp ppt
 
Graphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosGraphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagios
 
Getting Started with Ansible - Jake.pdf
Getting Started with Ansible - Jake.pdfGetting Started with Ansible - Jake.pdf
Getting Started with Ansible - Jake.pdf
 
Managing PostgreSQL with Ansible - FOSDEM PGDay 2016
Managing PostgreSQL with Ansible - FOSDEM PGDay 2016Managing PostgreSQL with Ansible - FOSDEM PGDay 2016
Managing PostgreSQL with Ansible - FOSDEM PGDay 2016
 
linux installation.pdf
linux installation.pdflinux installation.pdf
linux installation.pdf
 
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
 

More from Artefactual Systems - AtoM

More from Artefactual Systems - AtoM (20)

CSV import in AtoM
CSV import in AtoMCSV import in AtoM
CSV import in AtoM
 
Things I wish I'd known - AtoM tips, tricks, and gotchas
Things I wish I'd known - AtoM tips, tricks, and gotchasThings I wish I'd known - AtoM tips, tricks, and gotchas
Things I wish I'd known - AtoM tips, tricks, and gotchas
 
AtoM Community Update: 2019-05
AtoM Community Update: 2019-05AtoM Community Update: 2019-05
AtoM Community Update: 2019-05
 
Creating your own AtoM demo data set for re-use with Vagrant
Creating your own AtoM demo data set for re-use with VagrantCreating your own AtoM demo data set for re-use with Vagrant
Creating your own AtoM demo data set for re-use with Vagrant
 
Searching in AtoM
Searching in AtoMSearching in AtoM
Searching in AtoM
 
Building the Future Together: AtoM3, Governance, and the Sustainability of Op...
Building the Future Together: AtoM3, Governance, and the Sustainability of Op...Building the Future Together: AtoM3, Governance, and the Sustainability of Op...
Building the Future Together: AtoM3, Governance, and the Sustainability of Op...
 
AtoM Implementations
AtoM ImplementationsAtoM Implementations
AtoM Implementations
 
AtoM Data Migrations
AtoM Data MigrationsAtoM Data Migrations
AtoM Data Migrations
 
Looking Ahead: AtoM's governance, development, and future
Looking Ahead: AtoM's governance, development, and futureLooking Ahead: AtoM's governance, development, and future
Looking Ahead: AtoM's governance, development, and future
 
Contributing to the AtoM documentation
Contributing to the AtoM documentationContributing to the AtoM documentation
Contributing to the AtoM documentation
 
AtoM feature development
AtoM feature developmentAtoM feature development
AtoM feature development
 
Constructing SQL queries for AtoM
Constructing SQL queries for AtoMConstructing SQL queries for AtoM
Constructing SQL queries for AtoM
 
Installing and Upgrading AtoM
Installing and Upgrading AtoMInstalling and Upgrading AtoM
Installing and Upgrading AtoM
 
Get to Know AtoM's Codebase
Get to Know AtoM's CodebaseGet to Know AtoM's Codebase
Get to Know AtoM's Codebase
 
AtoM's Command Line Tasks - An Introduction
AtoM's Command Line Tasks - An IntroductionAtoM's Command Line Tasks - An Introduction
AtoM's Command Line Tasks - An Introduction
 
Command-Line 101
Command-Line 101Command-Line 101
Command-Line 101
 
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
 
An Introduction to AtoM, Archivematica, and Artefactual Systems
An Introduction to AtoM, Archivematica, and Artefactual SystemsAn Introduction to AtoM, Archivematica, and Artefactual Systems
An Introduction to AtoM, Archivematica, and Artefactual Systems
 
National Archives of Norway - AtoM and Archivematica intro workshop
National Archives of Norway - AtoM and Archivematica intro workshopNational Archives of Norway - AtoM and Archivematica intro workshop
National Archives of Norway - AtoM and Archivematica intro workshop
 
Introducing Access to Memory
Introducing Access to MemoryIntroducing Access to Memory
Introducing Access to Memory
 

Recently uploaded

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Installing AtoM with Ansible

  • 1. AtoM Camp: Installing AtoM with Ansible  Document author​: David Juhasz Date and time:​ Tuesday, 09 May 2017, 1pm - 2pm Instructor: ​Steve Breker 1. Quick overview of Ansible ○ Automation and orchestration - like Chef, Puppet ○ FOSS, Project now managed and copyrighted by RedHat ○ Written in python and PowerShell ○ Agentless structure - ​no​ minimal software required on installation nodes (python is​ required) ○ Idempotent (unless you do it wrong) ○ Uses SSH for secure connection and communication with remotes ○ Config uses ​YAML​ and ​Jinja templates​. 2. Install ansible ○ Centos/Redhat: $ sudo yum install ansible ○ Ubuntu/Debian: $ sudo apt-get install software-properties-common $ sudo apt-add-repository ppa:ansible/ansible $ sudo apt-get update $ sudo apt-get install ansible ○ MacOSX: Install with pip $ sudo pip install ansible ○ Windows: not supported (for control machine) 3. Clone ​https://github.com/djjuhasz/deploy-pub/tree/dev/add-ufw-role $ git clone -b dev/atomcamp-deploy ​git@github.com​:djjuhasz/deploy-pub.git $ cd deploy-pub/playbooks/atom-xenial/ 4. Overview of ansible directory structure and file types: ○ No hard and fast rules as far as I can tell. There are many variations on the “recommended” directory structure shown below.
  • 2. production # inventory file for production servers staging # inventory file for staging environment group_vars/ group1 # here we assign variables to particular group2 # groups host_vars/ hostname1 # if systems need specific variables, put hostname2 # them here library/ # if any custom modules, put them here (optional) filter_plugins/ # if any custom filter plugins, put them here (optional) site.yml # master playbook webservers.yml # playbook for webserver tier dbservers.yml # playbook for dbserver tier roles/ common/ # this hierarchy represents a "role" tasks/ # main.yml # <-- tasks file can include smaller files if warranted handlers/ # main.yml # <-- handlers file templates/ # <-- files for use with the template resource ntp.conf.j2 # <------- templates end in .j2 files/ # bar.txt # <-- files for use with the copy resource foo.sh # <-- script files for use with the script resource vars/ # main.yml # <-- variables associated with this role defaults/ # main.yml # <-- default lower priority variables for this role meta/ # main.yml # <-- role dependencies library/ # roles can also include custom modules lookup_plugins/ # or other types of plugins, like lookup in this case ○ playbook ​- top level of ansible script hierarchy - a collection of roles that are run again a set of hosts. ○ roles - ​second level script files used to define a set of steps for deploying for a particular “role” (e.g. atom, elasticsearch, mysql).
  • 3. ■ Roles can be defined locally, or can be linked and downloaded via a “requirements.yml” file. ■ Roles can all be deployed to one host or split among multiple hosts. ■ Include tasks, handlers, variable files and more. ○ tasks - ​third level of script file hierarchy. Smaller units of code, that define the tasks required for a deployment (e.g. copy config file, restart php, install imagemagick package) ○ blocks ​- a single command within a task file, using multiple lines to split up parameters, calls, options, etc. ○ handlers​ - tasks that are run once no matter how many times they are called (triggered by a “notify” block) ○ vars - ​variables for roles and tasks ○ defaults​ - defaults for variables and config settings; “vars” overwrite these defaults. ○ templates​ - config file templates for installed apps. Written in “Jinja” templating language (.j2) ○ meta​ - metadata about playbook (author, license, etc.) 5. Not included in “recommend” structure, but used in Artefactual playbooks ○ hosts.yml - ​inventory file. A list of host systems that can be targets for deployment. Groups of hosts (e.g. “webservers”) can be used to target playbooks to a number of hosts simultaneously (e.g. updating nginx for all webserver hosts). ○ requirements.yml - ​manifest file of roles required for a playbook. ○ LICENSE ○ README.md 6. Download remote roles ○ Many are from https://github.com/artefactual-labs $ ansible-galaxy install -f -p roles/ -r requirements.yml 7. Edit local config variables ○ hosts.yml [atom] 192.168.1.1 ○ vars-singlenode.yml 8. Deploy! $ ansible-playbook singlenode.yml --inventory-file="./hosts.yml" --user="root" ​--extra-vars="atom_flush_data=yes"​ --verbose
  • 4. 9. Ansible ecosystem ○ Galaxy - community roles ○ Vault - At rest encryption of sensitive data ○ Tower - Paid GUI management and reporting tool 10. Questions and troubleshooting