Posts

Showing posts with the label docker

Docker run failed for apim analytics image with illegal option

Image
In this post I am going to share my experience for running the docker image of wso2 apim analytics dashboard that caused some issue while running it. Below is the summary of the same- Environment: Windows, RHEL 8.3, WSO2 Analytics 3.2.0 Problem: While executing docker run command, it gives following error- sudo docker run wso2am-analytics-dashboard:3.2.0.20 : not foundarbon/docker-entrypoint.sh: 17: /home/wso2carbon/docker-entrypoint.sh: 18: set: Illegal option - Cause:  The problem occurred due to dos2unix conversion issue. Basically the file docker-entrypoint.sh was created in a winodws machine in notepad++ utility but remained with EOL conversion as Windows (CR LF). Further this file was uploaded to a linux machine where actual execution has to be done. Solution We need to change the EOL conversion of the file ( docker-entrypoint.sh ) to Linux (LR) prior to docker image creation. I have used windows environment and notepad++ utility to do the same as- 1. Open the file doc...

WSO2 APIM Custom Docker Image Run - Permission Denied

Image
Problem Statement Recently I have been trying to build a custom docker image for WSO2 APIM v3.2.0 where I have customised the package and re-built the image using the updated package. Below is the directory structure - ProjectDirectory -Dockerfile -docker-entrypoint.sh -wso2am_3.2.0.zip I ran the command to build the image as $ docker build -t wso2am:3.2.0_01 . Image built successfully and visible as- $ docker images REPOSITORY         TAG          IMAGE_ID     C REATED            SIZE loclahost/wso2am    3.2.0_01   4bg83jd9abg1   2 minutes ago    1.42 GB When I try to run the contianer of respective docker image, it throws error- $ docker run -it -p 8280:8280 -p 9443:9443 --name apimanager wso2am:3.2.0_01 Error contianer_linux.go 370: starting container process caused: exec: "/home/wso2carbon/docker-entrypoint.sh": permission denied: OCI runtime permission d...

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...

Installing Docker CE on RHEL 7.7

Image
Installing Docker CE on RHEL 7.7 Configure the Docker Repo This is the scenario where we don't have yum facility to directly pull the packages, rather manually needs to add the repository and then apply yum command to install docker    sudo yum-config-manager - -add-repo   https://download.docker.com/linux/centos/docker-ce.repo Linux Package Requirement Download Link container-selinux-2.74-1.el7.noarch.rpm  http:...

Container Native Application Development Setup with Kubernetes

Image
Recently I have been involved in analysis and setup of container native application development setup using Kubernetes(k8s). Below are the steps I have done for the same- Requirements 1. A Developer with access to his/her GitHub account Developer develops an app and pushes the code to GitHub (a distributed version source code control utility) 2. Jenkins setup Jenkins setup is required for DevOps viz. creating CI/CD pipeline/ Web Hooks. For current environment, Jenkins server is running on Google Cloud platform. 3. Dockerhub account A valid dockerhub account is required for container image registery. 4. A Kubernetes(k8s) Cluster (GKE) A k8s cluster is required for running the containers /container orchestration, scaling and overall container lifecycle management. I have used Google Kubernetes Engine (GKE) @ Google Cloud. It contains 1 load balancer and 3 nodes. Conditions K8s cluster, Jenkins, GitHub should be on  the same network (if private...