Originally published on October 30, 2019 on IBM Developer Recipes/ Updated on March 19, 2020
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.
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 RequiredThis chart deploys in a HA configuration by default which has the following resource requirements:
4.25 CPUs8.5 GB MemoryThe 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 we will use OCP registry, so will create image pull secret. A default image pull secret gets created in each namespace with the name like 'default-dockercfg-<xxxxx>' to pull the images from the same namespace. So if your ImageStreams are in same namespace, you can use this secret created by default. If you are pulling from IBM container registry, use ibm entitlement key 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) \--firstname.lastname@example.org
Email could be any email address.
Login to integration platform navigator and click on ‘Install asset repository’.
Enter the name of Helm release, target namespace and target cluster.
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.
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.184.108.40.206.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.
Specify the storage class for glusterfs for ‘Catalog remotes Storage Class’.
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.
Navigate to the asset repository release in platform navigator.
Click on the release name of asset repository and it will navigate to the asset repository.
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.
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 !!!