View
241
Download
4
Category
Preview:
Citation preview
DevOps Pipe Line for Liferay DevOps Pipe Line for Liferay ApplicationsApplications02-Jan-2017Maruti Gollapudi@gmaruti
AgendaAgendaDevOpsCurrent ProcessLiferay Application – ChallengesRecommended Process
DevOps - WhyDevOps - Why
DevOps reduces the cycle time from development to deployment
With end to end automation, failure rate is reduced
Frees up some time for team which can be used for innovations!
https://puppet.com/resources/white-paper/2016-state-of-devops-report
DevOps - WhatDevOps - What
Driving principles◦ Maximize left to right flow of Work from
Development to IT Operations to Customer. In order to maximize the flow we need small intervals of work, never passing defects to downstream.
◦ Constant flow of feedback from right to left at all stages of the value stream
◦ Create a culture that forests continuous experimentation (which helps continuous innovation) and understanding that repetition and practice is pre requisite to mastery. This
https://en.wikipedia.org/wiki/The_Phoenix_Project_(novel)
DevOps - WhatDevOps - What
A Culture and mind set for collaborating between developers and operations
http://www.slideshare.net/thekua/devops-from-the-ground-up
Plan Code Build Test Release Deploy Operate
DevOps
Continuous Delivery
Continuous Integration
Agile Development
• Automate Provisioning - Infrastructure as Code • Automate Builds – Continuous Integration • Automate Deployments – Defined Deployment
Pipeline and Continuous Deployments with appropriate configurations for the environments
• Automate Testing – Continuous Testing, Automated tests after each deployment
• Automate Monitoring – Proper monitors in place sending alerts
• Automate Metrics – Performance Metrics, LogsJiraRally
SVNGIT
JenkinsHudso
n
JunitSeleniu
mQTP
ChefPuppetAnsible
Data CenterPublic Cloud
Monitoring
DevOps helps automating end to end flow from development to deployment and monitoring.
Liferay Application LifecycleLiferay Application LifecycleTraditional FlowTraditional Flow
Develop Integrate, Test
Code
Bug Report
Pull CodeBuildRun Test
Version Control
Package
Release, Deploy
Monitor
Operate
DevQA
Prod
Deploy
• Provision• Install &
Configure Liferay, java, MySQL DB, Monitoring s/w
• Deploy• Alert• Add / Remove
node to Linux Cluster
Check In
Test fail Test Pass
Developer
Manual Trigger of Build and Test
Tester / Build Rep manually logs in Errors
Manual Trigger of Build and Package Process
Ops team sets up environment manually and triggers deploy script
Post Deployment, Themes and Layouts are manually configured Ops team
checks the Log files and raises report in Jira
Liferay Application LifecycleLiferay Application LifecycleTraditional Flow - ChallengesTraditional Flow - ChallengesThere are few tasks that need to be initiated or
require physical resource. This could potentially cause delays due to non-availability of concerned resource.
The tasks that are done manually are error prone and don’t guarantee to be consistent. In case of manual set up of environment it is possible to install wrong version of S/W.
One of the critical component of the Liferay application is Themes and Layouts. In general these are configured manually by development team even in Production, post application deployment.
Liferay Application LifecycleLiferay Application LifecycleRecommended Process - DevOpsRecommended Process - DevOps
Develop Integrate, Test
Code
Bug Report
Pull CodeBuildRun Test
Version Control
Package
Release, Deploy
Monitor
Operate
DevQA
Prod
Deploy
• Provision• Install &
Configure Liferay, java, MySQL DB, Monitoring s/w
• Deploy• Alert• Add / Remove
node to Liferay Cluster
Check In
On Check In
Test fail Test Pass
Liferay Application LifecycleLiferay Application LifecycleRecommended Process – Dev, Build & TestRecommended Process – Dev, Build & Test
Liferay Application LifecycleLiferay Application LifecycleRecommended Process – Deploy & MonitorRecommended Process – Deploy & Monitor
DevOps – Tools used in the SolutionDevOps – Tools used in the Solution
Tool PurposeEclispe IDE for developmentJunit Unit testing frameworkJava Development LanguageGIT, SVN Code repositoryJenkins Continuous integration toolSelenium Automated testing toolJira Bug report tracking toolPuppet, Ansible Configuration and Infrastructure management toolsZabbix System monitoring toolLogstash Monitor and parse log files
Automated Activities & CodeAutomated Activities & CodeUsing CI/CD tool jenkins along with Ansible
playbooks, we achieved automating the end to end flow.
The new process enables -◦ Build and generate "build once, deploy everywhere"
Liferay application packages◦ Quick and easy setup of environments (Dev, Test, QA
and Prod) and automated deployment and installation of the software on new servers including automatically configuring Layouts and Themes
◦ Automated deployment of upgrades on existing servers◦ Execute multiple build, release, and deployment jobs◦ Provision and configure nodes◦ Monitor and Report◦ Backup and Restore
CodeCode List of Ansible roles and their brief descriptiion
◦ mysql-db-liferay-user: Installs mysql and creates mysql user◦ liferay-portal: Installs Java and Liferay portal◦ portal-sdk: Deploys the application into liferay◦ backup: Creates Portal backup snapshot◦ restore: Restores Portal snapshot
List of utility shell script to trigger different Ansible roles◦ portal_deploy.sh: Run to install mysql, liferay and deploy the
portal and application◦ portal_update.sh: Run to update the application on portal.◦ portal_backup.sh: Run to create a snapshot of the portal
application◦ portal_restore.sh: Run to restore the portal snapshot
Above code is available at https://github.com/gunduv/portal-deployment
Recommended