Creating HA WSO2 Streaming Integrator Docker Images and Publishing to Amazon ECR

Creating the docker Images

jdbcUrl: ‘jdbc:mysql://wso2.cqaut6indcir.us-east-2.rds.amazonaws.com:3306/persistencedb?useSSL=false’ username: root password: rootroot driverClassName: com.mysql.jdbc.Driver
IP=$(ifconfig eth0 | grep “inet addr” | cut -d ‘:’ -f 2 | cut -d ‘ ‘ -f 1)DEPLOYMENT_YAML=${WSO2_SERVER_HOME}/conf/server/deployment.yamlecho “$IP”sed -i “s/localhost/$IP/” “$DEPLOYMENT_YAML”
docker build -t wso2si:1.0.0-alpine-ha1 .
docker build -t wso2si:1.0.0-alpine-ha2 .

Configuring AWS ECR and pushing the docker images

  • Account Id (can be found in the MyAccount): 264342959920
  • Region (can be found in the url): us-east-2
  • Access Key (from what we generated): AKIAT3DARO4YI74ACFHZ
  • Secret Key (from what we generated): XXXXXXXX/HK4yFGu

Creating a repository in the ECR

Pushing the created docker images to the ECR

aws ecr get-login-password — region us-east-2 | docker login — username AWS — password-stdin 469387825253.dkr.ecr.us-east-2.amazonaws.com/wso2
docker tag wso2si:1.0.0-alpine-ha2 469387825253.dkr.ecr.us-east-2.amazonaws.com/wso2:ha2docker tag wso2si:1.0.0-alpine-ha1 469387825253.dkr.ecr.us-east-2.amazonaws.com/wso2:ha1
docker push 469387825253.dkr.ecr.us-east-2.amazonaws.com/wso2:ha1docker push 469387825253.dkr.ecr.us-east-2.amazonaws.com/wso2:ha2

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store