Skip to content

Latest commit

 

History

History
73 lines (48 loc) · 6.31 KB

README.md

File metadata and controls

73 lines (48 loc) · 6.31 KB

DevOps for Cloud Native Reference Application

This project is part of the 'IBM Cloud Native Reference Architecture' suite, available at https://github.com/ibm-cloud-architecture/refarch-cloudnative

Introduction

DevOps, specifically automated Continuous Integration and Continuous Deployment (CI/CD), is important for Cloud Native Microservice style application. This project is developed to demonstrate how to use tools and services available on IBM Bluemix to implement the CI/CD for the BlueCompute reference application.

The project uses Bluemix DevOps open toolchains to implement the CI/CD. The goal is to standup most of the application components as part of an automated pipeline. So you don't have to go through the manual setup as outlined in the project main repository page. The toolchain for BlueCompute application looks like this:

DevOps Toolchain

To read more about the Open Toolchains, please check out this Blog post

Let's get started.

Setup BlueCompute application using Bluemix DevOps open toolchain

With the open toolchain, you should be able to stand up the entire application stack, including API gateway, Database, computing component, with little manual configuration.

Prerequisites

You need to have a Bluemix account. Login to your Bluemix account or register for a new account here

Once you have logged in, create a new space for hosting the application.

Step 1: Provision the API Connect Service

  1. Click on the Bluemix console and select API.
  2. Select the API Connect service.
  3. Click "Create" in the Getting Started with API Connect page. In API Connect creation page, specify the Service name for example cloudnative-apic-service. Then select the Essentials plan for this walkthrough.
  4. After the API Connect service is created, launch the API Connect service.
  5. In the API Manager page, navigate to the API Connect Dashboard and select "Add Catalog" at the top left. You may notice that a sandbox has automatically been generated for you.
  6. Name the catalog "BlueCompute" and press "Add".
  7. Select the catalog and then navigate to the Settings tab and click the Portal sub-tab.
  8. To setup a Developer Portal that your consumers can use to explore your API, select the IBM Developer Portal radio button. Then click the "Save" button to top right menu section. This will provision a portal for you. You should receive a message like the one below. API Info
  9. Once the new Developer Portal has been created, you will receive an email.

Step 2: Create the Bluemix DevOps toolchain

Click the following button to deploy the toolchain to Bluemix. The Bluemix DevOps runtime will parse the toolchain template file and creates associated DevOps components such as GitHub repos and Delivery Pipelines.

Create BlueCompute Deployment Toolchain

  1. Enter toolchain name in the Name: field. Create Toolchain
  2. By default, the GitHub integration is configured to clone the associated git repos to your GitHub account. Click on GitHub integration to see the list of repos that are setup to clone to your account.
  3. Click on Delivery Pipeline integration to do the configuration.
  4. By default the Bluemix Region, Organization, and Space information will be filled with the logged in Region, Organization, and Space values. Double-check to ensure this is the desired Region, Organization, and Space this toolchain should deploy to and update Region, Organization, and Space values accordingly.
  5. Adjust the Domain name and API Connect hostname to match the region. Also enter APIC Username and Password. Click Create to create the toolchain. Configure Delivery Pipeline
  6. Click on View Toolchain to go to the toolchain page. This toolchain will create and integrate eight GitHub repos with Issues enabled, and eight Delivery Pipelines each connected to one of the integrated GitHub repos. Configuration data is shared between all the delivery pipelines.

Step 3: Execute the toolchain

  1. Click on inventorydb-mysql delivery pipeline, and click the play button on BUILD stage to initiate the build and deployment of MySQL container running the inventorydb database.
  2. After the BUILD stage completes successfully it will automatically trigger the DEPLOY stage. Stay on the pipeline page to ensure both the BUILD and DEPLOY stages completed successfully. Successfully Deployed Pipeline
  3. Repeat above two steps for each delivery pipeline in the following order: netflix-eureka, netflix-zuul, micro-inventory, micro-socialreview, bff-inventory, api, bff-socialreview.

This completes the creation of Bluemix DevOps toolchain to deploy the BlueCompute omnichannel application.

Step 4: Complete the solution

After successfully running all the DevOps pipelines, you have the entire BlueCompute backend ready on IBM Cloud. There are 3 tasks remaining to get the BlueCompute application (both Mobile and Web) working:

You have set up the BlueCompute stack using IBM Bluemix DevOps open toolchains.