Continuous Delivery at Liferay A fast lane for your software updates Rubén Pulido @_rubenpulido Eduardo García @edupgv
What to expect During this session, you will 1. Understand what Continuous Delivery is and its benefits. 2. See how a Continuous Delivery pipeline works. 3. Learn how to quickly set up your own pipeline.
Why Continuous Delivery? Our highest priority is to satisfy the customer through early and continuous delivery of valuable software. - Agile Manifesto - http://agilemanifesto.org/
In other words
Definitions code unit pkg test environment delivery environment 1 delivery environment 2 delivery environment 3 production environment integration tests functional tests update tests stress tests PACKAGING CONTINUOUS INTEGRATION CONTINUOUS DELIVERY CONTINUOUS DEPLOYMENT
Benefits Low risk releases Faster time to market and feedback Higher quality Reliable measure of progress Happier teams
Continuous Delivery in Liferay Projects Liferay Digital Experience Platform (DXP) introduces a new scenario of SaaS applications that require: High availability Zero-fault tolerance Shorter release cycles Continuous Delivery is a keystone process for upcoming Liferay applications.
A Continuous Delivery Pipeline Delivery Environment 1 Delivery Environment N Prod Environment Code changes Integration tests pass Trigger CD Pipeline deplo y test deplo y test Manual Approval deplo y test App Code Repository CI System Start Delivery Process Production Ready Publishes to distribution repository Tag release Deploy release Distribution Repository
Continuous Delivery Pipeline Implementation Dev Environment Pre Environment Prod Environment Code changes Integration tests pass Delivery setup deplo y Code Build test deplo y Code Build test Manual Approval deplo y test App Code Repository (Github) CI System (Travis) Start Delivery Process (Github) Production Ready Publishes to distribution repository Deploy release Distribution Repository (Dockerhub)
Demo Time! Delivering your changes with speed and confidence to your customers.
Application
App change
Change code
Merge to master
Merged PR triggers build on Travis
Dockerhub
Github (Deployment Repo)
Get Source
Deploy to Dev
Test Dev
Deploy to Pre
Test Pre
Manual approval and deployment to Prod
Change deployed to Production!
Try it yourself! Prerequisites: Github account Travis account Dockerhub account AWS account
Try it yourself! Manual Steps: Fork and clone sample app (github.com/liferay-labs/liferay-game). Fork sample deployment (github.com/liferay-labs/liferay-game-deployment). Enable your cloned project in Travis and setup the environment variables as described in: github.com/liferay-labs/sepia-deployment-scripts/blob/master/readme.md Trigger a Travis build through a change on the sample app repository.
1st build: Automatic CD Pipeline setup Run tests Publish Docker Image Commit to deployment repo S3 Bucket IAM Policy DEV PRE PROD Setup AWS* IAM Policy test-dev test-pre test-prod IAM Role CodeBuild dep loy test dep loy test Approval Approval dep loy test *github.com/liferay-labs/sepia-deployment-scripts CodePipeline
Result of the 1st Travis build Your application is available on 3 AWS ElasticBeanstalk environments: http://<your_github_user>-liferay-game-dev.eu-west1.elasticbeanstalk.com http://<your_github_user>-liferay-game-pre.eu-west1.elasticbeanstalk.com http://<your_github_user>-liferay-game-prod.eu-west1.elasticbeanstalk.com Your AWS CodePipeline is setup.
Subsequent builds: Execution of the CD Pipeline Run tests Publish Docker Image Commit to deployment repo S3 Bucket Trigger CD Pipeline IAM Policy DEV PRE PROD D IAM Policy test-dev test-pre test-prod IAM Role d CodeBuild *github.com/liferay-labs/sepia-deployment-scripts CodePipeline e d dep loy d e pl d e test pl d dep eloy pl d e test pl Approval Approval d dep eloy pl d e test pl
Learn More Continuous Delivery continuousdelivery.com/ AWS Continuous Delivery aws.amazon.com/devops/continuous-delivery/ Blog Series goo.gl/b4rgmm
Summary Continuous Delivery allows delivering changes quickly and reliably to your customers. We ve seen how a Continuous Delivery Pipeline implementation works. Now you can easily setup your own Continuous Delivery Pipeline.
Q&A Don t be shy Contact us today at DEVCON or later at communitychat.liferay.com.
Thank you! Dank je!