SlideShare a Scribd company logo
Using Ansible
as Makefiles
to unite your
developers
Ansible is mostly used for:
• Provisioning
• Configuration Management
• App Deployment
• Continuous Delivery
• Security & Compliance
• Orchestration

Application
Application
Frontend
Application
Backend
Frontend
Application
Backend
Frontend
Operations
Application
Backend
Frontend
Operations
Why Ansible
instead of
Makefiles?
Readability
BUILD_DIR=../build
# Clean old build(s)
clean:
rm -rf $(BUILD_DIR)
vars:
- build_dir: ../build

tasks:
- name: Clean old build(s)
file:
path: "{{ build_dir }}"
state: absent
Makefile Ansible
BUILD_DIR=../build

SRC_DIR=../src
# Copy all app files
copy-app:
cp -R $(SRC_DIR) $(BUILD_DIR)
vars:
- build_dir: ../build
- src_dir: ../src

tasks:
- name: Copy all app files
copy:
src: "{{ src_dir }}"
dest: "{{ build_dir }}"
Makefile Ansible
BUILD_DIR=../build
# Create symlink of local.xml
symlink-localxml:
ln -fs /path/to/local.xml 
$(BUILD_DIR)/local.xml
vars:
- build_dir: ../build

tasks:
- name: Create symlink of local.xml
file:
src: /path/to/local.xml
dest: "{{ build_dir }}/local.xml”
state: link
Makefile Ansible
BUILD_DIR=../build
SRC_DIR=../src
declare -A APP_DEPENDENCIES=
([“SRC”]=vendor [“DEST"]=vendor) 
([“SRC"]=node_modules/app.js [“DEST”]=js)
# Copy app dependencies (PHP & JS)
copy-dependencies:
for item in "$${!APP_DEPENDENCIES[@]}" ; do 
cp -rT --preserve=mode,timestamp,links 
”./$${item['SRC']}" 
“${BUILD_DIR}/$${item[‘DEST']}"; 
done
vars:
- build_dir: ../build
- app_dependencies:
- { src: vendor, dest: vendor }
- { src: node_modules/app.js, dest: js }

tasks:
- name: Copy app dependencies (PHP & JS)
copy:
src: "./{{ item.src }}"
dest: "{{ build_dir }}{{ item.dest }}"
follow: yes
with_items: app_dependencies
Makefile Ansible
Not sure if that works,
Makefiles are complex indeed ;D
BUILD_DIR=../build
SRC_DIR=../src
declare -A APP_DEPENDENCIES=
([“SRC"]=vendor ["DEST"]=vendor) 
(["SRC"]=node_modules/app.js ["DEST"]=js)
# Clean old build(s)
clean:
rm -rf $(BUILD_DIR)
# Copy all app files
copy-app:
cp -R $(SRC_DIR) $(BUILD_DIR)
# Create local.xml symlink
symlink-localxml:
ln -fs /path/to/local.xml 
$(BUILD_DIR)/local.xml
# Copy app dependencies (PHP & JS)
copy-dependencies:
for item in "$${!APP_DEPENDENCIES[@]}" ; do 
cp -rT --preserve=mode,timestamp,links 
”./$${item['SRC']}" 
“${BUILD_DIR}/$${item['DEST']}" ; 
done
vars:
- build_dir: ../build
- src_dir: ../src
- app_dependencies:
- { src: vendor, dest: vendor }
- { src: node_modules/app.js, dest: js }
tasks:
- name: Clean old build(s)
file:
path: "{{ build_dir }}"
state: absent
- name: Copy all app files
copy:
src: "{{ src_dir }}"
dest: "{{ build_dir }}"
- name: Create local.xml symlink
file:
src: /path/to/local.xml
dest: "{{ build_dir }}/local.xml”
state: link
- name: Copy app dependencies (PHP & JS)
copy:
src: "./{{ item.src }}"
dest: "{{ build_dir }}{{ item.dest }}"
follow: yes
with_items: app_dependencies
Makefile Ansible
Questions ?
Thank you ;D
@thiagoalessio
github.com/thiagoalessio

More Related Content

What's hot

Flask-RESTPlusで便利なREST API開発 | Productive RESTful API development with Flask-...
Flask-RESTPlusで便利なREST API開発 | Productive RESTful API development with Flask-...Flask-RESTPlusで便利なREST API開発 | Productive RESTful API development with Flask-...
Flask-RESTPlusで便利なREST API開発 | Productive RESTful API development with Flask-...
Akira Tsuruda
 
Cocoa on-rails-3rd
Cocoa on-rails-3rdCocoa on-rails-3rd
Cocoa on-rails-3rd
Xiaochun Shen
 
Dev streams2
Dev streams2Dev streams2
Dev streams2
David Mc Donagh
 
Building RESTful APIs w/ Grape
Building RESTful APIs w/ GrapeBuilding RESTful APIs w/ Grape
Building RESTful APIs w/ Grape
Daniel Doubrovkine
 
What's New in v2 - AnsibleFest London 2015
What's New in v2 - AnsibleFest London 2015What's New in v2 - AnsibleFest London 2015
What's New in v2 - AnsibleFest London 2015
jimi-c
 
REST API for your WP7 App
REST API for your WP7 AppREST API for your WP7 App
REST API for your WP7 App
Agnius Paradnikas
 
HTML5 addressbook
HTML5 addressbookHTML5 addressbook
HTML5 addressbook
Anbarasan Gangadaran
 
Running Docker on AWS
Running Docker on AWSRunning Docker on AWS
Running Docker on AWS
Nils De Moor
 
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
Amazon Web Services
 
Xcode Server & Xcode 7 Bots
Xcode Server & Xcode 7 Bots Xcode Server & Xcode 7 Bots
Xcode Server & Xcode 7 Bots
Steven Forbes
 
Building an API using Grape
Building an API using GrapeBuilding an API using Grape
Building an API using Grape
visnu priya
 
Try using Aeromock by Marverick, Inc.
Try using Aeromock by Marverick, Inc.Try using Aeromock by Marverick, Inc.
Try using Aeromock by Marverick, Inc.
scalaconfjp
 
20180618 wwdc cherrypick_xcode10beta
20180618 wwdc cherrypick_xcode10beta20180618 wwdc cherrypick_xcode10beta
20180618 wwdc cherrypick_xcode10beta
トニー 森田
 
Class.devops.chapter.1.intro
Class.devops.chapter.1.introClass.devops.chapter.1.intro
Class.devops.chapter.1.intro
Ross Tang
 
Rails 3.1 sneak peak
Rails 3.1 sneak peakRails 3.1 sneak peak
Rails 3.1 sneak peak
Oleg Kossoy
 
Windows Containers - Microsoft Ignite The Tour
Windows Containers - Microsoft Ignite The TourWindows Containers - Microsoft Ignite The Tour
Windows Containers - Microsoft Ignite The Tour
Eran Stiller
 
Rails Engine Patterns
Rails Engine PatternsRails Engine Patterns
Rails Engine Patterns
Andy Maleh
 
Ultimate Productivity Tools
Ultimate Productivity ToolsUltimate Productivity Tools
Ultimate Productivity Tools
Amal Dev
 
Put a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastPut a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going Fast
OSCON Byrum
 
Elixir と Maru で REST API
Elixir と Maru で REST APIElixir と Maru で REST API
Elixir と Maru で REST API
Kohei Kimura
 

What's hot (20)

Flask-RESTPlusで便利なREST API開発 | Productive RESTful API development with Flask-...
Flask-RESTPlusで便利なREST API開発 | Productive RESTful API development with Flask-...Flask-RESTPlusで便利なREST API開発 | Productive RESTful API development with Flask-...
Flask-RESTPlusで便利なREST API開発 | Productive RESTful API development with Flask-...
 
Cocoa on-rails-3rd
Cocoa on-rails-3rdCocoa on-rails-3rd
Cocoa on-rails-3rd
 
Dev streams2
Dev streams2Dev streams2
Dev streams2
 
Building RESTful APIs w/ Grape
Building RESTful APIs w/ GrapeBuilding RESTful APIs w/ Grape
Building RESTful APIs w/ Grape
 
What's New in v2 - AnsibleFest London 2015
What's New in v2 - AnsibleFest London 2015What's New in v2 - AnsibleFest London 2015
What's New in v2 - AnsibleFest London 2015
 
REST API for your WP7 App
REST API for your WP7 AppREST API for your WP7 App
REST API for your WP7 App
 
HTML5 addressbook
HTML5 addressbookHTML5 addressbook
HTML5 addressbook
 
Running Docker on AWS
Running Docker on AWSRunning Docker on AWS
Running Docker on AWS
 
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
 
Xcode Server & Xcode 7 Bots
Xcode Server & Xcode 7 Bots Xcode Server & Xcode 7 Bots
Xcode Server & Xcode 7 Bots
 
Building an API using Grape
Building an API using GrapeBuilding an API using Grape
Building an API using Grape
 
Try using Aeromock by Marverick, Inc.
Try using Aeromock by Marverick, Inc.Try using Aeromock by Marverick, Inc.
Try using Aeromock by Marverick, Inc.
 
20180618 wwdc cherrypick_xcode10beta
20180618 wwdc cherrypick_xcode10beta20180618 wwdc cherrypick_xcode10beta
20180618 wwdc cherrypick_xcode10beta
 
Class.devops.chapter.1.intro
Class.devops.chapter.1.introClass.devops.chapter.1.intro
Class.devops.chapter.1.intro
 
Rails 3.1 sneak peak
Rails 3.1 sneak peakRails 3.1 sneak peak
Rails 3.1 sneak peak
 
Windows Containers - Microsoft Ignite The Tour
Windows Containers - Microsoft Ignite The TourWindows Containers - Microsoft Ignite The Tour
Windows Containers - Microsoft Ignite The Tour
 
Rails Engine Patterns
Rails Engine PatternsRails Engine Patterns
Rails Engine Patterns
 
Ultimate Productivity Tools
Ultimate Productivity ToolsUltimate Productivity Tools
Ultimate Productivity Tools
 
Put a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastPut a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going Fast
 
Elixir と Maru で REST API
Elixir と Maru で REST APIElixir と Maru で REST API
Elixir と Maru で REST API
 

Similar to Using Ansible as Makefiles to unite your developers

What makes me "Grunt"?
What makes me "Grunt"? What makes me "Grunt"?
What makes me "Grunt"?
Fabien Doiron
 
Complet vector.dep.inc# This code depends on make tool being .docx
Complet vector.dep.inc# This code depends on make tool being .docxComplet vector.dep.inc# This code depends on make tool being .docx
Complet vector.dep.inc# This code depends on make tool being .docx
ardhowp
 
Dethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.jsDethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.js
Jay Harris
 
DCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best PracticesDCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best Practices
Docker, Inc.
 
Deploying Your Webapps (with Capistrano)
Deploying Your Webapps (with Capistrano)Deploying Your Webapps (with Capistrano)
Deploying Your Webapps (with Capistrano)
David Underwood
 
Container Support in IBM Spectrum LSF
Container Support in IBM Spectrum LSFContainer Support in IBM Spectrum LSF
Container Support in IBM Spectrum LSF
Gabor Samu
 
Head First Zend Framework - Part 1 Project & Application
Head First Zend Framework - Part 1 Project & ApplicationHead First Zend Framework - Part 1 Project & Application
Head First Zend Framework - Part 1 Project & Application
Jace Ju
 
DockerCon EU 2018 - Dockerfile Best Practices
DockerCon EU 2018 - Dockerfile Best PracticesDockerCon EU 2018 - Dockerfile Best Practices
DockerCon EU 2018 - Dockerfile Best Practices
Tibor Vass
 
DCEU 18: Dockerfile Best Practices
DCEU 18: Dockerfile Best PracticesDCEU 18: Dockerfile Best Practices
DCEU 18: Dockerfile Best Practices
Docker, Inc.
 
Ruby on Rails and Docker - Why should I care?
Ruby on Rails and Docker - Why should I care?Ruby on Rails and Docker - Why should I care?
Ruby on Rails and Docker - Why should I care?
Adam Hodowany
 
Ant
AntAnt
Scaling up development of a modular code base
Scaling up development of a modular code baseScaling up development of a modular code base
Scaling up development of a modular code base
Robert Munteanu
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
Leo Lorieri
 
Ruby on Rails - Introduction
Ruby on Rails - IntroductionRuby on Rails - Introduction
Ruby on Rails - Introduction
Vagmi Mudumbai
 
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.jsNode Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
Chris Bailey
 
Codefresh + Cloud 66 webinar: Testing Strategies for Docker Driven Development
Codefresh + Cloud 66 webinar: Testing Strategies for Docker Driven DevelopmentCodefresh + Cloud 66 webinar: Testing Strategies for Docker Driven Development
Codefresh + Cloud 66 webinar: Testing Strategies for Docker Driven Development
Codefresh
 
London Node.js User Group - Cloud-native Node.js
London Node.js User Group - Cloud-native Node.jsLondon Node.js User Group - Cloud-native Node.js
London Node.js User Group - Cloud-native Node.js
Bethany Nicolle Griggs
 
Makefiles in 2020 — Why they still matter
Makefiles in 2020 — Why they still matterMakefiles in 2020 — Why they still matter
Makefiles in 2020 — Why they still matter
Simon Brüggen
 
Single Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle StorySingle Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle Story
Kon Soulianidis
 
Provisioning, deploying and debugging node.js applications on azure
Provisioning, deploying and debugging node.js applications on azureProvisioning, deploying and debugging node.js applications on azure
Provisioning, deploying and debugging node.js applications on azure
Patriek van Dorp
 

Similar to Using Ansible as Makefiles to unite your developers (20)

What makes me "Grunt"?
What makes me "Grunt"? What makes me "Grunt"?
What makes me "Grunt"?
 
Complet vector.dep.inc# This code depends on make tool being .docx
Complet vector.dep.inc# This code depends on make tool being .docxComplet vector.dep.inc# This code depends on make tool being .docx
Complet vector.dep.inc# This code depends on make tool being .docx
 
Dethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.jsDethroning Grunt: Simple and Effective Builds with gulp.js
Dethroning Grunt: Simple and Effective Builds with gulp.js
 
DCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best PracticesDCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best Practices
 
Deploying Your Webapps (with Capistrano)
Deploying Your Webapps (with Capistrano)Deploying Your Webapps (with Capistrano)
Deploying Your Webapps (with Capistrano)
 
Container Support in IBM Spectrum LSF
Container Support in IBM Spectrum LSFContainer Support in IBM Spectrum LSF
Container Support in IBM Spectrum LSF
 
Head First Zend Framework - Part 1 Project & Application
Head First Zend Framework - Part 1 Project & ApplicationHead First Zend Framework - Part 1 Project & Application
Head First Zend Framework - Part 1 Project & Application
 
DockerCon EU 2018 - Dockerfile Best Practices
DockerCon EU 2018 - Dockerfile Best PracticesDockerCon EU 2018 - Dockerfile Best Practices
DockerCon EU 2018 - Dockerfile Best Practices
 
DCEU 18: Dockerfile Best Practices
DCEU 18: Dockerfile Best PracticesDCEU 18: Dockerfile Best Practices
DCEU 18: Dockerfile Best Practices
 
Ruby on Rails and Docker - Why should I care?
Ruby on Rails and Docker - Why should I care?Ruby on Rails and Docker - Why should I care?
Ruby on Rails and Docker - Why should I care?
 
Ant
AntAnt
Ant
 
Scaling up development of a modular code base
Scaling up development of a modular code baseScaling up development of a modular code base
Scaling up development of a modular code base
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Ruby on Rails - Introduction
Ruby on Rails - IntroductionRuby on Rails - Introduction
Ruby on Rails - Introduction
 
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.jsNode Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
 
Codefresh + Cloud 66 webinar: Testing Strategies for Docker Driven Development
Codefresh + Cloud 66 webinar: Testing Strategies for Docker Driven DevelopmentCodefresh + Cloud 66 webinar: Testing Strategies for Docker Driven Development
Codefresh + Cloud 66 webinar: Testing Strategies for Docker Driven Development
 
London Node.js User Group - Cloud-native Node.js
London Node.js User Group - Cloud-native Node.jsLondon Node.js User Group - Cloud-native Node.js
London Node.js User Group - Cloud-native Node.js
 
Makefiles in 2020 — Why they still matter
Makefiles in 2020 — Why they still matterMakefiles in 2020 — Why they still matter
Makefiles in 2020 — Why they still matter
 
Single Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle StorySingle Page JavaScript WebApps... A Gradle Story
Single Page JavaScript WebApps... A Gradle Story
 
Provisioning, deploying and debugging node.js applications on azure
Provisioning, deploying and debugging node.js applications on azureProvisioning, deploying and debugging node.js applications on azure
Provisioning, deploying and debugging node.js applications on azure
 

Recently uploaded

一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
kgyxske
 
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
dhavalvaghelanectarb
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
What is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdfWhat is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdf
kalichargn70th171
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
gapen1
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
kalichargn70th171
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
Upturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in NashikUpturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in Nashik
Upturn India Technologies
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
Zycus
 
Building API data products on top of your real-time data infrastructure
Building API data products on top of your real-time data infrastructureBuilding API data products on top of your real-time data infrastructure
Building API data products on top of your real-time data infrastructure
confluent
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
ervikas4
 
Microsoft-Power-Platform-Adoption-Planning.pptx
Microsoft-Power-Platform-Adoption-Planning.pptxMicrosoft-Power-Platform-Adoption-Planning.pptx
Microsoft-Power-Platform-Adoption-Planning.pptx
jrodriguezq3110
 
Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
Pedro J. Molina
 
Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.
KrishnaveniMohan1
 
Ensuring Efficiency and Speed with Practical Solutions for Clinical Operations
Ensuring Efficiency and Speed with Practical Solutions for Clinical OperationsEnsuring Efficiency and Speed with Practical Solutions for Clinical Operations
Ensuring Efficiency and Speed with Practical Solutions for Clinical Operations
OnePlan Solutions
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
michniczscribd
 
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data PlatformAlluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio, Inc.
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
kalichargn70th171
 
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
OnePlan Solutions
 

Recently uploaded (20)

一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
 
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
What is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdfWhat is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdf
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
Upturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in NashikUpturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in Nashik
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
 
Building API data products on top of your real-time data infrastructure
Building API data products on top of your real-time data infrastructureBuilding API data products on top of your real-time data infrastructure
Building API data products on top of your real-time data infrastructure
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
 
Microsoft-Power-Platform-Adoption-Planning.pptx
Microsoft-Power-Platform-Adoption-Planning.pptxMicrosoft-Power-Platform-Adoption-Planning.pptx
Microsoft-Power-Platform-Adoption-Planning.pptx
 
Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
 
Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.
 
Ensuring Efficiency and Speed with Practical Solutions for Clinical Operations
Ensuring Efficiency and Speed with Practical Solutions for Clinical OperationsEnsuring Efficiency and Speed with Practical Solutions for Clinical Operations
Ensuring Efficiency and Speed with Practical Solutions for Clinical Operations
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
 
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data PlatformAlluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
 
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
 

Using Ansible as Makefiles to unite your developers

  • 1. Using Ansible as Makefiles to unite your developers
  • 2. Ansible is mostly used for: • Provisioning • Configuration Management • App Deployment • Continuous Delivery • Security & Compliance • Orchestration

  • 8.
  • 9.
  • 10.
  • 13. BUILD_DIR=../build # Clean old build(s) clean: rm -rf $(BUILD_DIR) vars: - build_dir: ../build
 tasks: - name: Clean old build(s) file: path: "{{ build_dir }}" state: absent Makefile Ansible
  • 14. BUILD_DIR=../build
 SRC_DIR=../src # Copy all app files copy-app: cp -R $(SRC_DIR) $(BUILD_DIR) vars: - build_dir: ../build - src_dir: ../src
 tasks: - name: Copy all app files copy: src: "{{ src_dir }}" dest: "{{ build_dir }}" Makefile Ansible
  • 15. BUILD_DIR=../build # Create symlink of local.xml symlink-localxml: ln -fs /path/to/local.xml $(BUILD_DIR)/local.xml vars: - build_dir: ../build
 tasks: - name: Create symlink of local.xml file: src: /path/to/local.xml dest: "{{ build_dir }}/local.xml” state: link Makefile Ansible
  • 16. BUILD_DIR=../build SRC_DIR=../src declare -A APP_DEPENDENCIES= ([“SRC”]=vendor [“DEST"]=vendor) ([“SRC"]=node_modules/app.js [“DEST”]=js) # Copy app dependencies (PHP & JS) copy-dependencies: for item in "$${!APP_DEPENDENCIES[@]}" ; do cp -rT --preserve=mode,timestamp,links ”./$${item['SRC']}" “${BUILD_DIR}/$${item[‘DEST']}"; done vars: - build_dir: ../build - app_dependencies: - { src: vendor, dest: vendor } - { src: node_modules/app.js, dest: js }
 tasks: - name: Copy app dependencies (PHP & JS) copy: src: "./{{ item.src }}" dest: "{{ build_dir }}{{ item.dest }}" follow: yes with_items: app_dependencies Makefile Ansible Not sure if that works, Makefiles are complex indeed ;D
  • 17. BUILD_DIR=../build SRC_DIR=../src declare -A APP_DEPENDENCIES= ([“SRC"]=vendor ["DEST"]=vendor) (["SRC"]=node_modules/app.js ["DEST"]=js) # Clean old build(s) clean: rm -rf $(BUILD_DIR) # Copy all app files copy-app: cp -R $(SRC_DIR) $(BUILD_DIR) # Create local.xml symlink symlink-localxml: ln -fs /path/to/local.xml $(BUILD_DIR)/local.xml # Copy app dependencies (PHP & JS) copy-dependencies: for item in "$${!APP_DEPENDENCIES[@]}" ; do cp -rT --preserve=mode,timestamp,links ”./$${item['SRC']}" “${BUILD_DIR}/$${item['DEST']}" ; done vars: - build_dir: ../build - src_dir: ../src - app_dependencies: - { src: vendor, dest: vendor } - { src: node_modules/app.js, dest: js } tasks: - name: Clean old build(s) file: path: "{{ build_dir }}" state: absent - name: Copy all app files copy: src: "{{ src_dir }}" dest: "{{ build_dir }}" - name: Create local.xml symlink file: src: /path/to/local.xml dest: "{{ build_dir }}/local.xml” state: link - name: Copy app dependencies (PHP & JS) copy: src: "./{{ item.src }}" dest: "{{ build_dir }}{{ item.dest }}" follow: yes with_items: app_dependencies Makefile Ansible