Quickly Develop, Build, and Deploy Applications on IBM Cloud with DevOps services
5 min read
By: Steven Weaver
Quickly Develop, Build, and Deploy Applications on IBM Cloud with DevOps services
For development teams getting started with new cloud projects, whether they’re mobile, web, or IOT, setting up the needed resources, DevOps services and tools can take up a significant amount of time – time the delivery team could use being productive and innovative in their approach to continuous delivery of apps. Teams need to think about the following key aspects as they set up their new projects:
For most companies, increasing competitiveness in their industry is driving a desire to increase the speed of their software development and reduce the time to market. In order to do so, they’re adopting best practices around continuous delivery, availability, and security. Implementing these agile development strategies often requires companies to spend time in educating teams on DevOps methodologies and setting up resources for these new processes.
Project teams must provide a secure environment for all the team members on the project. Typically, separate tools are set up for different team roles and needs –across not just developers, but IT operations, business analysts and other stakeholders. These tools include solutions for planning, coding, build, test, deployment, monitoring and security. In addition, practitioners are typically loathe to take time out of their primary tasks to provide governance and compliance information, so providing data to key stakeholders about updates on assignments, the progression of development, and reporting software issues can be time-consuming.
Developer teams often face lengthy setup processes before they can even begin productive work on a project. That’s because of the time involved in the identifying the correct processes, tools, integrations and notifications. These tasks may include setting up of IDEs, getting access to the appropriate code repositories, and/or identifying infrastructure needed for builds, tests, and production.
IBM DevOps services
Fortunately, DevOps services on the IBM Cloud like IBM Bluemix Continuous Delivery provide a way for teams to rapidly get started with their new projects on the cloud. Building on best practices outlined in the IBM Cloud Garage Method, it encapsulates in easy to clone templates the tools, collaboration and infrastructure required to start being productive immediately with cloud projects, including those that leverage exciting new technologies like cognitive or blockchain.
The key benefits of the Bluemix Continuous Delivery service include:
Automatic provisioning of the underlying Bluemix services needed for your project and application.
A unified experience for access management for your entire software team.
Pre-configured project management dashboard for tracking various activities, such as code commits, build results, and deployment activity.
Built-in dashboards and data reporting services to learn where you most need to improve your developer productivity, code quality, and delivery cycle times, with machine-learning insights to improve the agility, reliability, and security of your applications and your DevOps process.
Sample code to help you get up and running quickly enabling you to use your favorite IDEs, like Visual Studio, Eclipse, or any code editor that supports Git.
Automated configuration of a continuous delivery pipeline for each project using the built-in IBM Bluemix Delivery Pipeline, UrbanCode or Jenkins.
Integration with over 20 common DevOps tools including Git repositories and issue tracking hosted by IBM and built on GitLab Community Edition, GitHub, IBM Rational Team Concert, Atlassian JIRA Software, Sauce Labs, Slack and many others.
With Bluemix Continuous Delivery, development teams can build an agile software development workflow that not only increases the speed in which teams can deploy software and bug fixes, but also enables developers to build software that is more inline with customers’ requests and needs.
An example of a responsive development workflow that can be enabled using Bluemix Continuous Delivery is shown below (for more details on this DevOps reference architecture, check out the IBM Cloud Garage Method):
Sample DevOps Architecture Diagram
Getting Started with Bluemix Continuous Delivery
Now that you know a little more about the Bluemix Continuous Delivery service, let’s jump into using the service to set up a web application project. There are a couple of ways to do this, depending on whether you want to create a new application or add continuous delivery to an existing project. I’ll start by showing you how to create a toolchain from a template, and in a follow up blog post, I’ll show you how to create a toolchain starting from an existing application.
Creating a toolchain from a template
Let’s begin by creating a new toolchain from the Bluemix Continuous Delivery start page. I click the Get Started button:
Get Started with Continuous Delivery
You’ll be asked to login to Bluemix if you haven’t already done so. If you haven’t signed up for Bluemix yet, you will be asked to create a new account. you can try Bluemix free for 30 days without requiring a credit card. all you need to do is sign up and start building.
At this point, I am presented with over a dozen different project templates to choose from in order to provision various environments for my software development needs. Each template provisions a DevOps toolchain with a set of tool integrations that support development, deployment, and operations tasks, as well as a sample app that shows how that particular type of development solution can be implemented in Bluemix. Bluemix Continuous Delivery currently supports templates for Cloud Foundry Apps, Microservices, and Containers, with a variety of common DevOps tool integrations like GitHub, Sauce Labs, Slack and Pager Duty, and more with a simple click of a button.
For my first Bluemix Continuous Delivery project, I am going to build a simple Cloud Foundry web application using Node.js.
Delivery Pipeline for Node.js web application
You will notice for this template Bluemix Continuous Delivery sets up all of the tools and services you need for a development project including an Delivery Pipeline connected with a GitHub repository and Issue Tracker, a Web IDE and DevOps Insights for analysis and dashboards. The toolchain deploys a sample node.js weather app, runs unit tests using Mocha and checks code coverage using Istanbul. I’ll name my new project, node-app-sample-v1, and click Create.
Deploy the sample toolchain
The toolchain automatically runs and deploys the sample application into the IBM Cloud, provisioning all the services necessary to run the application. Once the toolchain has been created and configured, you’re taken to the toolchain overview page, where you can access all the tools and manage your project.
Configured Toolchain with Deployed Application
By clicking on the Add a Tool button, you can add additional tools from the integration catalog to your existing toolchain. It’s also possible to start from a blank toolchain template and add your tools from scratch, rather than using one of the pre-configured templates. In another blog post, I’ll show you how to do that. There’s a large selection of over 20 tool integrations that you can pick from including common DevOps tools like Jenkins, GitHub, Gitlab, Jira, SonarQube, Sauce Labs, Pager Duty, and Slack, as well as IBM tools like Rational Team Concert and UrbanCode. In upcoming blog posts, I’ll show you how some of these integrations work. Selecting a tool takes you to it’s configuration page, where you can add parameters for your installation. If you don’t see an integration with your favorite tool, you can step through the Other Toolwizard to configure one.
Tool Integration Catalog
From the main toolchains page, you can access the application details directly using the connections link on the left, and also manage the users who have access to the toolchain. Bluemix permissions are based on user and organization. To find out more, take a look at the documentation on user roles and permissions.
Add user and access permissions
Once the toolchain is set up, the application will be automatically deployed to the IBM Cloud. Clicking on the delivery pipeline tile on the toolchains. main page takes you to the delivery pipeline view, which allows you to manage the stages of the deployment process. In our example, there are four stages:
A staging environment. Once built, code is deployed automatically into a staging environment where we run a functional verification test.
A gate stage which leverages DevOps Insights to monitor the results from our testing efforts, and based upon defined parameters decides whether to stop pipeline execution or allow deployment into production
A production stage which deploys the application into production.
Any number of stages can be configured in a delivery pipeline, and at each stage, jobs can be executed as part of the process. This provides development teams with significant flexibility in automating the delivery process.
Once the delivery pipeline has executed, you can view the sample app by clicking the View App button on the main toolchain page, or by clicking the link in the delivery pipeline deployment stages. In our case, the sample app is a simple node.js web application that gets data from a weather service.
Deployed Sample app
It’s easy to access the source code for the information – either directly in the GitHub repository by clicking on the Repository tile in the toolchain main page, or by click ing the IDE tile to view code in the web-based Eclipse Orion IDE. The Eclipse Orion Web IDE is a web-based, integrated development environment where you can create, edit, run, debug, and perform source-control tasks. You can seamlessly move from editing to running to submitting to deploying.
Eclipse Orion-based Web IDE
You can commit your update code into GitHub right from the web IDE. Simply type a commit message and make sure that the changed file is selected, then Click Commit to put the changes in the local master branch. Finally, to push the changes to the origin/master branch, click Push. The origin/master branch is used by the pipeline, which automatically builds and deploys your changes.
Commit Code into GitHub
Once the app is running, you can access and modify all the app parameters in the dashboard. From here, you can modify the runtime environment, monitor the connections to other services the app is using, or create and bind new services to your app. Bluemix includes services available from IBM® and third-party providers. These include Watson, Internet of Things, Analytics, Mobile, and DevOps services. You can also integrate your app with monitoring services including IBM Bluemix Availability Monitoring to ensure your app is performing as expected.
Finally, you can access DevOps Insights to understand how your app or development process is performing. In this case we can understand our deployment risk by analyzing the results from unit tests, functional tests, application scans, and code coverage tools as specified gates in your deployment process and prevents risky changes from being released. It also offers data visualizations and analysis that you can use to understand your project’s health at a glance.
Deployment Risk Analytics
Developer Insights provides a comprehensive way to explore your project’s development risk. You can identify files with high error proneness and get a compliance view of the project against DevOps practices.
In my journey of the Bluemix Continuous Delivery service, I created a node.js web application and provisioned my entire development toolchain for coding, building, testing, and deployment for my node-app-sample-v1 software project using Bluemix services. Amazingly, I have yet to scratch the surface of the benefits of using Bluemix Continuous Delivery to manage day-to-day software development activities involved in releasing applications.
Bluemix Continuous Delivery makes it easy for you to quickly develop, build, and deploy applications on IBM Cloud. Bluemix Continuous Delivery provides a unified user interface, enabling you to easily manage your software development activities in one place. Bluemix Continuous Delivery allows you to choose from various templates for setting up projects for Cloud Foundry Apps, Containers and Microservices. Templates come pre-configured with a issue tracking, a source code repository, an automated continuous delivery pipeline, and a web IDE allowing developers to implement modern agile software development best practices. Each Bluemix Continuous Delivery project gives developers a head start in development by providing working code samples that can be used with popular IDEs that support Git. Additionally, Bluemix Continuous Delivery provides out of the box integration with third party software like Atlassian JIRA Software, Sauce Labs, Slack, PagerDuty, SonarQube as well as IBM software.
You can get started using Bluemix Continuous Delivery for developing new software projects on IBM Cloud today. Learn more by reviewing the Toolchain information on the IBM Cloud Garage Method pages, and the Bluemix Continuous Delivery user guide documentation.