SlideShare a Scribd company logo
2
Most read
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

PDF
Creating custom themes in AtoM
PDF
Web development automatisation for fun and profit (Artem Daniliants)
PPT
Learn flask in 90mins
PDF
Create your own composer package
PDF
Build website in_django
PDF
Quick flask an intro to flask
KEY
LvivPy - Flask in details
PDF
Maven 3.0 at Øredev
Creating custom themes in AtoM
Web development automatisation for fun and profit (Artem Daniliants)
Learn flask in 90mins
Create your own composer package
Build website in_django
Quick flask an intro to flask
LvivPy - Flask in details
Maven 3.0 at Øredev

What's hot (20)

PDF
Flask Introduction - Python Meetup
PPT
Learn Dashing Widget in 90 minutes
PDF
Behaviour Driven Development con Behat & Drupal
PDF
Dependency management with Composer
PDF
backend
PDF
Drupal 8 - Corso frontend development
KEY
Doing Things the WordPress Way
PPT
Apache Ant
PPTX
Installing and running Postfix within a docker container from the command line
PPTX
Dockerizing WordPress
PDF
PPTX
WordPress Structure and Best Practices
PPTX
ADF in action 1.2
PPTX
KEY
Php Power Tools
PDF
Creating Your First WordPress Plugin
PPT
Migraine Drupal - syncing your staging and live sites
PDF
Introduction to Drupal - Installation, Anatomy, Terminologies
PDF
Python Flask app deployed to OPenShift using Wercker CI
PPTX
Web components Introduction
Flask Introduction - Python Meetup
Learn Dashing Widget in 90 minutes
Behaviour Driven Development con Behat & Drupal
Dependency management with Composer
backend
Drupal 8 - Corso frontend development
Doing Things the WordPress Way
Apache Ant
Installing and running Postfix within a docker container from the command line
Dockerizing WordPress
WordPress Structure and Best Practices
ADF in action 1.2
Php Power Tools
Creating Your First WordPress Plugin
Migraine Drupal - syncing your staging and live sites
Introduction to Drupal - Installation, Anatomy, Terminologies
Python Flask app deployed to OPenShift using Wercker CI
Web components Introduction
Ad

Similar to Installing AtoM with Ansible (20)

PPTX
SESSION Ansible how to deploy and push resources
PPTX
Introduction to ansible
PDF
Ansible - Introduction
PDF
#OktoCampus - Workshop : An introduction to Ansible
PPTX
Ansible as configuration management tool for devops
PPTX
Mastering_Ansible_PAnsible_Presentation our score increases as you pick a
PDF
Ansible 101 - Presentation at Ansible STL Meetup
PPTX
Go Faster with Ansible (PHP meetup)
PDF
Ansible 202 - sysarmy
PDF
Getting Started with Ansible - Jake.pdf
PDF
Introduction to Ansible in RHEL- RHCE.pdf
PDF
Ansible
PPTX
Intro to-ansible-sep7-meetup
PDF
Getting Started with Ansible
PPTX
Deploying Symfony2 app with Ansible
PDF
Configuration management I - Ansible + Packer
PDF
Ansible is the simplest way to automate. MoldCamp, 2015
PPTX
Ansible Hands On
PDF
Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...
PDF
Ansible 202
SESSION Ansible how to deploy and push resources
Introduction to ansible
Ansible - Introduction
#OktoCampus - Workshop : An introduction to Ansible
Ansible as configuration management tool for devops
Mastering_Ansible_PAnsible_Presentation our score increases as you pick a
Ansible 101 - Presentation at Ansible STL Meetup
Go Faster with Ansible (PHP meetup)
Ansible 202 - sysarmy
Getting Started with Ansible - Jake.pdf
Introduction to Ansible in RHEL- RHCE.pdf
Ansible
Intro to-ansible-sep7-meetup
Getting Started with Ansible
Deploying Symfony2 app with Ansible
Configuration management I - Ansible + Packer
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible Hands On
Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...
Ansible 202
Ad

More from Artefactual Systems - AtoM (20)

PDF
Artefactual AtoM Priorities November 2024
PPTX
CSV import in AtoM
PPTX
Things I wish I'd known - AtoM tips, tricks, and gotchas
PDF
AtoM Community Update: 2019-05
PPTX
Creating your own AtoM demo data set for re-use with Vagrant
PPTX
Searching in AtoM
PPTX
Building the Future Together: AtoM3, Governance, and the Sustainability of Op...
PPTX
AtoM Implementations
PPTX
AtoM Data Migrations
PPTX
Looking Ahead: AtoM's governance, development, and future
PPTX
Contributing to the AtoM documentation
PDF
AtoM feature development
PDF
Constructing SQL queries for AtoM
PDF
Installing and Upgrading AtoM
PDF
Get to Know AtoM's Codebase
PPTX
AtoM's Command Line Tasks - An Introduction
PPTX
Command-Line 101
PPTX
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
PPTX
An Introduction to AtoM, Archivematica, and Artefactual Systems
PDF
National Archives of Norway - AtoM and Archivematica intro workshop
Artefactual AtoM Priorities November 2024
CSV import in AtoM
Things I wish I'd known - AtoM tips, tricks, and gotchas
AtoM Community Update: 2019-05
Creating your own AtoM demo data set for re-use with Vagrant
Searching in AtoM
Building the Future Together: AtoM3, Governance, and the Sustainability of Op...
AtoM Implementations
AtoM Data Migrations
Looking Ahead: AtoM's governance, development, and future
Contributing to the AtoM documentation
AtoM feature development
Constructing SQL queries for AtoM
Installing and Upgrading AtoM
Get to Know AtoM's Codebase
AtoM's Command Line Tasks - An Introduction
Command-Line 101
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
An Introduction to AtoM, Archivematica, and Artefactual Systems
National Archives of Norway - AtoM and Archivematica intro workshop

Recently uploaded (20)

PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Machine learning based COVID-19 study performance prediction
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPT
Teaching material agriculture food technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Big Data Technologies - Introduction.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Electronic commerce courselecture one. Pdf
PPTX
Cloud computing and distributed systems.
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Machine learning based COVID-19 study performance prediction
Agricultural_Statistics_at_a_Glance_2022_0.pdf
cuic standard and advanced reporting.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Teaching material agriculture food technology
Network Security Unit 5.pdf for BCA BBA.
Big Data Technologies - Introduction.pptx
Spectral efficient network and resource selection model in 5G networks
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Electronic commerce courselecture one. Pdf
Cloud computing and distributed systems.
The AUB Centre for AI in Media Proposal.docx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

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