SlideShare a Scribd company logo
Build & Deployment
Pascal Robert	

Druide informatique
Git
Git hooks
• Stored in .git/hooks	

• Hooks can be anything runnable	

• The useful ones: post-commit and post-receive	

• post-receive will receive branch reference
Git and remote
• Push changes to each deployment server	

• Have the post-receive script on each server	

• … or use branches and central Git repo
post-receive examples
#!/bin/bash	
!
while read oldrev newrev ref	
do	
if [[ $newrev == "0000000000000000000000000000000000000000" ]]; then	
exit 0	
fi	
!
branch=`echo $ref | cut -d/ -f3`	
umask 0022	
!
if [ ! -d /tmp/SimpleBlog ]; then	
git clone /Users/probert/SimpleBlog.git /tmp/SimpleBlog	
fi	
!
if [ $branch == "dev" ]; then	
ant -lib /opt/woproject.jar install	
fi	
fi
Submodules
• You could use Git submodules to build everything at the same
time
Puppet
Puppet ?
• Not about politicians, consumers or Metallica	

• Configuration management tool	

• Rapid deployment	

• Central point	

• Changes history	

• Standalone or client/server
Puppet
• Puppet uses recipes (modules)	

• Ruby-like declarative language	

• Works on UNIX/Linux, OS X and Windows	

• You can install packages, create user account, start services, etc.
Sample configuration
manifests/site.pp:	
!
node server.wocommunity.org {	
include wodeploy	
}	
!
modules/wodeploy/manifests/init.pp:	
!
package { ‘apache’:	
name => ‘httpd’,	
ensure => present	
}	
!
service { ‘httpd’:	
name => ‘httpd’,	
ensure => running,	
require => Package[‘apache’]	
}	
!
package { ‘wotaskd’:	
name => ‘wotaskd’,	
ensure => present	
}	
!
user { ‘appserver’:	
name => ‘appserver’	
ensure => present	
}
Puppet tips
• Use Git to store the configuration	

• Be modular	

• Use it!
Native Packages
Native packages
• Deploy with natives packages!	

• Can mix it with Puppet or Chef	

• Deploy from a central repository or manually
Ant RPM task
• Build a RPM package for RedHat-based Linux	

• Still need to write a SPEC file	

• Use it only if you really like Ant
fpm
• Ruby gem to create packages	

• .pkg/.deb/.rpm/Puppet!	

• Much more flexible than the Ant task
fpm in two steps
• gem install fpm	

• fpm --prefix /WOApps -a noarch —rpm-user _appserver --rpm-
os linux -t rpm -s dir -n SimpleBlog -v 1.0 SimpleBlog.woa
Activating the app
• Bundle a shell script inside the package	

• Use Puppet to install the package + restart the app
Puppet + RPM
package { ‘SimpleBlog’:	
source => ‘http://myserver/storage/SimpleBlog-1.0-1.rpm',	
name => ‘SimpleBlog’,	
ensure => ‘installed’	
}	
!
file { ‘wodeploy.py’: {	
source => ‘puppet:///modules/wotools/scripts/wodeploy.py',	
path => ‘/opt/bin/wodeploy.py’	
}	
!
exec { ‘run-wodeploy’	
command => ‘/opt/bin/wodeploy.py SimpleBlog’	
}
wodeploy.py
#!/usr/bin/python	
!
import json, urllib2, sys	
!
base_url = "http://mywotaskd:1085/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications"	
app_name = sys.argv[1]	
!
stop_instance = True	
response = json.load(urllib2.urlopen(base_url + ".json?type=app&name=" + app_name))	
if len(response) == 0:	
	 query = { 	
	 	 'id' : app_name,	
	 	 'type' : 'MApplication',	
	 	 'name' : app_name,	
	 	 'unixOutputPath' : '/opt/Local/Library/WebObjects/Logs',	
	 	 'unixPath' : '/opt/Local/Library/WebObjects/Applications/' + app_name + '.woa/' + app_name	
	 }	
	 	
	 query_as_json = json.dumps(query)	
	 request = urllib2.Request(base_url + ".json", query_as_json, {'Content-Type': 'application/json'})	
	 response = urllib2.urlopen(request)	
	 stop_instance = False	
	 	
if stop_instance:	
	 urllib2.urlopen(base_url + "/" + app_name + "/stop")	
!
urllib2.urlopen(base_url + "/" + app_name + "/start")
Large distribution
• Use a central repository	

• Use Puppet	

• … or both
Maven
Q&A
Ad

More Related Content

What's hot (19)

uWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web appsuWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web apps
Tomislav Raseta
 
Linuxday.at - Lightning Talk
Linuxday.at - Lightning TalkLinuxday.at - Lightning Talk
Linuxday.at - Lightning Talk
Jan Gehring
 
It Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software DevelopmentIt Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software Development
Carlos Perez
 
Helpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and DjangoHelpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and Django
roskakori
 
Vagrant to-aws-flow
Vagrant to-aws-flowVagrant to-aws-flow
Vagrant to-aws-flow
Kimberly Macias
 
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGIEuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
Max Tepkeev
 
Deploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleDeploying PHP Applications with Ansible
Deploying PHP Applications with Ansible
Orestes Carracedo
 
systemd @ Facebook -- a year later
systemd @ Facebook -- a year latersystemd @ Facebook -- a year later
systemd @ Facebook -- a year later
Davide Cavalca
 
Webinar - Auto-deploy Puppet Enterprise: Vagrant and Oscar
Webinar - Auto-deploy Puppet Enterprise: Vagrant and OscarWebinar - Auto-deploy Puppet Enterprise: Vagrant and Oscar
Webinar - Auto-deploy Puppet Enterprise: Vagrant and Oscar
OlinData
 
Vagrant: The Oscar Plug-in
Vagrant: The Oscar Plug-inVagrant: The Oscar Plug-in
Vagrant: The Oscar Plug-in
Jeff Scelza
 
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Puppet
 
Deploying Foreman in Enterprise Environments
Deploying Foreman in Enterprise EnvironmentsDeploying Foreman in Enterprise Environments
Deploying Foreman in Enterprise Environments
inovex GmbH
 
Vagrant presentation
Vagrant presentationVagrant presentation
Vagrant presentation
Mahmudur Rahman
 
Vagrant for Virtualized Development
Vagrant for Virtualized DevelopmentVagrant for Virtualized Development
Vagrant for Virtualized Development
Adam Culp
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
Michael Bahr
 
Ansible Oxford - Cows & Containers
Ansible Oxford - Cows & ContainersAnsible Oxford - Cows & Containers
Ansible Oxford - Cows & Containers
jonatanblue
 
Develop QNAP NAS App by Docker
Develop QNAP NAS App by DockerDevelop QNAP NAS App by Docker
Develop QNAP NAS App by Docker
Terry Chen
 
Vagrant-Overview
Vagrant-OverviewVagrant-Overview
Vagrant-Overview
Crifkin
 
Ansible & Vagrant
Ansible & VagrantAnsible & Vagrant
Ansible & Vagrant
Mukul Malhotra
 
uWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web appsuWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web apps
Tomislav Raseta
 
Linuxday.at - Lightning Talk
Linuxday.at - Lightning TalkLinuxday.at - Lightning Talk
Linuxday.at - Lightning Talk
Jan Gehring
 
It Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software DevelopmentIt Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software Development
Carlos Perez
 
Helpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and DjangoHelpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and Django
roskakori
 
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGIEuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
Max Tepkeev
 
Deploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleDeploying PHP Applications with Ansible
Deploying PHP Applications with Ansible
Orestes Carracedo
 
systemd @ Facebook -- a year later
systemd @ Facebook -- a year latersystemd @ Facebook -- a year later
systemd @ Facebook -- a year later
Davide Cavalca
 
Webinar - Auto-deploy Puppet Enterprise: Vagrant and Oscar
Webinar - Auto-deploy Puppet Enterprise: Vagrant and OscarWebinar - Auto-deploy Puppet Enterprise: Vagrant and Oscar
Webinar - Auto-deploy Puppet Enterprise: Vagrant and Oscar
OlinData
 
Vagrant: The Oscar Plug-in
Vagrant: The Oscar Plug-inVagrant: The Oscar Plug-in
Vagrant: The Oscar Plug-in
Jeff Scelza
 
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Puppet
 
Deploying Foreman in Enterprise Environments
Deploying Foreman in Enterprise EnvironmentsDeploying Foreman in Enterprise Environments
Deploying Foreman in Enterprise Environments
inovex GmbH
 
Vagrant for Virtualized Development
Vagrant for Virtualized DevelopmentVagrant for Virtualized Development
Vagrant for Virtualized Development
Adam Culp
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
Michael Bahr
 
Ansible Oxford - Cows & Containers
Ansible Oxford - Cows & ContainersAnsible Oxford - Cows & Containers
Ansible Oxford - Cows & Containers
jonatanblue
 
Develop QNAP NAS App by Docker
Develop QNAP NAS App by DockerDevelop QNAP NAS App by Docker
Develop QNAP NAS App by Docker
Terry Chen
 
Vagrant-Overview
Vagrant-OverviewVagrant-Overview
Vagrant-Overview
Crifkin
 

Viewers also liked (16)

Filtering data with D2W
Filtering data with D2W Filtering data with D2W
Filtering data with D2W
WO Community
 
D2W Stateful Controllers
D2W Stateful ControllersD2W Stateful Controllers
D2W Stateful Controllers
WO Community
 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative version
WO Community
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
WO Community
 
WOver
WOverWOver
WOver
WO Community
 
Reenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWSReenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWS
WO Community
 
Life outside WO
Life outside WOLife outside WO
Life outside WO
WO Community
 
Advanced Apache Cayenne
Advanced Apache CayenneAdvanced Apache Cayenne
Advanced Apache Cayenne
WO Community
 
Unit Testing with WOUnit
Unit Testing with WOUnitUnit Testing with WOUnit
Unit Testing with WOUnit
WO Community
 
Chaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real WorldChaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real World
WO Community
 
Migrating existing Projects to Wonder
Migrating existing Projects to WonderMigrating existing Projects to Wonder
Migrating existing Projects to Wonder
WO Community
 
iOS for ERREST
iOS for ERRESTiOS for ERREST
iOS for ERREST
WO Community
 
High availability
High availabilityHigh availability
High availability
WO Community
 
KAAccessControl
KAAccessControlKAAccessControl
KAAccessControl
WO Community
 
"Framework Principal" pattern
"Framework Principal" pattern"Framework Principal" pattern
"Framework Principal" pattern
WO Community
 
In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engine
WO Community
 
Filtering data with D2W
Filtering data with D2W Filtering data with D2W
Filtering data with D2W
WO Community
 
D2W Stateful Controllers
D2W Stateful ControllersD2W Stateful Controllers
D2W Stateful Controllers
WO Community
 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative version
WO Community
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
WO Community
 
Reenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWSReenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWS
WO Community
 
Advanced Apache Cayenne
Advanced Apache CayenneAdvanced Apache Cayenne
Advanced Apache Cayenne
WO Community
 
Unit Testing with WOUnit
Unit Testing with WOUnitUnit Testing with WOUnit
Unit Testing with WOUnit
WO Community
 
Chaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real WorldChaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real World
WO Community
 
Migrating existing Projects to Wonder
Migrating existing Projects to WonderMigrating existing Projects to Wonder
Migrating existing Projects to Wonder
WO Community
 
"Framework Principal" pattern
"Framework Principal" pattern"Framework Principal" pattern
"Framework Principal" pattern
WO Community
 
In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engine
WO Community
 
Ad

Similar to Build and deployment (20)

Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015
ice799
 
Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014
Mandi Walls
 
Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015
ice799
 
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet
 
Running CentOS on the Facebook fleet
Running CentOS on the Facebook fleetRunning CentOS on the Facebook fleet
Running CentOS on the Facebook fleet
Davide Cavalca
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
biicode
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & docker
Jürgen Gutsch
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios
 
Puppet control-repo 
to the next level
Puppet control-repo 
to the next levelPuppet control-repo 
to the next level
Puppet control-repo 
to the next level
Alessandro Franceschi
 
Beyond Puppet
Beyond PuppetBeyond Puppet
Beyond Puppet
Kris Buytaert
 
CentOS at Facebook
CentOS at FacebookCentOS at Facebook
CentOS at Facebook
Phil Dibowitz
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
Robert Lujo
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat Overview
Mandi Walls
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
Tomas Doran
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet
 
DevOps Bootcamp course resource (1)-1-99.pdf
DevOps Bootcamp course resource (1)-1-99.pdfDevOps Bootcamp course resource (1)-1-99.pdf
DevOps Bootcamp course resource (1)-1-99.pdf
AminulKarim2
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on Linode
WO Community
 
How to stay sane during your Vagrant journey
How to stay sane during your Vagrant journeyHow to stay sane during your Vagrant journey
How to stay sane during your Vagrant journey
Jakub Wadolowski
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
Kris Buytaert
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015
ice799
 
Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014
Mandi Walls
 
Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015
ice799
 
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet
 
Running CentOS on the Facebook fleet
Running CentOS on the Facebook fleetRunning CentOS on the Facebook fleet
Running CentOS on the Facebook fleet
Davide Cavalca
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
biicode
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & docker
Jürgen Gutsch
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios
 
Puppet control-repo 
to the next level
Puppet control-repo 
to the next levelPuppet control-repo 
to the next level
Puppet control-repo 
to the next level
Alessandro Franceschi
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
Robert Lujo
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat Overview
Mandi Walls
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
Tomas Doran
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet
 
DevOps Bootcamp course resource (1)-1-99.pdf
DevOps Bootcamp course resource (1)-1-99.pdfDevOps Bootcamp course resource (1)-1-99.pdf
DevOps Bootcamp course resource (1)-1-99.pdf
AminulKarim2
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on Linode
WO Community
 
How to stay sane during your Vagrant journey
How to stay sane during your Vagrant journeyHow to stay sane during your Vagrant journey
How to stay sane during your Vagrant journey
Jakub Wadolowski
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
Kris Buytaert
 
Ad

More from WO Community (12)

Localizing your apps for multibyte languages
Localizing your apps for multibyte languagesLocalizing your apps for multibyte languages
Localizing your apps for multibyte languages
WO Community
 
WOdka
WOdkaWOdka
WOdka
WO Community
 
ERGroupware
ERGroupwareERGroupware
ERGroupware
WO Community
 
D2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRollerD2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRoller
WO Community
 
CMS / BLOG and SnoWOman
CMS / BLOG and SnoWOmanCMS / BLOG and SnoWOman
CMS / BLOG and SnoWOman
WO Community
 
Using GIT
Using GITUsing GIT
Using GIT
WO Community
 
Persistent Session Storage
Persistent Session StoragePersistent Session Storage
Persistent Session Storage
WO Community
 
Back2 future
Back2 futureBack2 future
Back2 future
WO Community
 
WebObjects Optimization
WebObjects OptimizationWebObjects Optimization
WebObjects Optimization
WO Community
 
Dynamic Elements
Dynamic ElementsDynamic Elements
Dynamic Elements
WO Community
 
Practical ERSync
Practical ERSyncPractical ERSync
Practical ERSync
WO Community
 
ERRest: the Basics
ERRest: the BasicsERRest: the Basics
ERRest: the Basics
WO Community
 
Localizing your apps for multibyte languages
Localizing your apps for multibyte languagesLocalizing your apps for multibyte languages
Localizing your apps for multibyte languages
WO Community
 
D2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRollerD2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRoller
WO Community
 
CMS / BLOG and SnoWOman
CMS / BLOG and SnoWOmanCMS / BLOG and SnoWOman
CMS / BLOG and SnoWOman
WO Community
 
Persistent Session Storage
Persistent Session StoragePersistent Session Storage
Persistent Session Storage
WO Community
 
WebObjects Optimization
WebObjects OptimizationWebObjects Optimization
WebObjects Optimization
WO Community
 
ERRest: the Basics
ERRest: the BasicsERRest: the Basics
ERRest: the Basics
WO Community
 

Recently uploaded (20)

Exchange Migration Tool- Shoviv Software
Exchange Migration Tool- Shoviv SoftwareExchange Migration Tool- Shoviv Software
Exchange Migration Tool- Shoviv Software
Shoviv Software
 
How I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetryHow I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetry
Cees Bos
 
Beyond the code. Complexity - 2025.05 - SwiftCraft
Beyond the code. Complexity - 2025.05 - SwiftCraftBeyond the code. Complexity - 2025.05 - SwiftCraft
Beyond the code. Complexity - 2025.05 - SwiftCraft
Dmitrii Ivanov
 
Buy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training techBuy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training tech
Rustici Software
 
GC Tuning: A Masterpiece in Performance Engineering
GC Tuning: A Masterpiece in Performance EngineeringGC Tuning: A Masterpiece in Performance Engineering
GC Tuning: A Masterpiece in Performance Engineering
Tier1 app
 
How to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber PluginHow to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber Plugin
eGrabber
 
Why Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card ProvidersWhy Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card Providers
Tapitag
 
The-Future-is-Hybrid-Exploring-Azure’s-Role-in-Multi-Cloud-Strategies.pptx
The-Future-is-Hybrid-Exploring-Azure’s-Role-in-Multi-Cloud-Strategies.pptxThe-Future-is-Hybrid-Exploring-Azure’s-Role-in-Multi-Cloud-Strategies.pptx
The-Future-is-Hybrid-Exploring-Azure’s-Role-in-Multi-Cloud-Strategies.pptx
james brownuae
 
Autodesk Inventor Crack (2025) Latest
Autodesk Inventor    Crack (2025) LatestAutodesk Inventor    Crack (2025) Latest
Autodesk Inventor Crack (2025) Latest
Google
 
wAIred_LearnWithOutAI_JCON_14052025.pptx
wAIred_LearnWithOutAI_JCON_14052025.pptxwAIred_LearnWithOutAI_JCON_14052025.pptx
wAIred_LearnWithOutAI_JCON_14052025.pptx
SimonedeGijt
 
Adobe InDesign Crack FREE Download 2025 link
Adobe InDesign Crack FREE Download 2025 linkAdobe InDesign Crack FREE Download 2025 link
Adobe InDesign Crack FREE Download 2025 link
mahmadzubair09
 
NYC ACE 08-May-2025-Combined Presentation.pdf
NYC ACE 08-May-2025-Combined Presentation.pdfNYC ACE 08-May-2025-Combined Presentation.pdf
NYC ACE 08-May-2025-Combined Presentation.pdf
AUGNYC
 
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb ClarkDeploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Peter Caitens
 
sequencediagrams.pptx software Engineering
sequencediagrams.pptx software Engineeringsequencediagrams.pptx software Engineering
sequencediagrams.pptx software Engineering
aashrithakondapalli8
 
Orion Context Broker introduction 20250509
Orion Context Broker introduction 20250509Orion Context Broker introduction 20250509
Orion Context Broker introduction 20250509
Fermin Galan
 
Top 12 Most Useful AngularJS Development Tools to Use in 2025
Top 12 Most Useful AngularJS Development Tools to Use in 2025Top 12 Most Useful AngularJS Development Tools to Use in 2025
Top 12 Most Useful AngularJS Development Tools to Use in 2025
GrapesTech Solutions
 
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-RuntimeReinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Natan Silnitsky
 
Artificial hand using embedded system.pptx
Artificial hand using embedded system.pptxArtificial hand using embedded system.pptx
Artificial hand using embedded system.pptx
bhoomigowda12345
 
Do not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your causeDo not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your cause
Fexle Services Pvt. Ltd.
 
Solar-wind hybrid engery a system sustainable power
Solar-wind  hybrid engery a system sustainable powerSolar-wind  hybrid engery a system sustainable power
Solar-wind hybrid engery a system sustainable power
bhoomigowda12345
 
Exchange Migration Tool- Shoviv Software
Exchange Migration Tool- Shoviv SoftwareExchange Migration Tool- Shoviv Software
Exchange Migration Tool- Shoviv Software
Shoviv Software
 
How I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetryHow I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetry
Cees Bos
 
Beyond the code. Complexity - 2025.05 - SwiftCraft
Beyond the code. Complexity - 2025.05 - SwiftCraftBeyond the code. Complexity - 2025.05 - SwiftCraft
Beyond the code. Complexity - 2025.05 - SwiftCraft
Dmitrii Ivanov
 
Buy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training techBuy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training tech
Rustici Software
 
GC Tuning: A Masterpiece in Performance Engineering
GC Tuning: A Masterpiece in Performance EngineeringGC Tuning: A Masterpiece in Performance Engineering
GC Tuning: A Masterpiece in Performance Engineering
Tier1 app
 
How to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber PluginHow to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber Plugin
eGrabber
 
Why Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card ProvidersWhy Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card Providers
Tapitag
 
The-Future-is-Hybrid-Exploring-Azure’s-Role-in-Multi-Cloud-Strategies.pptx
The-Future-is-Hybrid-Exploring-Azure’s-Role-in-Multi-Cloud-Strategies.pptxThe-Future-is-Hybrid-Exploring-Azure’s-Role-in-Multi-Cloud-Strategies.pptx
The-Future-is-Hybrid-Exploring-Azure’s-Role-in-Multi-Cloud-Strategies.pptx
james brownuae
 
Autodesk Inventor Crack (2025) Latest
Autodesk Inventor    Crack (2025) LatestAutodesk Inventor    Crack (2025) Latest
Autodesk Inventor Crack (2025) Latest
Google
 
wAIred_LearnWithOutAI_JCON_14052025.pptx
wAIred_LearnWithOutAI_JCON_14052025.pptxwAIred_LearnWithOutAI_JCON_14052025.pptx
wAIred_LearnWithOutAI_JCON_14052025.pptx
SimonedeGijt
 
Adobe InDesign Crack FREE Download 2025 link
Adobe InDesign Crack FREE Download 2025 linkAdobe InDesign Crack FREE Download 2025 link
Adobe InDesign Crack FREE Download 2025 link
mahmadzubair09
 
NYC ACE 08-May-2025-Combined Presentation.pdf
NYC ACE 08-May-2025-Combined Presentation.pdfNYC ACE 08-May-2025-Combined Presentation.pdf
NYC ACE 08-May-2025-Combined Presentation.pdf
AUGNYC
 
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb ClarkDeploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Peter Caitens
 
sequencediagrams.pptx software Engineering
sequencediagrams.pptx software Engineeringsequencediagrams.pptx software Engineering
sequencediagrams.pptx software Engineering
aashrithakondapalli8
 
Orion Context Broker introduction 20250509
Orion Context Broker introduction 20250509Orion Context Broker introduction 20250509
Orion Context Broker introduction 20250509
Fermin Galan
 
Top 12 Most Useful AngularJS Development Tools to Use in 2025
Top 12 Most Useful AngularJS Development Tools to Use in 2025Top 12 Most Useful AngularJS Development Tools to Use in 2025
Top 12 Most Useful AngularJS Development Tools to Use in 2025
GrapesTech Solutions
 
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-RuntimeReinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Natan Silnitsky
 
Artificial hand using embedded system.pptx
Artificial hand using embedded system.pptxArtificial hand using embedded system.pptx
Artificial hand using embedded system.pptx
bhoomigowda12345
 
Do not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your causeDo not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your cause
Fexle Services Pvt. Ltd.
 
Solar-wind hybrid engery a system sustainable power
Solar-wind  hybrid engery a system sustainable powerSolar-wind  hybrid engery a system sustainable power
Solar-wind hybrid engery a system sustainable power
bhoomigowda12345
 

Build and deployment

  • 1. Build & Deployment Pascal Robert Druide informatique
  • 2. Git
  • 3. Git hooks • Stored in .git/hooks • Hooks can be anything runnable • The useful ones: post-commit and post-receive • post-receive will receive branch reference
  • 4. Git and remote • Push changes to each deployment server • Have the post-receive script on each server • … or use branches and central Git repo
  • 5. post-receive examples #!/bin/bash ! while read oldrev newrev ref do if [[ $newrev == "0000000000000000000000000000000000000000" ]]; then exit 0 fi ! branch=`echo $ref | cut -d/ -f3` umask 0022 ! if [ ! -d /tmp/SimpleBlog ]; then git clone /Users/probert/SimpleBlog.git /tmp/SimpleBlog fi ! if [ $branch == "dev" ]; then ant -lib /opt/woproject.jar install fi fi
  • 6. Submodules • You could use Git submodules to build everything at the same time
  • 8. Puppet ? • Not about politicians, consumers or Metallica • Configuration management tool • Rapid deployment • Central point • Changes history • Standalone or client/server
  • 9. Puppet • Puppet uses recipes (modules) • Ruby-like declarative language • Works on UNIX/Linux, OS X and Windows • You can install packages, create user account, start services, etc.
  • 10. Sample configuration manifests/site.pp: ! node server.wocommunity.org { include wodeploy } ! modules/wodeploy/manifests/init.pp: ! package { ‘apache’: name => ‘httpd’, ensure => present } ! service { ‘httpd’: name => ‘httpd’, ensure => running, require => Package[‘apache’] } ! package { ‘wotaskd’: name => ‘wotaskd’, ensure => present } ! user { ‘appserver’: name => ‘appserver’ ensure => present }
  • 11. Puppet tips • Use Git to store the configuration • Be modular • Use it!
  • 13. Native packages • Deploy with natives packages! • Can mix it with Puppet or Chef • Deploy from a central repository or manually
  • 14. Ant RPM task • Build a RPM package for RedHat-based Linux • Still need to write a SPEC file • Use it only if you really like Ant
  • 15. fpm • Ruby gem to create packages • .pkg/.deb/.rpm/Puppet! • Much more flexible than the Ant task
  • 16. fpm in two steps • gem install fpm • fpm --prefix /WOApps -a noarch —rpm-user _appserver --rpm- os linux -t rpm -s dir -n SimpleBlog -v 1.0 SimpleBlog.woa
  • 17. Activating the app • Bundle a shell script inside the package • Use Puppet to install the package + restart the app
  • 18. Puppet + RPM package { ‘SimpleBlog’: source => ‘http://myserver/storage/SimpleBlog-1.0-1.rpm', name => ‘SimpleBlog’, ensure => ‘installed’ } ! file { ‘wodeploy.py’: { source => ‘puppet:///modules/wotools/scripts/wodeploy.py', path => ‘/opt/bin/wodeploy.py’ } ! exec { ‘run-wodeploy’ command => ‘/opt/bin/wodeploy.py SimpleBlog’ }
  • 19. wodeploy.py #!/usr/bin/python ! import json, urllib2, sys ! base_url = "http://mywotaskd:1085/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications" app_name = sys.argv[1] ! stop_instance = True response = json.load(urllib2.urlopen(base_url + ".json?type=app&name=" + app_name)) if len(response) == 0: query = { 'id' : app_name, 'type' : 'MApplication', 'name' : app_name, 'unixOutputPath' : '/opt/Local/Library/WebObjects/Logs', 'unixPath' : '/opt/Local/Library/WebObjects/Applications/' + app_name + '.woa/' + app_name } query_as_json = json.dumps(query) request = urllib2.Request(base_url + ".json", query_as_json, {'Content-Type': 'application/json'}) response = urllib2.urlopen(request) stop_instance = False if stop_instance: urllib2.urlopen(base_url + "/" + app_name + "/stop") ! urllib2.urlopen(base_url + "/" + app_name + "/start")
  • 20. Large distribution • Use a central repository • Use Puppet • … or both
  • 21. Maven
  • 22. Q&A
  翻译: