Develop in Public Cloud, Deploy Anywhere with IBM Cloud DevOps

5 min read

Why is multicloud deployment critical?

Multicloud deployment strategies are here to stay. A report released by RightScale recently documented that 81% of enterprises are currently pursuing a multicloud strategy. Multicloud doesn’t just mean other public clouds; it can also involve private clouds residing in an organization’s data center.

For developers, it’s becoming imperative that they’re able to develop applications in one place that can be deployed anywhere. For more and more organizations today, that means doing development in the public cloud. Cloud development makes it easier to rapidly develop, prototype, and test applications than on-premise development. But, it brings with it other problems: How easy is it to deploy an application created in one cloud to others? Is it possible to deploy applications from the public cloud to a private cloud?

Cloud deployment with IBM Cloud Continuous Delivery

Wikibon predicts that within the next five years, 90% of multicloud applications will use Kubernetes, so it makes sense to use that as a platform for development.

IBM’s cloud strategy is based around open technologies like Kubernetes, making it easy to build portable applications. IBM Cloud Continuous Delivery allows teams to quickly build, develop, and test applications for cloud deployment to Kubernetes. IBM Cloud is not your only option, though—it’s just as easy to deploy those same applications to clusters running on any cloud.

In this article, we explore how to deploy apps developed with IBM Cloud Continuous Delivery to a network-accessible IBM Cloud Private installation. However, the steps described here can be used for any other Kubernetes installation, with minor changes.

Deploying to IBM Cloud Private in five easy steps

A few configuration steps are required to allow IBM Cloud Continuous Delivery pipelines to deploy to your Kubernetes cluster on a network-accessible IBM Cloud Private installation.

  1. Set up your IBM Cloud Private registry policy in the IBM Cloud Private admin console: This policy will enable you to deploy images from the IBM public cloud registry to which your application was originally published. In addition, you’ll need to set up a non-expiring service account token so that you can communicate with your Kubernetes API server.
    Develop in Public Cloud, Deploy Anywhere with IBM Cloud DevOps-1
  2. Change the default pod security policy for the container namespace you’re deploying into:cloudctl cm psp-default-set unrestricted

  3. Copy the client configuration commands from your admin console. We will need these kubectl commands when we modify the deployment stage in our delivery pipeline.
    Develop in Public Cloud, Deploy Anywhere with IBM Cloud DevOps-2
  4. Modify your deployment stage in the IBM Cloud Continuous Delivery pipeline to include the client configuration commands from Step 3
    Develop in Public Cloud, Deploy Anywhere with IBM Cloud DevOps-3
    Develop in Public Cloud, Deploy Anywhere with IBM Cloud DevOps-4
  5. Run your updated deployment stage, and watch as the app deploys to your IBM Cloud Private Kubernetes cluster.
    Develop in Public Cloud, Deploy Anywhere with IBM Cloud DevOps-5

That’s it!

Next steps

For more details and a step-by-step example, follow the Garage tutorial here. The tutorial shows you how to do the following:

  1. Create a DevOps toolchain from a template to build and test a sample Kubernetes application.

  2. Deploy the application to a Kubernetes cluster running on the IBM Cloud.

  3. Modify and redeploy the application using the built-in Web IDE and Git Repos and Issue Tracking tools.

  4. Add a new stage to the deployment process to deploy the app to a staging area

  5. Modify the production deployment stage to deploy to IBM Cloud Private.

Check out the IBM Garage site for more tutorials on IBM Cloud Continuous Delivery, or start using it for free today.

In Part 2 of this series, we’ll take a look at how to deploy to Kubernetes clusters that are part of private cloud installations that are not network accessible. Stay tuned.

Be the first to hear about news, product updates, and innovation from IBM Cloud