SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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

Was ist angesagt? (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
 

Ähnlich wie Installing AtoM with Ansible

Ähnlich wie 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편 마운트 네임스페이스와 오버레이 파일시스템
 

Mehr von Artefactual Systems - AtoM

Mehr von 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
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 

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