Coder Social home page Coder Social logo

refarch-hybridcloud-blueportal-api's Introduction

Hybrid API DevOps - Activating APIs from Systems of Record (SoRs)

A DevOps platform for APIs provides the ability to streamline and automate the process of developing, building, testing and deploying APIs onto the API runtime cloud platform either when these APIs are organically developed or when they are exposed endpoints to existing backend services.

Architecture

Architecture Overview

Business leaders recognize a need for a new consumer-accessible service and work with their developers to design the solution. They identify a need for access to Systems of Record (SoRs) as part of the solution. Enterprise developers identify the required facilities and use API management and artifacts from their SoR development processes to expose the needed APIs internally and for use by System of Engagement (SoEs) developers in the Cloud. Having exposed these APIs through their Hybrid Cloud interface, both teams are now able to undertake their particular development processes with relative independence. Notably SoE developers can use agile DevOps methodologies to rapidly develop channel interaction services while relying on the support of stable SoR system APIs.

Architecture Component Tooling

The specific tools that are used to implement this reference architecture's components include:

  • SCM: GitHub
  • Build: Jenkins
  • Deploy: IBM UrbanCode Deploy (UCD)
  • SoR Runtime for API IBM Integration Bus (IIB)
  • SoR API Management: IBM API Connect (APIC)

Automating API deployment using a governance model

New or change to existing services and APIs are delivered continuously to a development pipeline. The changes are then handled to support a change and governance model to ensure API subscribers can easily consume the changes. This is critical when the changes delivered require any changes to the end-user subscriber. In order to support this governance model, we are following the processes outlined in the diagram below:

API Governance Model

This diagram shows how API implementations and the information published to APIC should be automated to ensure the release governance model is supported. The different types of API changes and the corresponding Product / API definition version increment rules for Product / API definitions include:

  • For major (API breaking) changes, defined as a change impacting the API endpoints or major changes to the API implementation, this will result in a major version increment (ie. 1.0.0 -> 2.0.0). The new version of the API will be published to the UAT and PROD catalogs and the subscriptions will be manually migrated. Once all the subscriptions are migrated, the older version of the API will be set to a "retired" state.
  • For minor (non-breaking) changes, there will be a minor version increment (ie. 1.0.0 -> 1.1.0). The new version of the API will replace the existing version in the UAT and PROD catalogs. The subscriptions will be automatically migrated and the older version of the API will be set to the "retired" state.
  • For bug fixes and/or patches to the API implementation that do not impact the API interface, no version changes to the API are expected.

Deployment Processes

This diagram reveals the overall DevOps workflow for API implementation and APIC publication using this architecture. The developer's role is to create code changes for the implementation as well as the yaml files reflecting the API data. These changes are committed to source control. The developer will then continuous coding and wait for any feedback from the delivery pipeline indicating success or failure to the build, scan, deploy or test portions of their DevOps process. The API management or API product owner delivers changes to their product yaml files reflecting any product level changes and waits for feedback, similarly.

Changes are promoted automatically using a defined set of business rules or through manual activation of the automation. In each case, a promotion to a new environment/catalog includes the latest versions of API code, yaml and the deployment processes. This provides a means to mature the process through testing and validation.

Deployment Sample

API Connect and IBM UrbanCode Deploy Configuration

This section explains the relationship between IBM UrbanCode Deploy and API Connect, and specifies the assumptions and requirements for supporting the API lifecycle management.

The following table provides a mapping between API Connect and IBM UrbanCode Deploy objects.

API Connect IBM UrbanCode Deploy Description
Catalog Environment A UCD environment represents an API Connect Catalog. Multiple Products may be deployed to an environment (catalog) as each product is represented by a product component resource in the environment.
API Connect Product/API definitions Component Each API Product within API Connect will be represented by one UCD component. The component is a logical grouping of the deployable artifacts of a given API Product, each component can have multiple versions where each UCD component version represent a particular release or build of the corresponding API Product. The API Product contains the definition of one or more APIs.
API Implementation Component(s) Each API implementation will be represented by a UCD Component. Each API defined in the Product has a corresponding implementation. The source code that implements the API may be from a variety of technologies such as StrongLoop Node.js, java, javascript or other languages. This component stores the deployable versioned artifacts that result from the build of the API’s implementation source code.

Implement and Explore this Reference Architecture

Repository Files

This repository contains the instructions, configuration files and example APIC yaml files to implement the architecture using the products noted above. The are two ways in which you can explore the architecture 1) using IBMs on demand lab environment or 2) implementing in your own environment. To accelerate your experience, this repository contains the assets to quickly establish an environment, implement the architecture and a guide to exploring the results. This repository contains:

Options to implement the architecture

1. Run the reference architecture in a IBM hosted lab environment.

Click the link below to experience this implementation using our cloud hosted lab, powered by IBM Cloud for Skytap Solutions.

A detailed set of instructions is available to begin your journey. No installation is required as this lab runs in a public cloud.

  • Locate the "HybridDevOpsForAPIC.pdf" document in this repository and use the steps outlined to explore this architecture.

2. Run the reference architecture in your local environment.

Step 1: Setup your local environment
Step 2: Configure pipeline tools
  • Re-create the Jenkins Job from disk

    • Copy the file acme-bank.tar.Z into the file system where Jenkins is installed.
    • Extract the contents of "acme-bank.tar.Z" into the <Jenkins installation dir>/jobs/
    • Navigate to the Jenkins feature Manage Jenkins and run "Reload Configuration from Diskk" to automatically create the acme bank job.
  • Import UCD configuration

    • Locate the file acme-bank.json and import it to the server file system where UCD is installed.
    • Locate the UCD import feature in Applications > Import. And run the import of the acme-bank.json.

UCD JSON Import

  • Re-create UCD Resource Tree
    • Create a Resource Tree similar to what is shown in the image below.

UCD Resource Tree

Step 3: Publish API and Product to API Connect
  • Locate the "HybridDevOpsForAPIC.pdf" document in this repository and use the steps outlined to complete the implementation and explore this architecture.

refarch-hybridcloud-blueportal-api's People

Contributors

gangchen03 avatar hollisc avatar msamanoibm avatar osowski avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

refarch-hybridcloud-blueportal-api's Issues

acme-bank: ERROR: Failed to create component version: 302

Pulled tutorial from https://github.com/ibm-cloud-architecture/refarch-hybridcloud-blueportal-api and ran it through an on premises installation of Jenkins, UCD Server and {APIC toolkit+UCD Agent}, with API Connect Mgmt server & DP gwy running. Have tried several variations & restarts over the last 8 hours. The errors vary, but the most frequent is "ERROR: Failed to create component version: 302". Does not seem like the source code from github reaches the UCD server. Attached files build8.zip (last build from the jobs directory) and jenkins.log.txt (stopped jenkins, cleared log to reduce size).

jenkins.log.txt
build8.zip

I installed & configured both Jenkins plugins:

  • IBM UrbanCode Deploy Pipeline (Build Steps) Plugin 2.6.929921
  • IBM UrbanCode Deploy Plugin 1.9.925586

Seems to use the latter, though the names in the configuration panel are difficult to relate to the Installed list. Help appreciated.

Semantic Versioning for Source Code & API URL

This article and lab address semantic versioning for the Product and YAML source code for the Product & API. Should we extend the scope to the API URL?

We start with Product: 1.0.0 and API: //https:/<...>/v1/<...> (note: "v1")

  • Minor Release Product: 1.0.0 -> 1.1.0, API: "v1" -> "v1"
  • Bugfix Product: 1.1.0 -> 1.1.1, API: "v1" -> "v1"
  • Major Release
    Product: 1.1.1, API: "v1" -- deprecate & retire
    Product: 2.0.0, API: "v2"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.