Overview

Skill Level: Intermediate

IBM Cloud Pak for Integration Asset Repository is an add-on to the IBM Cloud Pak for Integration (ICP4I) that allows the user to store, manage, retrieve and search integration assets within the IBM Cloud Pak for Integration and its capabilities.

Ingredients

Introduction:

IBM Cloud Pak for Integration Asset Repository is an add-on to the IBM Cloud Pak for Integration (ICP4I) that allows the user to store, manage, retrieve and search integration assets within the IBM Cloud Pak for Integration and its capabilities.

Users of the Cloud Pak are able to utilise the Asset Repository to share integration assets across the platform capabilities. Storing assets, e.g. JSON schemas, within this repository allows them to be accessed directly within the user interface of certain Integration capabilities. For example, an OpenAPI specification asset stored in the repository can be directly imported within the IBM API Connect user interface.

Prerequisites:

1- A storage provider that supports Read Write Many (RWX) persistent volumes. We will use Glusterfs storage here.

2- A user with cluster administrator role is required to install the chart.

3- Red Hat OpenShift SecurityContextConstraints Requirements:
This chart requires a SecurityContextConstraints to be bound to the target namespace prior to installation. To meet this requirement there may be cluster-scoped, as well as namespace-scoped, pre- and post-actions that need to occur.

The predefined SecurityContextConstraints ibm-privileged-scc has been verified for this chart; if your target namespace is bound to this SecurityContextConstraints resource you can proceed to install the chart.

Run the following command to add the service account of the Integration server to the privileged scc:

oc adm policy add-scc-to-group ibm-privileged-scc system:service

Resources Required
This chart deploys in a HA configuration by default which has the following resource requirements:

4.25 CPUs
8.5 GB Memory
The number of replicas for certain components can be configured during install which would alter these requirements.

Image Pull Secret: If you are using a private Docker registry (including an ICP Docker registry), an image pull secret needs to be created before installing the chart. Here will use OCP registry, so will create image pull secret.

Step-by-step

  1. Create image pull secret

    Create image pull secret in the namespace where you are planning to deploy Asset Repository. Here we will depoy it in ‘integration’ namespace.¬†

    Login to OCP using below command

    oc login <OpenshiftURL> -u <username> -p <password>

    For example OpenshiftURL is https://prod-master.fyre.ibm.com:8443

    Switch to ‘integration’¬†namespace using ‘oc project’ command:

    oc project integration

    Run below command to create the secret with the name ‘assetregistrysecret’

    oc -n integration create secret docker-registry assetregistrysecret \
    --docker-server=docker-registry.default.svc:5000 \
    --docker-username=$(oc whoami) \
    --docker-password=$(oc whoami -t) \
    --docker-email=ananaw16@in.ibm.com

    Email could be any email address.

  2. Install Asset Repository

    Login to integration platform navigator and click on ‘Install asset repository’.

    Screen-Shot-2019-10-30-at-1.27.12-PM

     

    Enter the name of Helm release, target namespace and target cluster.

    Screen-Shot-2019-10-30-at-2.22.26-PM

    Specify Image pull secret and docker registry. By default “cp.icr.io/cp/icp4i/” would be populated in Docker registry. We will change it to private docker registry of OpenShift to pull images for asset repository. If you are installing for production uses, keep the ‘Production usage’ checkbox checked, else uncheck it.

    Screen-Shot-2019-10-30-at-2.26.41-PM

    Specify the platform navigator namespace. By default it would be ‘integration’, unless you had changed it in config.yaml while deploying CP4I.

    ‘Hostname of the ingress proxy to be configured’ should be set to hostname of the ingress proxy; e.g. in my case it is ‘icp-proxy.9.204.169.137.nip.io’. Note that¬†it is the value of ‘proxy-host’ under ‘router’ section in config.yaml.

    Specify the glusterfs storage class name for ‘Cloudant metadata store storage class’.

    By default ‘assetrepo’ is populated for ‘Ingress path’. You can modify it if required or leave it to default.

    Screen-Shot-2019-10-30-at-2.34.55-PM

    Specify the storage class for glusterfs for ‘Catalog remotes Storage Class’.¬†

    Screen-Shot-2019-10-30-at-2.39.28-PM

    You can leave all other parameters to default. Click on ‘Install’. It will take few minutes to install.¬†

    After successful installation, you can see all the pods running for asset repository.

    Screen-Shot-2019-10-30-at-2.43.29-PM

    Navigate to the asset repository release in platform navigator.

    Screen-Shot-2019-10-30-at-2.45.25-PM

    Click on the release name of asset repository and it will navigate to the asset repository.

    Screen-Shot-2019-10-30-at-2.47.31-PM

    You can add assets to asset respository from local system or from different integration components or from remote GitHub repository etc. The assets can be shared in controlled manner with the help of proper ‘Access Control’ configurations.

  3. Conclusion

    In this recipe we learnt how to deploy Asset Repository in Cloud Pak for Integration. There are more features coming in Asset Repository very soon. Stay tuned !!!

Join The Discussion