Unit4 DevOps v2021
Unit4 DevOps v2021
0
Unit 4. Adopting a DevOps approach with IBM Continuous Delivery
Uempty
Overview
This unit introduces the features and functions of the DevOps services in the cloud development
platform, IBM Cloud
References
• What is DevOps?
https://www.youtube.com/watch?v=UbtB4sMaaNM
• DevOps For Dummies®, 3rd IBM Limited Edition, Chapter 1, found at:
https://www.ibm.com/downloads/cas/P9NYOK3B
• DevOps For Dummies®, 3rd IBM Limited Edition, Chapter 3
https://www.ibm.com/downloads/cas/P9NYOK3B
• IBM UrbanCode
https://www.ibm.com/cloud/urbancode
• Software testing
https://www.ibm.com/topics/software-testing
• Application Performance Management
https://www.ibm.com/cloud/learn/application-performance-management?mhsrc=ibmsearch
_a&mhq=application%20performance%20management
• AIOps tools
https://www.ibm.com/cloud/cloud-pak-for-watson-aiops
• IBM Garage methods
https://www.ibm.com/garage/method
• IBM Garage Methodology
https://www.ibm.com/garage/method
• IBM Cloud Continuous Delivery
https://www.ibm.com/cloud/continuous-delivery
Uempty
• DevOps tools and software
https://www.ibm.com/cloud/devops
• IBM Cloud DevOps
https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-devops_intro
• Canary deployment with Jenkins and Istio
https://developer.ibm.com/tutorials/use-jenkins-and-istio-for-canary-deployment/
• Watch Cloud Pak for Integration - Continuous Deployment using Operators and OpenShift
Pipelines
https://www.ibm.com/demos/collection/Cloud-Pak-for-Integration/?lc=en
• What is Continuous Delivery?
https://www.youtube.com/watch?v=2TTU5BB-k9U
• Continuous Deployment vs Continuous Delivery
https://www.youtube.com/watch?v=LNLKZ4Rvk8w
• IBM Cloud Continuous Delivery
https://cloud.ibm.com/catalog/services/continuous-delivery
• Develop a Kubernetes app toolchain:
https://www.ibm.com/cloud/garage/toolchains/develop-kubernetes-app-toolchain
• Develop a Cloud Foundry app toolchain:
https://www.ibm.com/cloud/garage/toolchains/develop-cloud-foundry-app-toolchain
• Experience the Cloud made for DevOps
https://cloud.ibm.com/devops/getting-started
• Develop a Cloud Foundry app toolchain
https://www.ibm.com/cloud/garage/toolchains/develop-cloud-foundry-app-toolchain
• Git project
https://www.git-scm.com/
Uempty
Uempty
Uempty
4.1. Introduction to DevOps
Uempty
Introduction to
DevOps
Uempty
What is DevOps
Reference:
What is DevOps?
https://www.youtube.com/watch?v=UbtB4sMaaNM
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Before DevOps, the following teams were responsible for code delivery:
• Development team: This team designed the code, delivered new features, fixed bugs, and
tested the code.
• Operations team: This team deployed the code to the different environments, maintained
production uptime, and diagnosed failures.
The process of delivering any business requirements from code to the production environment
was a tough process that took days to months to complete. It might have taken a year or more to
plan for major changes to the software. Both the development and operation teams focused on
their tasks separately without involving the other team, which caused bottlenecks and
miscommunication between the two teams. This process led to a delayed delivery of the business
requirements and made it hard to maintain competitive parity with competitors.
The term DevOps comes from merging the words development and operations. With DevOps, both
teams work together to support the software lifecycle, from code design to deployment to
production. Automation plays a great role in DevOps to make the collaboration easy.
A developer can use DevOps processes, automation, and other tools to automate the build
process, code testing, deployment to the different environments, and monitoring. It is an active
and continuous task to keep the automation, pipelines, and other entities in this realm up to date
and improve them. DevOps allows organizations to deliver products that are better and easier to
maintain, and that can be delivered faster to the market.
Reference:
DevOps For Dummies®, Third IBM Limited Edition, Chapter 1
https://www.ibm.com/downloads/cas/P9NYOK3B
Uempty
Continuous
Customer Feedback Collaborative
& Optimization Plan Development
Monitor/
DevOps Develop/
Operate Continuous Test
Feedback
Continuous Continuous
Monitoring Testing
Deploy
Continuous Release
and Deployment
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
The slide shows the software lifecycle for applying DevOps practices:
1. Planning: In this phase, the team is responsible of defining the business requirements, and
then defining the required resources and timeline (sprint planning and releases).
2. Development and testing: This phase is the main implementation phase that may be divided
into different sprints under different releases in agile development. Automated and
continuous test management occurs by using integrated tools.
3. Deployment: This phase is when you deliver the software to the client by deploying it to the
production environment. This phase is tightly linked with both development, testing, and
monitoring because of the DevOps focus on continuous and rapid delivery with automated
deployment.
4. Monitoring: After deploying the application to production, the quality of the application is
being analyzed to capture the enhancements and fixes for the delivered application in the
monitoring phase. This phase helps to identify issues and to provide early warnings and
feedback to the next planning and development cycles.
Uempty
DevOps practices
• Continuous improvement
• Release planning
• Continuous integration
• Continuous delivery
• Continuous testing
• Continuous monitoring and feedback
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Uempty
Reference:
DevOps For Dummies®, Third IBM Limited Edition, Chapter 3
https://www.ibm.com/downloads/cas/P9NYOK3B
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
This slide introduces some tools and practices around DevOps, testing, and application
performance management:
• Continuous delivery
Use the right DevOps tools to release applications more often and with higher quality. For
more information, see IBM UrbanCode at https://www.ibm.com/cloud/urbancode.
• Software and release testing
Test earlier in the DevOps software process with production-like environments to help
eliminate bottlenecks. For more information, see Software testing at
https://www.ibm.com/topics/software-testing.
• Application performance management
Monitor application transformation from on-premises to hybrid and multicloud deployments.
For more information, see Application Performance Management at
https://www.ibm.com/cloud/learn/application-performance-management?mhsrc=ibmsearch
_a&mhq=application%20performance%20management.
• Intelligent IT operations
Modernize IT operations management with AI and hybrid deployment options. Learn About
AIOps tools at https://www.ibm.com/cloud/cloud-pak-for-watson-aiops. Other tools that
were acquired by IBM are:
▪ Instana: https://www.instana.com/
▪ Turbonomics: https://www.turbonomic.com/
Uempty
• DevOps practices
Employ industry practices for agile development and continuous delivery. Explore IBM Garage
Methodology at https://www.ibm.com/garage/method.
• Cloud-native DevOps
Build, test, and deploy new apps on the IBM Cloud® with DevOps tools and practices. Learn
about continuous delivery at https://www.ibm.com/cloud/continuous-delivery.
Reference:
DevOps tools and software
https://www.ibm.com/cloud/devops
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
IBM Cloud Garage Method is a set of practices that can speed up DevOps adoption by providing
how-to guides on culture, best practices, tools, self-guided or hands-on training, and even sample
code and reference architectures. Its practices are the IBM approach to enable business,
development, and operations to design, deliver, and validate continuously new solutions. The
practices and workflows cover the entire product lifecycle from inception through capturing and
responding to customer feedback and market changes.
The practices are summarized as follows:
Culture
Culture is key to the success of the modern software development transformation such as agile
methodology, which is an iterative method of development where the development lifecycle
progresses through the collaboration between self-organizing, cross-functional teams. The
culture must support small and collocated teams that are autonomous and able to make
decisions that are based on efficiency and knowledge.
Discover
Discover practices help teams to dig deep into problem domains, align everyone to common
goals, and identify potential problems and bottlenecks.
Think
Think practices provide development teams with a repeatable approach to deliver rapidly
innovative user experiences. To deliver a minimum viable product (MVP), teams must understand
the user and identify the highest priority items.
Uempty
Develop
Adopt DevOps development practices to help the team collaborate and produce high-quality code
that can be confidently delivered to production. Many teams use pair programming to ensure
real-time code review with the added advantage of cross-training the development team.
Reason
Build a solid information architecture and extract, cleanse, and curate data so that data can be
turned into knowledge, regardless of the source of the data.
Operate
Ensure operational excellence by continuously monitoring app status and performance. Focus on
building automation that enables high availability (HA) and resiliency while reducing the cost of
the supporting infrastructure and the necessary resources to manage apps in production.
Learn
Learn from your customers and make better decisions. Learn how your team works together and
how customers use the apps that you deliver by studying analytics data.
References
• DevOps tools and software
https://www.ibm.com/cloud/devops/get-started
• IBM Garage Methodology
https://www.ibm.com/cloud/garage/practices/overview
• IBM Cloud DevOps
https://cloud.ibm.com/docs/services/ContinuousDelivery?topic=ContinuousDelivery-devops
_intro
Uempty
Benefits of DevOps
Uempty
Deployment strategies
• Blue/green deployment
• Canary deployment
• A/B testing
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Due to DevOps practices and agile methodologies, some new techniques to deploy new
applications to production appeared recently, such as:
• Blue/green deployment
• Canary deployment
• A/B testing
There are many tools that are provided by IBM to apply these strategies, such as IBM UrbanCode
Deploy, IBM Cloud Kubernetes Service, Istio, and Jenkins.
For more information, see the following tutorials:
• Canary deployment with Jenkins and Istio
https://developer.ibm.com/tutorials/use-jenkins-and-istio-for-canary-deployment/
• Watch Cloud Pak for Integration > Continuous Deployment using Operators and OpenShift
Pipelines
https://www.ibm.com/demos/collection/Cloud-Pak-for-Integration/?lc=en
Uempty
Databases Databases
Traffic Traffic
Load Load
balancer balancer
Client Client
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Blue/green deployment
1. Deploy an instance of your updated application “green” while leaving the production or old
environment “blue” as is.
2. Run smoke tests on the new environment “green” to verify that it is working.
3. Switch over the production traffic while keeping the old environment as a hot backup.
The new environment should point to the same database and use the same data set to avoid data
loss or inconsistency.
The slide shows how the blue/green deployment strategies are applied and how the traffic is
switched from the old “blue” environment to the new “green” environment.
Uempty
Databases Databases
Load Load
balancer balancer
Client Client
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Canary deployment
1. Deploy an instance of your application, and split the traffic based on the weight between the
old and the new environment.
2. Run smoke tests on the new environment to verify that it is working.
3. Gradually shift production traffic from the old environment to the new one.
Like blue/green deployment, the two environments point to the same database and use the same
data set to avoid data loss or inconsistency.
The slide shows how to split the traffic in the canary deployment. In this example, the old servers
start by handling all the traffic, and then gradually the traffic is shifted from the old to the new
servers.
Uempty
Servers Servers
Web Mobile
traffic traffic
Load
balancer
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
A/B testing
In this strategy, you route a subset of users to a new version because of marketing strategies. This
strategy is used to test various versions and determine which ones to keep and which ones to roll
out.
This slide shows an example of the A/B testing strategy. In this example, the mobile requests are
switched to target the new environment and the web requests keep targeting the old
environment.
Uempty
4.2. DevOps services on IBM Cloud
Uempty
DevOps services on
IBM Cloud
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
DevOps on IBM Cloud provides concrete practices and architectures for cloud development. It
enables developers to get started quickly with new projects from the rich catalog of services on
IBM Cloud. DevOps also provides developers an open and integrated set of tools for automating
delivery with speed and control. These services are available on the IBM Cloud Catalog under the
Developer Tools section.
Here are examples of the DevOps services that are available on IBM Cloud:
Auto-Scaling
The Auto-Scaling for IBM Cloud service enables the compute capacity of the applications to be
automatically increased or decreased as demands on the application change. The number of
application instances are adjusted dynamically based on the Auto-Scaling policy that is defined by
the developer.
Continuous Delivery
Automate builds, unit tests, deployments, and more. Edit and push code by using Git repos, Issue
Tracking, and the rich web-based IDE. Create toolchains to enable tool integrations that support
the development, deployment, and operation tasks. This service is explained in more detail in the
next section.
DevOps Insights
DevOps Insights provides comprehensive insights from popular continuous integration and
continuous delivery tools to increase the speed and control of the application delivery. View the
pipeline test results for every build and from every deployment and environment. Create policies
to ensure that only quality code is delivered to production, and review trends to understand
improvements over time.
Uempty
Event Management
Restore service and resolve operational incidents fast. Empower the DevOps teams to correlate
different sources of events into actionable incidents, synchronize teams, and automate incident
resolution. The service sets you on course to achieve efficient and reliable operational health,
service quality, and continuous improvement.
IBM Globalization Pipeline
IBM Globalization Pipeline is a DevOps integrated application conversion management service
that users can use to convert and release rapidly cloud and mobile applications to their global
customers. IBM Globalization Pipeline capabilities are accessible through its dashboard, a
RESTful API, or by integrating it seamlessly into the application's Delivery Pipeline.
Monitoring
Provides insight into how the apps are performing and consuming resources. Quickly identifies
trends and detects and diagnoses problems with immediate time to value and low total cost of
ownership (TCO).
Toolchain
A toolchain is a set of integrated tools for development, deployment, and monitoring. This service
is explained in more detail in the next section.
There are also third-party DevOps services that are available, such as IBM Cloud Activity Tracker
with LogDNA, IBM Cloud Monitoring with Sysdig, IBM Log Analysis with LogDNA, Mendix Platform
Service, and PagerDuty.
Uempty
4.3. IBM Cloud Continuous Delivery overview
Uempty
IBM Cloud
Continuous Delivery
overview
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Reference:
What is Continuous Delivery?
https://www.youtube.com/watch?v=2TTU5BB-k9U
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Reference:
Continuous Deployment vs Continuous Delivery
https://www.youtube.com/watch?v=LNLKZ4Rvk8w
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Uempty
• Collaborate with your team and manage your source code with a Git repository (repos) and
Issue Tracker that is hosted by IBM and built on GitLab Community Edition. Manage Git repos
through fine-grained access controls that keep code secure. Review code and enhance
collaboration through merge requests. Track issues and share ideas through the Issue
Tracker. Document projects on the wiki system.
To have a healthy toolchain, it must meet the needs of your development pipeline. So, developers
must include tools for the following items:
• Planning and collaboration, such as project management tools and communication tools like
Slack
• Source control tools like Git
• Tracking and escalating tools like Issue Tracking (GitLab)
• Continuous integration
• Monitoring tools
• Testing and automation tools
• Deployment tools
For more information, see IBM Cloud Continuous Delivery at
https://cloud.ibm.com/catalog/services/continuous-delivery.
For more information about how to create an open toolchain, which includes the minimum tools
that you need to develop and deploy a "Hello World" app (including Git repos and Issue Tracking),
see the following resources:
• Develop a Kubernetes app toolchain:
https://www.ibm.com/cloud/garage/toolchains/develop-kubernetes-app-toolchain
• Develop a Cloud Foundry app toolchain:
https://www.ibm.com/cloud/garage/toolchains/develop-cloud-foundry-app-toolchain
Uempty
Toolchain templates
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Uempty
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
After you enable IBM Continuous Delivery for your app, a new tab opens to configure IBM
Continuous Delivery Toolchains.
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
A toolchain is a set of tool integrations that supports development, deployment, and operations
tasks.
The UI to create a toolchain groups the tools into the following phases:
• THINK: This phase is for planning the application by creating ideas, tasks, or bugs by using the
Issue Tracker, which is part of the Git repository.
• CODE: This phase is for the implementation of the application by providing a Git repository as
a source code management (SCM) system, and a Web IDE (Eclipse Orion) to edit your code
online. In the repository, you can specify whether to clone a repository or start from scratch by
selecting New in the repository type.
• DELIVER: This phase is for configuring the delivery pipeline. By using it, you can specify
automatic build, deployment, and testing of your code after a developer pushes new code to
the Git repository.
• RUN: The output of this phase is to run the application in the IBM Cloud environment.
For more information, see Develop a Cloud Foundry app toolchain at
https://www.ibm.com/cloud/garage/toolchains/develop-cloud-foundry-app-toolchain.
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
To add tools, click Add a Tool from within a toolchain. With this feature, you have the flexibility to
integrate and add tools or services to your toolchain, such as Alert Notifications, Availability
Monitoring, DevOps insights, or many of the other DevOps services that are available on IBM
Cloud (some of these services are explained in the next slide).
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
The collective power of a toolchain is greater than the sum of its individual tool integrations.
In the Tool Integrations section, select each tool integration that you want to configure for your
toolchain. Consider the following examples:
• If you configure Sauce Labs, the toolchain is set up to enable adding Sauce Labs, which you
can use to add test jobs to the pipelines.
• If you configure PagerDuty, the toolchain is set up to send alert notifications to the specified
PagerDuty service when a major issue occurs.
• If you configure Slack, the toolchain is set up to send notifications to the specified Slack
channel.
• If you configure a source code tool integration, such as GitHub, the sample repo can be cloned
or forked (for example) into your GitHub account.
Uempty
4.4. Web IDE (Edit Code)
Uempty
Orion
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
The Web IDE features in IBM Cloud Continuous Delivery provide the following capabilities:
• Uses Eclipse Orion Web IDE.
• No installations are required. Use a browser to code.
• The Edit Code feature provides a workspace to develop source code and configuration files.
• Full-featured environment for writing your application code by using your web browser.
• Rich code completion capabilities for CSS, HTML, and JavaScript.
• Deploy, stop, and run applications from the Run bar.
• View the logs from the Run bar.
IBM Cloud Live Sync features (at the time writing, they are available for Node.js applications only):
• Live Edit: You can change your application from the Web IDE without redeploying it.
• Debug: When a Node.js application is in Live Edit mode, you can “shell” into it and debug it.
You can edit code dynamically, insert breakpoints, step through code, restart the runtime, and
do other actions by using the Node Inspector debugger.
Uempty
Project Navigator displays the Enable Live Edit and Debug Tools for Node.js
contents of the user directory for the applications.
application.
1 3
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
The Edit Code perspective for Eclipse Orion Web IDE is shown in this slide.
When you select a file, the editor displays the contents on the right side of the page. You can edit
source code, configuration files, and other artifacts directly within your web browser.
This view is for your local workspace on IBM Cloud. To commit the code changes, switch to the
GIT view, which is described in the next section.
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
When you open a Node.js script file, the editor provides real-time validation and syntax checking
of the source code. It uses tools, such as JSHint, which is a JavaScript code quality tool that helps
detect errors and potential problems in the code. A preview window flags warnings and errors.
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
To use the code completion shortcut, place your cursor within the editor and press Ctrl +
Spacebar. This feature displays the libraries that are available at the cursor point, including
third-party modules that you imported in the script. For example, as shown in the slide, the code
completion feature displays functions and templates for the Express web application framework
for Node.js because this point is the cursor point.
You can use templates to add blocks of code for common tasks, such as error handling or object
creation.
Uempty
1 2 3 4 5 6
1.The status area shows which 2. Click Play to deploy the 4.Open the deployed app.
launch configuration is app.
5.Open the logs.
selected, and the deployment
3. Click Stop to stop the
status. 6.Open the App Overview page.
application.
• Click Play to deploy the code in the current state of your workspace.
• To deploy only the changes that you checked in to the repository, use Delivery Pipeline.
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
You can quickly build and deploy your application to a test environment on IBM Cloud without
committing your code to the Git repository. The following features are highlighted in the slide:
1. The status area displays the launch configuration that the run bar uses during the build and
deploy task.
2. Click the Play icon from the Run bar to build and deploy the code in your user directory to your
IBM Cloud account.
3. Click the Stop icon to stop the application.
4. Click the Open Deployed App icon to open the application route.
5. Click the Open Logs icon to open application logs.
6. Click the Access icon to access the dashboard from the same bar.
Uempty
Edit in place
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
If you are building a Node.js application, you can use IBM Cloud Live Sync to update quickly the
application instance on IBM Cloud and develop without redeploying.
When you make a change, you can see that change in your running IBM Cloud application
immediately (without the need to recompile and redeploy).
IBM Cloud Live Sync works from the Web IDE and consists of the following features for Node.js
applications:
• Live Edit
You can change a Node.js application that is running in IBM Cloud and test it in your browser
immediately. Any changes that you make in a synchronized desktop directory or in the Web
IDE are instantly propagated to the application’s file system.
• Debug
When a Node.js application is in Live Edit mode, you can debug it on the Web IDE. You can edit
code dynamically, insert breakpoints, step through code, restart the runtime, and do other
actions.
Note
To use debug features, you must use the Chrome browser and Node.js V4 because IBM Cloud Live
Sync Debug uses Node Inspector to provide debug features, which are not available in the later
versions of Node.js.
Uempty
4.5. Source Code Management (Git repository)
and Issue Tracker
Uempty
Source Code
Management (Git
repository) and
Issue Tracker
Figure 4-34. Source Code Management (Git repository) and Issue Tracker
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
By default, enabling continuous delivery for an application creates a continuous delivery toolchain
for your application. This toolchain includes a Git repository that is based on GitLab. Git is an
open-source change management system. GitLab is the web-based Git repository. GitHub is
another example of a web-based Git repository.
The Git repository perspective in the Web IDE supports common Git commands to manage your
code. You can also develop your application on your own workstation and commit your changes to
the Git repository with a standard Git client.
For more information, see the open-source Git project at https://www.git-scm.com/.
Uempty
5
Commit the
changes to your
local repository.
Push the committed 6
changes to the
remote repository.
Review the
commit history
and comments.
Review the changes that
3
were completed.
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
The numbers that are shown in the slide correspond to the following steps:
1. Switch to the Git perspective from the navigation bar on the left side of the Web IDE.
2. You can review the commit history with the time and date for each commit. You can perform
actions for each commit, such as view the files that are committed and revert changes that
were introduced by any commit.
3. The Working Directory Changes pane detects any updated files in the user directory. Click a
file to review the changes that were made in that file.
4. Select the files that you want to commit and add a descriptive comment about the change.
5. Click Commit to commit the changes to your local repository.
6. The Outgoing pane lists the files that you want to commit to the remote repository. View the
outgoing changes, and then click Push to push the committed changes to the remote
repository.
If another user updated the files in the remote repository, the Incoming pane lists the updated
files.
Uempty
• Issue the status command to check whether your local copy is synchronized with the remote
repository:
git status
• Issue the commit and push commands to push changes from the local repository to the
remote repository:
git add -A
git commit –m 'Adding application description.'
git push
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
You can still develop your application on your own local workstation.
If you do not have a Git client that is installed, download and install the latest version of the Git
client from https://git-scm.com/downloads. To verify that the installation is successful, issue the
git –version command from the CLI.
To find the URL of the Git repository that is associated with your application, click View toolchain
from the Application Details and then click Git.
Retrieve a copy of the IBM Cloud application source code by using the git clone command. Issue
git clone $git-URL on your command-line interface (CLI). After you have a copy of the source
code, use a text editor or IDE to write and test your application.
To check whether another developer on your team updated the source code, run the git status
command.
To save the updated source code, run the git add command to stage the files to be committed.
Run the git commit command and enter a message for the history log to commit all the added
files to your local repository.
Run the git push command to send your committed changes to the remote repository.
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
The Issue Tracker tool is used to track items (issues) that require resolution or improvements in a
project.
Issues can be bugs, tasks, or ideas to be discussed. Also, issues are searchable and filterable.
Uempty
Creating an issue
• To create a bug or task, click New issue.
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Complete the form that is shown in the slide. Then, click Submit issue to create the bug or task.
Uempty
4.6. Automated build and deployment (Delivery
Pipeline)
Uempty
Automated build
and deployment
(Delivery Pipeline)
Uempty
Delivery Pipeline
• IBM Cloud Continuous Delivery runs the build and deploy scripts when either of the following
conditions occur:
When you commit your changes to the remote Git repository if this function is configured to be
triggered automatically.
When you click Play from the run bar.
• Jobs (Build, Deploy, and Test) are grouped into stages.
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
By default, IBM Cloud Continuous Delivery automatically runs the build and deploy tasks when
you commit changes to the Git repository. The pipeline also features a "run" icon that runs a stage
of the pipeline but runs on only committed code or builds, depending on the stage.
You can access the Continuous Delivery toolchain by clicking View toolchain from the Application
Details page. To browse the Delivery Pipeline (or any other tool), click its tool card in the toolchain
overview page.
Jobs (Build, Deploy, and Test) are grouped into stages. You can change the order of the stages by
dragging them.
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
You can customize Delivery Pipeline in multiple stages and multiple jobs within a stage:
• Create multiple stages that deploy code to the testing, staging, and production environments.
• Add jobs within a stage to run automated tests of your code.
You can configure each stage to include one or more jobs (Build, Deploy, and Test). You can also
configure a stage to include more than one job of the same type. For example, you can have a
stage that features one Build job, one Deploy job, and two Test jobs.
Uempty
2 3
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
The default build script is simple: It takes the files that are pushed to the remote Git repository
and triggers IBM Cloud to build your code in the server runtime.
You can customize the settings for the server runtime through the manifest.yml file.
After the build stage completes successfully, the deploy stage runs. Delivery Pipeline deploys the
built files to your IBM Cloud space.
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
By default, Delivery Pipeline runs the build stage when a client pushes any change to the master
branch in the remote Git repository.
If you do not want to automatically push your changes to your IBM Cloud account, change the
State trigger setting to Run jobs only when this stage is run manually.
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
You can extend the features of the build stage by adding jobs. Although by default Delivery
Pipeline names this stage configuration the Build Stage, you can add build, test, or deploy jobs.
At the time of writing, Builder Type supports the following types:
• Simple
• Ant
• Container Registry
• Custom Docker Image
• Gradle
• Gradle (Artifactory, Nexus, or SonarQube)
• Grunt
• Maven
• Maven (Artifactory, Nexus, or SonarQube)
• npm
• npm (Artifactory or Nexus)
• Shell Script
The simple build type runs the appropriate build scripts for your runtime environment. For
example, the IBM SDK for Node.js runtime resolves modules that your application requires.
Uempty
In this example, you create a deploy task that pushes the application to a specific space on IBM
Cloud.
The following Deployer Types are available:
• Cloud Foundry: Deploys applications to Cloud Foundry servers. This type is the default
deployer type for the deploy job.
• Kubernetes: Deploys applications to Kubernetes clusters, such as those found within the IBM
Cloud Kubernetes Service.
• Custom Docker Image: Deploy by using your custom Docker image with fine-grained control
over the versions of node, Java, or other tools.
In this example, your application is pushed to the development space in your organization. You
can also publish your application to your staging and production spaces.
You can customize the Cloud Foundry CLI commands (cf CLI) in the deploy process in the Deploy
Script section. The default deploy action is equivalent to running the cf push command from the
CLI. You also can add custom shell script commands. (${CF_APP} in the slide refers to the
application name).
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
After the deploy job is completed, you can add and configure a test job to test your deployed
application.
The following Tester types are available:
• Simple
• Custom Docker Image
• DevOps Insights Gate (DEPRECATED)
• Sauce Labs
• Simplified Cloud Foundry org and space shell
• Vulnerability Advisor
Uempty
Review the
Review the status of the status of the
1 2
build job. deploy job.
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
The default settings for the Delivery Pipeline are the following stages:
• Build Stage:
▪ Input: This stage is triggered whenever a change is pushed to Git.
▪ Jobs: Simple Builder Type.
• Deploy Stage:
▪ Input: This stage is triggered whenever the Build Stage completes successfully. It takes as
input the build artifacts that were produced from the Build Stage.
▪ Jobs: Deploys the application to IBM Cloud.
In this example, all the jobs in the Build Stage and Deploy Stage complete successfully, as shown
in the JOBS pane of the Build Stage and Deploy Stage.
The LAST EXECUTION RESULT pane shows that the application successfully deployed to your IBM
Cloud account, and that the application is running on IBM Cloud.
You can also check the build logs in the JOBS pane in the Build Stage column, the deploy logs in
the JOBS pane in the Deploy Stage column, and the runtime logs from LAST EXECUTION RESULT
pane in the Deploy Stage column.
You can also clone the Deploy Stage and deploy the application to any number of spaces in your
IBM Cloud account by clicking the gear icon at the top of Deploy Stage and selecting Clone Stage.
Uempty
Uempty
Review questions
1. ____ is a DevOps practice that allows applications to have automated deployments.
A. Continuous Improvement
B. Continuous Integration
C. Continuous Delivery
D. Release Planning
2. ____ is one of the DevOps services available on IBM Cloud.
A. Load Balancers
B. IBM Cloudant
C. Natural Language Understanding
D. Auto-Scaling
3. True or False. To create Continuous Delivery Toolchain for your IBM Cloud application, select
Enable in the Continuous Delivery pane.
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Uempty
Review answers
1. ____ is a DevOps practice that allows applications to have automated deployments.
A. Continuous Improvement
B. Continuous Integration
C. Continuous Delivery
D. Release Planning
2. ____ is one of the DevOps services available on IBM Cloud.
A. Load Balancers
B. IBM Cloudant
C. Natural Language Understanding
D. Auto-Scaling
3. True or False. To create Continuous Delivery Toolchain for your IBM Cloud application, select
Enable in the Continuous Delivery pane.
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Uempty
Adopting a DevOps approach with IBM Continuous Delivery © Copyright IBM Corporation 2016, 2021
Uempty
Exercise: Developing IBM Cloud applications with IBM
Cloud Continuous Delivery
Figure 4-55. Exercise: Developing IBM Cloud applications with IBM Cloud Continuous Delivery
Uempty
Exercise • In this exercise, you work with the IBM Cloud Continuous Delivery
services to explore, develop, build, and deploy IBM Cloud
objectives applications.
• After completing this exercise, you should be able to perform
the following tasks:
Enable your application to use IBM Cloud Continuous Delivery.
Create a Git repository to manage your source code.
View and edit code in the Eclipse Orion Web integrated development
environment (IDE).
Build and deploy code to IBM Cloud.
Test the application in IBM Cloud.