CD+3 1+PPT

Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

Delivering Continuously

Types of Deployment and Jenkins Plugins


Course: Continuous
Deployment
Lecture
Edit Master On: Delivering
text styles
Continuously
Instructor: Manoj Kumar

2
Poll 1 to
Click (15add
seconds)
Title
State whether the following statement is true or false.
“Automated Deployments make the software delivery of new functionalities
continuously to the production environment to reach the users fast is called
Continuous Delivery.”

A. True
B. False
• Practice in teams of 4 students
• Industry expert mentoring to learn better
• Get personalised feedback for improvements

23/05/19 3 3 3
Poll 1 to
Click (15add
seconds)
Title
State whether the following statement is true or false.
“Automated Deployments make the software delivery of new functionalities
continuously to the production environment to reach the users fast is called
Continuous Delivery.”

A. True
B. False
• Practice in teams of 4 students
• Industry expert mentoring to learn better
• Get personalised feedback for improvements

23/05/19 4 4 4
Today’s Agenda
1. Jenkins Blue Ocean
2. Deployment strategies
a. Rolling deployment
b. Blue-Green deployment
c. Canary deployment
3. Jenkins third party plugins
a. Integration with Slack

Delivering Continuously 5
Jenkins Blue Ocean

Delivering Continuously 6
Jenkins With Continuous Deployment

● As you already know, Jenkins is one of the leading players in the CICD
enablement platform.
● Jenkins provides you the flexibility to add different stages in the pipeline,
as you have already seen in previous sessions.
● Also, in Jenkins, you can add smoke tests, functional tests or security
tests and L&P tests in each stage according to the need.
● Approvals between each stage can also be added if needed. This can be
implemented to establish a Continuous Delivery pipeline.
● Jenkins also allows you to publish the test results for a build back to itself
so that any user working on the pipeline can have a look and validate
before approval.
● In the demo, you will have a detailed look at how this is handled.
Jenkins Blue Ocean

● Blue Ocean is a plugin for Jenkins which provides a user experience


update that allows the users to customise their CD pipelines graphically
with the help of modern design suggestions.
Demo 1: Jenkins Blue Ocean Demo

● Jenkins Blue Ocean enablement


○ Adding plugin
○ Exploring the different features of Blue Ocean
● Jenkins Blue Ocean walkthrough
○ Changes in the UI

9
Poll 2to
Click (15add
seconds)
Title
State whether the following statement is true or false.
“Blue Ocean is a replacement for Jenkins”

A. True
B. False

• Practice in teams of 4 students


• Industry expert mentoring to learn better
• Get personalised feedback for improvements

23/05/19 10 10 10
Poll 2to
Click (15add
seconds)
Title
State whether the following statement is true or false.
“Blue Ocean is an replacement for Jenkins”

A. True
B. False

• Practice in teams of 4 students


• Industry expert mentoring to learn better
• Get personalised feedback for improvements

23/05/19 11 11 11
Poll 3 to
Click (15add
seconds)
Title
State whether the following statement is true or false.
“Blue Ocean is a mandatory component of Jenkins Image in Docker Hub”

A. True
B. False

• Practice in teams of 4 students


• Industry expert mentoring to learn better
• Get personalised feedback for improvements

23/05/19 12 12 12
Poll 3 to
Click (15add
seconds)
Title
State whether the following statement is true or false.
“Blue Ocean is an mandatory component of Jenkins Image in Docker Hub”

A. True
B. False

• Practice in teams of 4 students


• Industry expert mentoring to learn better
• Get personalised feedback for improvements

23/05/19 13 13 13
Deployment Strategies

Delivering Continuously 14
Rolling Deployment

● A step by step approach


● Reduces the risks of downtime
● The new version in the deployment gradually replaces the previous one
● If we have five servers in which the application is deployed, the new
version deployment will happen in one server and then the next and
repeat for all 5.
● This will ensure that if we have some errors, we find this early and rectify it
before the whole system collapses and also there is no downtime for the
user.
● When it comes to containerised applications, pods/containers with the
new version pops up. Then, once that is active the older one gets wiped
away. This makes the user feel that there is no downtime and there is a
change
Rolling Deployment
Rolling Deployment

● In Jenkins, in the pipeline, each stage will have the following:


a. Deployment
b. Validation of the new version
c. Switching the load balancer settings
Blue-Green Deployment

● Fail safe way of deployment


● Two identical production environments will be available
● One will be taking all the user traffic as of now - blue
● Second one will be idle which is a clone of the blue one - green
● Mostly same DB and configurations are used
● The new version is deployed to green environment.
● The green environment is tested.
Blue-Green Deployment

● Once the tests are successful, the traffic is routed to the current green
environment.
● Then green becomes active and the blue becomes idle.
● This process is ideal for immediate rollback when the deployment fails
and the new changes need to be tested without user being interrupted.
Blue-Green Deployment
Canary Deployment

● Similar to Blue-Green Deployment


● Phased approach of switching between versions of an application
● The new version is deployed/released to a small part of infrastructure
● Load balancer is modified for few user traffic to be routed to the new
version
● If no errors are reported, we can then roll forward the version to all the
remaining infrastructure
Canary Deployment

● The deployment can be opened up to the user base in this way:


- Internal users for check
- Regional users
- IP address ranges
- Based on behaviour of users
Canary Deployment
Poll 4to
Click (15add
seconds)
Title
Which deployment method will be preferred if you want to release the
code first to some beta users in a region

A. Blue green
B. Rolling
C. Canary

• Practice in teams of 4 students


• Industry expert mentoring to learn better
• Get personalised feedback for improvements

23/05/19 24 24 24
Poll 4to
Click (15add
seconds)
Title
Which deployment method will be preferred if you want to release the
code first to some beta users in a region

A. Blue green
B. Rolling
C. Canary

• Practice in teams of 4 students


• Industry expert mentoring to learn better
• Get personalised feedback for improvements

23/05/19 25 25 25
Demo 2: Deployment Strategies

● Setting Up Jenkins Pipeline for ECS Rolling update


● Triggering the deployment
● Rolling update in ECS

26
Poll 5to
Click (15add
seconds)
Title
State whether the following statement is true or false.
“Blue Ocean changes the complete installation of Jenkins”

A. True
B. False

• Practice in teams of 4 students


• Industry expert mentoring to learn better
• Get personalised feedback for improvements

23/05/19 27 27 27
Poll 5to
Click (15add
seconds)
Title
State whether the following statement is true or false.
“Blue Ocean changes the complete installation of Jenkins”

A. True
B. False

• Practice in teams of 4 students


• Industry expert mentoring to learn better
• Get personalised feedback for improvements

23/05/19 28 28 28
Jenkins Third Party Plugins

● It is a common practice to integrate third party API/softwares into CD


pipelines.
● These are used for various use cases and reasons that include:
○ Notifications
○ Alerts
○ Monitoring etc.

● You can look at how you can integrate the APIs of Slack and Teams to the
Jenkins pipeline
Jenkins Third Party Plugins

● In Jenkins, you can use a plugin “Slack Notification Plugin”


● Once the plugin is available, you can use the following steps:
○ slackSend: Send Slack Message
○ slackUploadFile: Upload file to slack
Demo 3: Slack Integration Demo

● Navigate through a Slack Account


● Integrate it with Jenkins

31
Doubt Clearance Window

Delivering Continuously 32
This class has covered the following topics:

1. Jenkins Blue Ocean


2. Deployment Strategies
a. Rolling deployment
b. Blue-Green deployment
c. Canary deployment
3. Jenkins Third-Party Plugins
a. Integration with Slack

Delivering Continuously 33
What’s Next?

1. Distributed Builds with Jenkins


2. Master Slave Model in Jenkins
3. User Access Permissions in Jenkins
4. Jenkins Build Metrics
5. Job Sequencing in Jenkins

34
Delivering Continuously
Tasks to complete after today’s session:

MCQs

Practice Questions

Practice Project

Delivering Continuously 35
#RahoAmbitious

Thank You!

36

You might also like