Posts

Showing posts with the label openshift

Troubleshooting WSO2 APIM in OCP- Invalid value securityContext.runAsUser

Image
Problem Statement We have created a custom docker image for WSO2 APIMv3.2.x and deployed the same in OpenShift cluster 4.x. However, the pods won't getting in Ready state and below error observed while checking the events (oc get events) wso2am-pattern-1-am-1-deployment-0 in StatefulSet wso2am-pattern-1-am-1-deployment failed error: pods "wso2am-pattern-1-am-1-deployment-0" is forbidden: unable to validate against any security context constraint: [provider "anyuid": Forbidden: not usable by user or serviceaccount, spec.initContainers[0].securityContext.runAsUser: Invalid value: 1000670000: must be in the ranges: [1000710000, 1000719999], spec.containers[0].securityContext.runAsUser: Invalid value: 1000670000: must be in the ranges: [1000710000, 1000719999], provider "nonroot": Forbidden: not usable by user or serviceaccount, provider "hostmount-anyuid": Forbidden: not usable by user or serviceaccount, provider "elasticsearch-scc": F...

WSO2 APIM OpenShift Deployment- Create http route for API gateway

Image
In this post I'll be sharing one of the use case to achieve in WSO2 OpenShift Deployment Environment: OpenShift 4.x, WSO2 APIM 3.2.0.x, RHEL 8.3 Business Requirement: Getting http based URL for API gateway component in OpenShift deployment of WSO2 API Manager Steps to achieve: By default WSO2 APIM (deployment pattern-1: all in one two node stateful set) provides 3 routes for respective services based on https protocol as For Analytics :  wso2am-analytics-dashboard-test.apps.devtest.host.local For API Gateway : wso2am-gateway-test.apps.devtest.host.local For APIM Portals   :  wso2am-am-test.apps.devtest.host.local Now in order to get a http based URL for API gateway, we have to create a new route. This can be achieved via config map or directly via OpenShift console. I've used  OpenShift  console to create a new route for API gateway based on http protocol. Below are the steps- 1. Login to OpenShift console & Navigate to respective project 2. Navigate ...

WSO2 APIM OpenShift Deployment Experience

Image
Hello Guys, In this blog I am going to share my experience in WSO2 API Manager OpenShift deployment where I faced some issues with respect to Persistent Volumes/ Persistent Volume Claims. Environment OpenShift Version 4.x WSO2 APIM version 3.2.0.x Use Case 1- runAsUser SecurityContext I have tried to apply the template yaml to create the resources, following error encountered [userdemo@mycustomhost yaml]$ oc get pods NAME READY STATUS RESTARTS AGE wso2am-pattern-1-am-analytics-dashboard-deployment-1-deploy 0/1 Error 0 13m wso2am-pattern-1-am-analytics-worker-2-deployment-1-deploy 0/1 Error 0 13m wso2am-pattern-1-am-analytics-worker-deployment-1-deploy 0/1 Error 0 13m [appadmin1@apiextappppsb01 yaml]$ oc logs -f wso2am-pattern-1-am-analytics-dashboard-deployment-1-deploy --> Scaling wso2am-pattern-1-am-analytics-dashboard-deployment-1 to 1 --> FailedCreate: ws...

WSO2 APIM Open Shift Deployment YAML error for '@' value in password

Image
In this blog, I would like to share a small but tricky experience while working with Open Shift Deployment of WSO2 API Manager. Scenario I have been using WSO2 APIM deployment template YAML from official Github repository and customized the same as per the environment. The important change was using external database MSSQL Server where the DB & password for respective databases  were created by DBAs. Problem Statement Once I configured the DB details and executed my YAML, it was successful. However when I checked the POD logs it shows below error- found character '@' that cannot start any token. (Do not use @ for indentation)  in 'string', line 286, column 21:               password: @x!~#321228H Cause The password value specified in YAML file contains '@' symbol in the beginning of the password and YAML considered it as indentation and hence caused error   Solution To overcome this problem, we need to either change the db ...

WSO2 APIM Docker Image Customization

Image
WSO2 Products Docker Image Customization I have got a use case where I have to do the containerized deployment of WSO2 APIM & Analytics (v3.2.0) on OpenShift. Also, there was a requirement to customize the docker image prior to the deployment on OpenShift. Below are the steps I used to deploy the customized docker image of apim & analytics (dashboard+worker) on OpenShift Cluster- 1. Download the apim, analytics base pack (3.2.0) from official WSO2 WebSite 2. For APIM/Analytics extract the zip package 3. Navigate to $PRODUCT_HOME/bin 4. Locate the file wso2update_linux and make sure file has execute permission or do [chmod +x wso2update_linux] 5. Execute the file ./wso2update_linux [below snippets are for in-place updates for analytics, same applies to apim as well] --------------------------------------------------------------------------------------------- [kumar@dev001 bin]$ ./wso2update_linux Initializing updates with credentials Please press 'enter' to c...