A collaborative DevOps is crucial to fast project development. With an MPL, modular pipeline library, such collaboration between teams is quick and easy.
2. Our Agenda
2
● MPL Overview and why would you need it
● What is CICD and why it is important?
● [Demo] Setup tools
● Explore Jenkins Pipelines and MPL Role
● [Demo] MPL Operation
● MPL Internals
3. 3
● It is a Jenkins Pipeline Library
● It is written in Groovy
● Modular and Extendable by Design
● Helps Build Development Collaboration and CICD
● Supports Unit Testing for Safer Development
So what is MPL exactly?
4. What Is CI/CD?
Code
Review
Build Deploy
Functional
Testing
Business
Testing
Security
Testing
Perf.
Testing
Release
4
Continuous Integration / Continuous Delivery Principles
5. What Is CI/CD?
Code
Review
Build Deploy
Functional
Testing
Business
Testing
Security
Testing
Perf.
Testing
Release
5
Continuous Integration / Continuous Delivery Principles
6. What Is CI/CD?
Code
Review
Build Deploy
Functional
Testing
Business
Testing
Security
Testing
Perf.
Testing
Release
6
Pipeline
Continuous Integration / Continuous Delivery Principles
11. Pipeline A:
Maven, Terraform, Jbehave
Pipeline B: Pipeline
C:
Gradle, Spinnaker, TestNG Make, Python,
Cucumber
RepositoryRepositoryRepository
What is Jenkins Pipeline : Shared Libraries
Pipeline
11
Jenkinsfile
Pipeline A
Jenkinsfile
Pipeline B
Jenkinsfile
Pipeline C
12. Jenkinsfile
Pipeline C
Jenkinsfile
Pipeline C
Jenkinsfile
Pipeline B
Jenkinsfile
Pipeline B
Jenkinsfile
Pipeline A
Jenkinsfile
Pipeline A
Pipeline A:
Maven, Terraform, Jbehave
Pipeline B: Pipeline
C:
Gradle, Spinnaker, TestNG Make, Python,
Cucumber
RepositoryRepositoryRepository
What is Jenkins Pipeline : Shared Libraries
Pipeline
12
Jenkinsfile
Pipeline A
Jenkinsfile
Pipeline B
Jenkinsfile
Pipeline C
13. Jenkinsfile
Pipeline C
Jenkinsfile
Pipeline C
Jenkinsfile
Pipeline B
Jenkinsfile
Pipeline B
Jenkinsfile
Pipeline A
Jenkinsfile
Pipeline A
Pipeline A:
Maven, Terraform, Jbehave
Pipeline B: Pipeline
C:
Gradle, Spinnaker, TestNG Make, Python,
Cucumber
RepositoryRepositoryRepository
What is Jenkins Pipeline : Shared Libraries
Pipeline
13
Jenkinsfile
Pipeline A
Jenkinsfile
Pipeline B
Jenkinsfile
Pipeline C
15. Privileged and Confidential 15
MPL Structure : Features
• Module overrides: project → nested lib → MPL
• Module inheritance: reuse logic of overridden module
• Nested library tree: to implement features for teams
• Unit tests: make sure your modules will work properly
21. 21
Addendum
vm startup script content for the demo:
# VM Details: Vanilla Centos 7 image; Open HTTP Traffic; All API permissions;
# copy-paste the script below into custom startup script box in GCP;
# PASSWORD metadata in instance will contain initial password for jenkins
# Make sure we have docker
until yum install -y docker; do sleep 5; done
# Start docker service
systemctl start docker
# Run official blueocean jenkins image
docker run -d -p 80:8080 jenkinsci/blueocean
CONTAINER=$(docker ps | tail -n 1| cut -f 1 -d ' ')
# Make sure Jenkins is up
until docker logs $CONTAINER | grep -B 1 initialAdminPassword; do sleep 1; done
# Add password to instance Metadata for easier retrieval for Demo purposes
gcloud compute instances add-metadata --zone us-central1-c --metadata
PASSWORD=$(docker logs $CONTAINER | grep -B 1 initialAdminPassword | head -n
1) $(hostname)
22. Few Words About me
22
● MS in CS
● Decade in
IT Automation
● 6 years
Senior Engineer
@Grid Dynamics
● Things I Like: Hiking, Fixing Cars, MTB, 3D Printing and
Fabrication