SlideShare une entreprise Scribd logo
1  sur  32
How to push to production a
project with 100+ plugins in
less than 10 minutes
Thiago Moreira
Senior Consultant @ Liferay Brazil
Agenda


•   Motivation
•   About the project
•   Script workflow
•   Benefits
•   Challenges
•   References
•   Future
Motivation (1/2)



Back in 2010 I was working in another consulting project and
we were getting ready to push to production a new version of
an intranet based on Social Office when I had the following
phone talk with Michael Han
Motivation (2/2)


• Thiago: Hey mike, I have to say that I’m confortable with
the project implementation but I’m a little worried about the
task of push to production… (waiting a response like: don’t
worry everything will be fine)
• Mike: Thiago, something will go wrong! The thing is, you
have to be ready to fix it.
• Thiago: Oh man!
About the project (1/5)
• 1 ext
• 4 layout templates
• 121 portlets (21 projects with 1 portlet and 1 project with
100 portlets
• 12 hooks
• 6 themes
• 4 webs

• Total 148 plugins.
About the project (2/5)
•   4 Production server in cluster
•   1 QA server
•   0 Development server
•   1 Jenkins server
•   1 Nexus server (shared with Jenkins)
•   Github as source code server
About the project (3/5)

       Tomcat and            Deployment
         Liferay           host, deployment
         bundles           user, application
                              user, JVM
                             settings, etc
         Liferay
      Environment
         Liferay
        patches
        profiles
         plugins


                            Properties
                               files

             Main script
About the project (4/5)
• 3 Jenkins jobs were configured to each of the 3 branches
on git.
   • Master -> development (every push to upstream)
   • QA (homologacao) -> QA (every day at 7:00 am)
   • Production -> production (push of a button)
About the project (5/5)

                       Production
                      Environment




           QA                       Development
       Environment   Jenkins        Environment
Script Workflow


  Check        Build      Build
Environment   Liferay   Application




   Clean
               Build    Configure      Deploy to
              Tomcat     Tomcat       environment
Script Workflow
Check environment


•   It is used to check if the environment is correct
    1. It checks if the developer set the target.environment
         variable
    2. It checks if the environment has the correct Ant version
         (configurable)
    3. It checks if the environment has the correct Maven
         version (configurable)
Script Workflow
Clean




1. It is used to clean the main build directory e.g. the target
 directory.
Script Workflow
Build Tomcat
1. Unpack a vanilla Tomcat from the
 ${basedir}/src/main/bundle directory to ${basedir}/target




1. Delete all webapps’ directory content
2. Delete all *.bat files from bin directory
3. Set execution permission on *.sh files from bin directory
Script Workflow
Build Liferay


1. Unpacks the ${basedir}/src/main/bundles/liferay-
 version.war to ${tomcat}/webapps/ROOT
2. Unpacks the ${basedir}/src/main/bundles/liferay-
 dependencies-version.zip to ${tomcat}/lib
3. Install and configure the patching-tool-4.zip into the right
 place (liferay home)
4. Copy the license to the deploy directory
Script Workflow
Build Application (1/2)
1. Build and direct-deploy the ext project Ant based
2. Call Maven to build the other projects
   • The sequence of build is defined at the pom.xml and it is
      • commons
      • webs
      • layouttpl
      • themes
      • hooks
      • portlets
Build Application (2/2)
                          Avoid Liferay to deploy
                          the plugins on startup
                              (cold deploy)
3. Call direct-deploy on each of the projects built by Maven
4. Copy the patches to the patching-tool home
5. Copy plugins (downloaded from liferay.com) to deploy
 directory
Script Workflow
Configure Tomcat (1/2)
Worker-Name
1. Creates a MANIFEST.MF file with set a properties that
 identifies the current build            Can be accessed
                                              thought
                                        www.domain.com/html
                                          /environment.txt




2. Configure portal-ext.properties with environment
   properties
3. Configure server.xml with environment properties
Configure Tomcat (2/2)
Worker-Name
4. Configure setenv.sh with the proper TOMCAT_HOME and
   CATALINA_OPTS
Script Workflow
Deploy to environment (1/2)
1. Pack a tgz bundle with everything built
2. Shutdown the remote Tomcat
3. Remotely remove the old Liferay
4. Copy the bundle to the remote machine
5. Unpack the bundle
6. Change the ownership of liferay home to the application
 user and group
7. Configure *.sh to be runnable
8. Apply the patches
9. Start the remote Tomcat
10. Wait 90 seconds (configurable) until start the next node
Deploy to environment (2/2)
Benefits
• We use the same script to build and deploy on developers
machine as well QA and Production boxes. This ensure that
the script is validated several times before run on production.
• The whole process does not take more than 10 minutes to
finish on any environment.



• We are able to rollback the version in production within a
few minutes
Challenges
• Upgrade the version of Liferay from 6.0.11 to 6.0.12
• Push changes that affects the database
• If needed put the production environment in maintenance
automatically through script.
• Test cluster configuration directly on production
References
• Continuous Delivery: Reliable Software Releases Through
Build, Test, And Deployment Automation by Jez Humble and
David Farley
Future
• Short term
  • Add jsp pre-compilation
  • Replace the direct-deploy Ant task per a Maven goal
  • Use a sudo user to remote deploy instead of root
• Middle term
  • Move the infra structure to a PaaS (Cloudbees)
  • Script the process of update and restart the web server
    when needed
• Long term
  • Create a Maven plugin to replace the Ant script
Thank you!




                 thiago.moreira@liferay.com

tmoreira2020 @ facebook | linkedin | plus | slideshare | twitter

   Don’t forget to rate the presentation on our mobile app!

Contenu connexe

Tendances

CIbox - OpenSource solution for making your #devops better
CIbox - OpenSource solution for making your #devops betterCIbox - OpenSource solution for making your #devops better
CIbox - OpenSource solution for making your #devops betterAndrii Podanenko
 
Drupal contrib module maintaining
Drupal contrib module maintainingDrupal contrib module maintaining
Drupal contrib module maintainingAndrii Podanenko
 
Hudson: Your robotic butler
Hudson: Your robotic butlerHudson: Your robotic butler
Hudson: Your robotic butlerSteven Merrill
 
CLUG 2014-10 - Cookbook CI with Jenkins
CLUG 2014-10 - Cookbook CI with JenkinsCLUG 2014-10 - Cookbook CI with Jenkins
CLUG 2014-10 - Cookbook CI with JenkinsZachary Stevens
 
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonEclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonVladLica
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Dennys Hsieh
 
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data Projects
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data ProjectsJUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data Projects
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data ProjectsCloudBees
 
Testing for infra code using test-kitchen,docker,chef
Testing for infra code using  test-kitchen,docker,chefTesting for infra code using  test-kitchen,docker,chef
Testing for infra code using test-kitchen,docker,chefkamalikamj
 
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"CloudBees
 
Best Practices for Mission-Critical Jenkins
Best Practices for Mission-Critical JenkinsBest Practices for Mission-Critical Jenkins
Best Practices for Mission-Critical Jenkinsmrooney7828
 
Continuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins WorkflowContinuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins WorkflowUdaypal Aarkoti
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Puppet
 
Introduction to Continuous Integration with Jenkins
Introduction to Continuous Integration with JenkinsIntroduction to Continuous Integration with Jenkins
Introduction to Continuous Integration with JenkinsBrice Argenson
 
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev DaysHow to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev DaysNatan Silnitsky
 
2017 jenkins world
2017 jenkins world2017 jenkins world
2017 jenkins worldBrent Laster
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Andrii Podanenko
 
Live deployment, ci, drupal
Live deployment, ci, drupalLive deployment, ci, drupal
Live deployment, ci, drupalAndrii Podanenko
 

Tendances (20)

CIbox - OpenSource solution for making your #devops better
CIbox - OpenSource solution for making your #devops betterCIbox - OpenSource solution for making your #devops better
CIbox - OpenSource solution for making your #devops better
 
Drupal contrib module maintaining
Drupal contrib module maintainingDrupal contrib module maintaining
Drupal contrib module maintaining
 
Hudson: Your robotic butler
Hudson: Your robotic butlerHudson: Your robotic butler
Hudson: Your robotic butler
 
CLUG 2014-10 - Cookbook CI with Jenkins
CLUG 2014-10 - Cookbook CI with JenkinsCLUG 2014-10 - Cookbook CI with Jenkins
CLUG 2014-10 - Cookbook CI with Jenkins
 
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonEclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
 
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data Projects
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data ProjectsJUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data Projects
JUC Europe 2015: Jenkins Pipeline for Continuous Delivery of Big Data Projects
 
Testing for infra code using test-kitchen,docker,chef
Testing for infra code using  test-kitchen,docker,chefTesting for infra code using  test-kitchen,docker,chef
Testing for infra code using test-kitchen,docker,chef
 
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
 
Best Practices for Mission-Critical Jenkins
Best Practices for Mission-Critical JenkinsBest Practices for Mission-Critical Jenkins
Best Practices for Mission-Critical Jenkins
 
Continuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins WorkflowContinuous Delivery with Jenkins Workflow
Continuous Delivery with Jenkins Workflow
 
Jenkins pipeline as code
Jenkins pipeline as codeJenkins pipeline as code
Jenkins pipeline as code
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
 
Introduction to Continuous Integration with Jenkins
Introduction to Continuous Integration with JenkinsIntroduction to Continuous Integration with Jenkins
Introduction to Continuous Integration with Jenkins
 
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev DaysHow to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
 
2017 jenkins world
2017 jenkins world2017 jenkins world
2017 jenkins world
 
Maven2交流
Maven2交流Maven2交流
Maven2交流
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.
 
Live deployment, ci, drupal
Live deployment, ci, drupalLive deployment, ci, drupal
Live deployment, ci, drupal
 

En vedette

Benefits of using liferay
Benefits of using liferay Benefits of using liferay
Benefits of using liferay SKALI Group
 
Liferay portal – moving beyond content management
Liferay portal – moving beyond content managementLiferay portal – moving beyond content management
Liferay portal – moving beyond content managementAmbientia
 
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterpriseMoved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterpriseMilen Dyankov
 
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik HarabiEclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik HarabiRafik HARABI
 
Liferay portals in real projects
Liferay portals  in real projectsLiferay portals  in real projects
Liferay portals in real projectsIBACZ
 
Liferay overview
Liferay overviewLiferay overview
Liferay overviewAbhishekSRC
 
Liferay architecture By Navin Agarwal
Liferay architecture By Navin AgarwalLiferay architecture By Navin Agarwal
Liferay architecture By Navin AgarwalNavin Agarwal
 
Liferay Portal Introduction
Liferay Portal IntroductionLiferay Portal Introduction
Liferay Portal IntroductionNguyen Tung
 
Présentation LifeRay
Présentation LifeRayPrésentation LifeRay
Présentation LifeRayf.morin
 

En vedette (16)

Dev-Time Liferay
Dev-Time  LiferayDev-Time  Liferay
Dev-Time Liferay
 
Benefits of using liferay
Benefits of using liferay Benefits of using liferay
Benefits of using liferay
 
Liferay 6 and vaadin portlets
Liferay 6 and vaadin portletsLiferay 6 and vaadin portlets
Liferay 6 and vaadin portlets
 
Why choose-liferay
Why choose-liferayWhy choose-liferay
Why choose-liferay
 
Liferay portal advantages
Liferay portal advantagesLiferay portal advantages
Liferay portal advantages
 
Liferay portal – moving beyond content management
Liferay portal – moving beyond content managementLiferay portal – moving beyond content management
Liferay portal – moving beyond content management
 
Making a decision between Liferay and Drupal
Making a decision between Liferay and DrupalMaking a decision between Liferay and Drupal
Making a decision between Liferay and Drupal
 
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterpriseMoved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
 
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik HarabiEclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
 
Overview of Liferay 7 Technology
Overview of Liferay 7 TechnologyOverview of Liferay 7 Technology
Overview of Liferay 7 Technology
 
Liferay portals in real projects
Liferay portals  in real projectsLiferay portals  in real projects
Liferay portals in real projects
 
Liferay overview
Liferay overviewLiferay overview
Liferay overview
 
Liferay
LiferayLiferay
Liferay
 
Liferay architecture By Navin Agarwal
Liferay architecture By Navin AgarwalLiferay architecture By Navin Agarwal
Liferay architecture By Navin Agarwal
 
Liferay Portal Introduction
Liferay Portal IntroductionLiferay Portal Introduction
Liferay Portal Introduction
 
Présentation LifeRay
Présentation LifeRayPrésentation LifeRay
Présentation LifeRay
 

Similaire à How to push to production a project with 100+ plugins in less than 10 minutes

Maven and j unit introduction
Maven and j unit introductionMaven and j unit introduction
Maven and j unit introductionSergii Fesenko
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversionMangesh Bhujbal
 
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow v6 Training Slides - 16 - Preparing Development EnvironmentJoget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow v6 Training Slides - 16 - Preparing Development EnvironmentJoget Workflow
 
Source control - what you need to know
Source control - what you need to knowSource control - what you need to know
Source control - what you need to knowdaveymni
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack SummitMiguel Zuniga
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOpsEklove Mohan
 
Build Tools & Maven
Build Tools & MavenBuild Tools & Maven
Build Tools & MavenDavid Simons
 
Java build tools
Java build toolsJava build tools
Java build toolsSujit Kumar
 
Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019graemerocher
 
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...Joget Workflow
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITPouriaQashqai1
 
SynapseIndia drupal presentation on drupal info
SynapseIndia drupal  presentation on drupal infoSynapseIndia drupal  presentation on drupal info
SynapseIndia drupal presentation on drupal infoSynapseindiappsdevelopment
 
Automatize everything
Automatize everythingAutomatize everything
Automatize everythingBoris Bucha
 
Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Gopi Raghavendra
 
Continuous Delivery with Sitecore
Continuous Delivery with SitecoreContinuous Delivery with Sitecore
Continuous Delivery with SitecoreCode Computerlove
 
SFDC Deployments
SFDC DeploymentsSFDC Deployments
SFDC DeploymentsSujit Kumar
 

Similaire à How to push to production a project with 100+ plugins in less than 10 minutes (20)

Maven and j unit introduction
Maven and j unit introductionMaven and j unit introduction
Maven and j unit introduction
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversion
 
Devops.pptx
Devops.pptxDevops.pptx
Devops.pptx
 
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow v6 Training Slides - 16 - Preparing Development EnvironmentJoget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
 
Source control - what you need to know
Source control - what you need to knowSource control - what you need to know
Source control - what you need to know
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
Build Tools & Maven
Build Tools & MavenBuild Tools & Maven
Build Tools & Maven
 
Jenkins Tutorial.pdf
Jenkins Tutorial.pdfJenkins Tutorial.pdf
Jenkins Tutorial.pdf
 
Java build tools
Java build toolsJava build tools
Java build tools
 
Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019
 
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GIT
 
Devops
DevopsDevops
Devops
 
CV_RishabhDixit
CV_RishabhDixitCV_RishabhDixit
CV_RishabhDixit
 
SynapseIndia drupal presentation on drupal info
SynapseIndia drupal  presentation on drupal infoSynapseIndia drupal  presentation on drupal info
SynapseIndia drupal presentation on drupal info
 
Automatize everything
Automatize everythingAutomatize everything
Automatize everything
 
Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)
 
Continuous Delivery with Sitecore
Continuous Delivery with SitecoreContinuous Delivery with Sitecore
Continuous Delivery with Sitecore
 
SFDC Deployments
SFDC DeploymentsSFDC Deployments
SFDC Deployments
 

Plus de Thiago Leão Moreira

Plus de Thiago Leão Moreira (8)

Liferay DEVCON 2023 - What's cooking in Liferay's Cloud?
Liferay DEVCON 2023 - What's cooking in Liferay's Cloud?Liferay DEVCON 2023 - What's cooking in Liferay's Cloud?
Liferay DEVCON 2023 - What's cooking in Liferay's Cloud?
 
Unit test your *LocalServiceImpl classes
Unit test your *LocalServiceImpl classesUnit test your *LocalServiceImpl classes
Unit test your *LocalServiceImpl classes
 
Novidades do Liferay Portal 6.2
Novidades do Liferay Portal 6.2Novidades do Liferay Portal 6.2
Novidades do Liferay Portal 6.2
 
Novas Funcionalidades Liferay 6
Novas Funcionalidades Liferay 6Novas Funcionalidades Liferay 6
Novas Funcionalidades Liferay 6
 
Floggy-M3DD-2009-01-21
Floggy-M3DD-2009-01-21Floggy-M3DD-2009-01-21
Floggy-M3DD-2009-01-21
 
Floggy-JustJava-2008-09-10
Floggy-JustJava-2008-09-10Floggy-JustJava-2008-09-10
Floggy-JustJava-2008-09-10
 
Floggy-GUJavaSC-2008-09-20
Floggy-GUJavaSC-2008-09-20Floggy-GUJavaSC-2008-09-20
Floggy-GUJavaSC-2008-09-20
 
Floggy-IIBoot-2008-09-25
Floggy-IIBoot-2008-09-25Floggy-IIBoot-2008-09-25
Floggy-IIBoot-2008-09-25
 

Dernier

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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.pdfsudhanshuwaghmare1
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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 Processorsdebabhi2
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Dernier (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

How to push to production a project with 100+ plugins in less than 10 minutes

  • 1. How to push to production a project with 100+ plugins in less than 10 minutes Thiago Moreira Senior Consultant @ Liferay Brazil
  • 2. Agenda • Motivation • About the project • Script workflow • Benefits • Challenges • References • Future
  • 3. Motivation (1/2) Back in 2010 I was working in another consulting project and we were getting ready to push to production a new version of an intranet based on Social Office when I had the following phone talk with Michael Han
  • 4. Motivation (2/2) • Thiago: Hey mike, I have to say that I’m confortable with the project implementation but I’m a little worried about the task of push to production… (waiting a response like: don’t worry everything will be fine) • Mike: Thiago, something will go wrong! The thing is, you have to be ready to fix it. • Thiago: Oh man!
  • 5. About the project (1/5) • 1 ext • 4 layout templates • 121 portlets (21 projects with 1 portlet and 1 project with 100 portlets • 12 hooks • 6 themes • 4 webs • Total 148 plugins.
  • 6. About the project (2/5) • 4 Production server in cluster • 1 QA server • 0 Development server • 1 Jenkins server • 1 Nexus server (shared with Jenkins) • Github as source code server
  • 7. About the project (3/5) Tomcat and Deployment Liferay host, deployment bundles user, application user, JVM settings, etc Liferay Environment Liferay patches profiles plugins Properties files Main script
  • 8. About the project (4/5) • 3 Jenkins jobs were configured to each of the 3 branches on git. • Master -> development (every push to upstream) • QA (homologacao) -> QA (every day at 7:00 am) • Production -> production (push of a button)
  • 9. About the project (5/5) Production Environment QA Development Environment Jenkins Environment
  • 10. Script Workflow Check Build Build Environment Liferay Application Clean Build Configure Deploy to Tomcat Tomcat environment
  • 12. Check environment • It is used to check if the environment is correct 1. It checks if the developer set the target.environment variable 2. It checks if the environment has the correct Ant version (configurable) 3. It checks if the environment has the correct Maven version (configurable)
  • 14. Clean 1. It is used to clean the main build directory e.g. the target directory.
  • 16. Build Tomcat 1. Unpack a vanilla Tomcat from the ${basedir}/src/main/bundle directory to ${basedir}/target 1. Delete all webapps’ directory content 2. Delete all *.bat files from bin directory 3. Set execution permission on *.sh files from bin directory
  • 18. Build Liferay 1. Unpacks the ${basedir}/src/main/bundles/liferay- version.war to ${tomcat}/webapps/ROOT 2. Unpacks the ${basedir}/src/main/bundles/liferay- dependencies-version.zip to ${tomcat}/lib 3. Install and configure the patching-tool-4.zip into the right place (liferay home) 4. Copy the license to the deploy directory
  • 20. Build Application (1/2) 1. Build and direct-deploy the ext project Ant based 2. Call Maven to build the other projects • The sequence of build is defined at the pom.xml and it is • commons • webs • layouttpl • themes • hooks • portlets
  • 21. Build Application (2/2) Avoid Liferay to deploy the plugins on startup (cold deploy) 3. Call direct-deploy on each of the projects built by Maven 4. Copy the patches to the patching-tool home 5. Copy plugins (downloaded from liferay.com) to deploy directory
  • 23. Configure Tomcat (1/2) Worker-Name 1. Creates a MANIFEST.MF file with set a properties that identifies the current build Can be accessed thought www.domain.com/html /environment.txt 2. Configure portal-ext.properties with environment properties 3. Configure server.xml with environment properties
  • 24. Configure Tomcat (2/2) Worker-Name 4. Configure setenv.sh with the proper TOMCAT_HOME and CATALINA_OPTS
  • 26. Deploy to environment (1/2) 1. Pack a tgz bundle with everything built 2. Shutdown the remote Tomcat 3. Remotely remove the old Liferay 4. Copy the bundle to the remote machine 5. Unpack the bundle 6. Change the ownership of liferay home to the application user and group 7. Configure *.sh to be runnable 8. Apply the patches 9. Start the remote Tomcat 10. Wait 90 seconds (configurable) until start the next node
  • 28. Benefits • We use the same script to build and deploy on developers machine as well QA and Production boxes. This ensure that the script is validated several times before run on production. • The whole process does not take more than 10 minutes to finish on any environment. • We are able to rollback the version in production within a few minutes
  • 29. Challenges • Upgrade the version of Liferay from 6.0.11 to 6.0.12 • Push changes that affects the database • If needed put the production environment in maintenance automatically through script. • Test cluster configuration directly on production
  • 30. References • Continuous Delivery: Reliable Software Releases Through Build, Test, And Deployment Automation by Jez Humble and David Farley
  • 31. Future • Short term • Add jsp pre-compilation • Replace the direct-deploy Ant task per a Maven goal • Use a sudo user to remote deploy instead of root • Middle term • Move the infra structure to a PaaS (Cloudbees) • Script the process of update and restart the web server when needed • Long term • Create a Maven plugin to replace the Ant script
  • 32. Thank you! thiago.moreira@liferay.com tmoreira2020 @ facebook | linkedin | plus | slideshare | twitter Don’t forget to rate the presentation on our mobile app!

Notes de l'éditeur

  1. Share our experience during a project that Liferay took over with more than 100 pluginsHow we create a process of push to production and was able to do it consistently
  2. This talk fired two lines of thought: 1º get ready for wherever happen and 2º repeat as much as possible the process to push to production on similar environments to reduce the issues
  3. In the beginning we didn‘t have a Jenkins server or a Development and QA server. The whole process of push to production was manually executedSumming up: chaos!
  4. We matched all branches of the project to one Jenkins job
  5. Describes what the script (deploy.xml) does.
  6. Describes what the script (deploy.xml) does.
  7. Describes what the script (deploy.xml) does.
  8. Describes what the script (deploy.xml) does.
  9. Describes what the script (deploy.xml) does.
  10. Describes what the script (deploy.xml) does.
  11. Describes what the script (deploy.xml) does.
  12. - 3 if Tomcat will run using AJP or HTTP connector and the jvm route name.
  13. - Most of the properties are defined in the environment.properties
  14. Describes what the script (deploy.xml) does.
  15. Every steps in blue runs remotely- The properties from environment.properties are used in the step to connect and access the remote host- You can use a deploy user with limited sudo actions
  16. Every steps in blue runs remotely- The properties from environment.properties are used in the step to connect and access the remote host- You can use a deploy user with limited sudo actions
  17. - The process of migration the script was smooth because we had the all references to Liferay version as a variable