This project is part of the 'IBM Cloud Native Reference Architecture' suite, available at https://github.com/ibm-cloud-architecture/refarch-cloudnative
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:
To read more about the Open Toolchains, please check out this Blog post
Let's get started.
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.
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.
- Click on the Bluemix console and select API.
- Select the API Connect service.
- 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.
- After the API Connect service is created, launch the API Connect service.
- 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.
- Name the catalog "BlueCompute" and press "Add".
- Select the catalog and then navigate to the Settings tab and click the Portal sub-tab.
- 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.
- Once the new Developer Portal has been created, you will receive an email.
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.
- Enter toolchain name in the Name: field.
- 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.
- Click on Delivery Pipeline integration to do the configuration.
- 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.
- Adjust the Domain name and API Connect hostname to match the region. Also enter APIC Username and Password. Click Create to create the toolchain.
- 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.
- 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.
- 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.
- 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.
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:
-
Subscribe to the APIs via API Connect developerPortal.
Please follow reference the API subscription manual to subscribe and consume the APIs. -
Configure and Run the Mobile iOS BlueCompute App.
Please follow the Run the iOS application guide to setup your iOS application. -
Configure and Run the BlueCompute Web application.
Please follow the Run the BlueCompute web app to setup the Web application in IBM Cloud.
You have set up the BlueCompute stack using IBM Bluemix DevOps open toolchains.