automating the build and deployment of legacy applications
TRANSCRIPT
![Page 1: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/1.jpg)
Automating the build and deployment of legacy applications
The CWC experience
![Page 2: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/2.jpg)
Steve JuddSystems Architect at CWC
Cable & Wireless CommunicationsFull service Telco (fixed, mobile, broadband, TV)Main businesses in Caribbean & Panama
![Page 3: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/3.jpg)
Background
![Page 4: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/4.jpg)
• N-tier application: ‘Liberate’
• Installed in multiple Business Units, on multiple environments
• Several releases are actively supported
The Application....
![Page 5: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/5.jpg)
Challenges...
• 2 Version Control Systems:– Subversion for Java tiers– CMS for the Cobol code
• Each tier has its own build/deploy tools
• Many manual steps• Much co-ordination required• Dependency on highly
knowledgeable people• Equals risky, stressful, labour-
intensive releases• And finally…. CWC HQ is moving
to Miami this year
![Page 6: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/6.jpg)
Objectives...
• Significantly reduce manual effort
• Simplify & streamline build & deploy process
• Remove dependency on VMS skills & highly knowledgeable people
• Migrate to one VCS• All to be completed by
June!
![Page 7: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/7.jpg)
Approach
![Page 8: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/8.jpg)
Some theory...• Useful books:
– “Continuous Delivery” by Jez Humble & David Farley
– “Jenkins - The Definitive Guide” by John Ferguson Smart
• Both contain useful ideas and approaches
However….• Daunting to apply these to a
traditional development shop...
• … with a large, complex legacy application
![Page 9: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/9.jpg)
What to do, what to do...• Migration to a single VCS +
formally define the branching strategy
• Selection & adoption of a single tool to manage generation of application binaries
• Selection & adoption of a single tool to manage deployment
![Page 10: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/10.jpg)
Our build/deploy pipeline...
Responsibility of Dev teamsUnit testingFunctional testingCommit to VCS
Compilation & generation of binariesRun any automated testsStatic code analysisGenerate Javadocs
Push binaries to Deployment server
Package binaries into environment specific deployables
Actual deployment mechanism
![Page 11: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/11.jpg)
Version Control
![Page 12: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/12.jpg)
Subversion...• Our VCS of choice• Why?– Reliable– Straight-forward to understand
& use– Good set of client tools– ...can even use under VMS!– Optimistic locking model
• Does mean we’ll be migrating our Cobol source though• Also need to change VMS development environment
![Page 13: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/13.jpg)
Branching strategy
• Branch for latest development release (aka trunk)
• Branch for each major release (3,4,5 etc)
• Branch for each release build in a BU production environment
• 3 Subversion repositories: one for each application
• Standardise the branch naming convention
![Page 14: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/14.jpg)
Subversion: lessons learnt• Merging – do it often &
check every merged file• Meaningful commit
messages• Using a VCS to store binary
libraries can be a bad thing• More small repos better
than fewer large
![Page 15: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/15.jpg)
Building binaries
![Page 16: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/16.jpg)
Binary generation• Jenkins is our Build Server of choice• Why we like it:
– Familiar technology– Integrates well with Subversion & Ant– Extensive library of plugins– Straight-forward to use/configure– Master/slave model– Ability to invoke scripts on a remote host
![Page 17: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/17.jpg)
Plugins we use• Build Pipeline
– provides a view of upstream & downstream jobs
• Copy Artifact– Enables artifacts to be copied from another job– We use it a lot with Build Pipeline
• Text-findr– Searches for specified text in files & console output– Handy when scripts’ return code not sent back to Jenkins
![Page 18: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/18.jpg)
Deployment
![Page 19: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/19.jpg)
Our requirements• Complex deployment needs:
– Multiple Business Units– Each has a production environment + 1
or more UAT environments– Business Units often on different releases– Many system test environments
• Thus keeping track of what release where is important
• Management of Application Configuration
• 2 phase deployments• Able to deploy to Linux, Windows and
VMS
![Page 20: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/20.jpg)
Why we chose DeployIt• It meets our requirements • Dictionaries for the configuration values• Handles Linux, Windows and VMS deployments• Release Dashboards• Composite packages for multi-app deployments• Custom plugin for 2 phase deployments• Only transfers packages that have changed
![Page 21: Automating the build and deployment of legacy applications](https://reader036.vdocuments.mx/reader036/viewer/2022062405/554fa12ab4c9057b298b48d4/html5/thumbnails/21.jpg)