<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[ContainerMind - Medium]]></title>
        <description><![CDATA[Containerizing Software Applications - Medium]]></description>
        <link>https://medium.com/containermind?source=rss----52dca4938812---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>ContainerMind - Medium</title>
            <link>https://medium.com/containermind?source=rss----52dca4938812---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 23:17:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/containermind" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A Beginner’s Guide to Kubernetes]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/containermind/a-beginners-guide-to-kubernetes-7e8ca56420b6?source=rss----52dca4938812---4"><img src="https://cdn-images-1.medium.com/max/2600/1*DOhHZ30M-vkl43OzCHhE1A.jpeg" width="5575"></a></p><p class="medium-feed-snippet">Kubernetes has now become the de facto standard for deploying containerized applications at scale in private, public and hybrid cloud&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/containermind/a-beginners-guide-to-kubernetes-7e8ca56420b6?source=rss----52dca4938812---4">Continue reading on ContainerMind »</a></p></div>]]></description>
            <link>https://medium.com/containermind/a-beginners-guide-to-kubernetes-7e8ca56420b6?source=rss----52dca4938812---4</link>
            <guid isPermaLink="false">https://medium.com/p/7e8ca56420b6</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <dc:creator><![CDATA[Imesh Gunaratne]]></dc:creator>
            <pubDate>Wed, 23 May 2018 10:53:01 GMT</pubDate>
            <atom:updated>2018-05-31T04:49:29.888Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Deploy WSO2 API Manager on Google Kubernetes Engine]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/containermind/how-to-deploy-wso2-api-manager-on-google-kubernetes-engine-ff19775f58d0?source=rss----52dca4938812---4"><img src="https://cdn-images-1.medium.com/max/1024/1*lh5ykOLyvLkjt7m1_7AseQ.jpeg" width="1024"></a></p><p class="medium-feed-snippet">WSO2 API Manager can be deployed on almost all well known virtual machine based infrastructure platforms and container cluster managers.</p><p class="medium-feed-link"><a href="https://medium.com/containermind/how-to-deploy-wso2-api-manager-on-google-kubernetes-engine-ff19775f58d0?source=rss----52dca4938812---4">Continue reading on ContainerMind »</a></p></div>]]></description>
            <link>https://medium.com/containermind/how-to-deploy-wso2-api-manager-on-google-kubernetes-engine-ff19775f58d0?source=rss----52dca4938812---4</link>
            <guid isPermaLink="false">https://medium.com/p/ff19775f58d0</guid>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[gke]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Imesh Gunaratne]]></dc:creator>
            <pubDate>Tue, 27 Mar 2018 12:16:33 GMT</pubDate>
            <atom:updated>2018-04-26T09:35:55.441Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Create a Kubernetes Cluster on AWS in Few Minutes]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/containermind/how-to-create-a-kubernetes-cluster-on-aws-in-few-minutes-89dda10354f4?source=rss----52dca4938812---4"><img src="https://cdn-images-1.medium.com/max/2600/1*GZt-yXYvXQGFTD_243MuaA.png" width="3223"></a></p><p class="medium-feed-snippet">Installing Kubernetes on AWS</p><p class="medium-feed-link"><a href="https://medium.com/containermind/how-to-create-a-kubernetes-cluster-on-aws-in-few-minutes-89dda10354f4?source=rss----52dca4938812---4">Continue reading on ContainerMind »</a></p></div>]]></description>
            <link>https://medium.com/containermind/how-to-create-a-kubernetes-cluster-on-aws-in-few-minutes-89dda10354f4?source=rss----52dca4938812---4</link>
            <guid isPermaLink="false">https://medium.com/p/89dda10354f4</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[kops]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Imesh Gunaratne]]></dc:creator>
            <pubDate>Fri, 09 Mar 2018 10:47:42 GMT</pubDate>
            <atom:updated>2018-05-25T06:57:39.425Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Rethinking Service Integrations with Microservices Architecture]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/containermind/rethinking-service-integrations-with-microservices-architecture-5cbb844f5f51?source=rss----52dca4938812---4"><img src="https://cdn-images-1.medium.com/max/1553/1*vEkjWq6syuq5vK3WszKpiA.png" width="1553"></a></p><p class="medium-feed-snippet">The dawn of the microservices architecture (MSA) begun revolutionizing the software paradigm in the past few years by revealing a new&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/containermind/rethinking-service-integrations-with-microservices-architecture-5cbb844f5f51?source=rss----52dca4938812---4">Continue reading on ContainerMind »</a></p></div>]]></description>
            <link>https://medium.com/containermind/rethinking-service-integrations-with-microservices-architecture-5cbb844f5f51?source=rss----52dca4938812---4</link>
            <guid isPermaLink="false">https://medium.com/p/5cbb844f5f51</guid>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[ballerina]]></category>
            <dc:creator><![CDATA[Imesh Gunaratne]]></dc:creator>
            <pubDate>Mon, 18 Dec 2017 23:26:23 GMT</pubDate>
            <atom:updated>2018-03-31T18:16:39.973Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Wiring Microservices, Integration Microservices & APIs]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/containermind/wiring-microservices-integration-microservices-apis-a0c211e43bc1?source=rss----52dca4938812---4"><img src="https://cdn-images-1.medium.com/max/2600/1*OJbidhP37tFrHwbDoFneqg.jpeg" width="4599"></a></p><p class="medium-feed-snippet">Composing a Microservices based Enterprise Solution with MSF4J, BallerinaLang and WSO2 API Manager</p><p class="medium-feed-link"><a href="https://medium.com/containermind/wiring-microservices-integration-microservices-apis-a0c211e43bc1?source=rss----52dca4938812---4">Continue reading on ContainerMind »</a></p></div>]]></description>
            <link>https://medium.com/containermind/wiring-microservices-integration-microservices-apis-a0c211e43bc1?source=rss----52dca4938812---4</link>
            <guid isPermaLink="false">https://medium.com/p/a0c211e43bc1</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[Imesh Gunaratne]]></dc:creator>
            <pubDate>Fri, 08 Dec 2017 09:32:54 GMT</pubDate>
            <atom:updated>2018-03-31T18:14:26.565Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Is EC2 Container Service the Right Choice on AWS?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/containermind/is-ec2-container-service-the-right-choice-on-aws-3d419d96a390?source=rss----52dca4938812---4"><img src="https://cdn-images-1.medium.com/max/2600/1*weUcutmZeO-l_Fc0V59sRw.jpeg" width="4800"></a></p><p class="medium-feed-snippet">ECS architecture and its features</p><p class="medium-feed-link"><a href="https://medium.com/containermind/is-ec2-container-service-the-right-choice-on-aws-3d419d96a390?source=rss----52dca4938812---4">Continue reading on ContainerMind »</a></p></div>]]></description>
            <link>https://medium.com/containermind/is-ec2-container-service-the-right-choice-on-aws-3d419d96a390?source=rss----52dca4938812---4</link>
            <guid isPermaLink="false">https://medium.com/p/3d419d96a390</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aws-ecs]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Imesh Gunaratne]]></dc:creator>
            <pubDate>Mon, 29 May 2017 15:49:35 GMT</pubDate>
            <atom:updated>2018-03-31T18:15:12.939Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Deploy WSO2 API Manager on Amazon ECS]]></title>
            <link>https://medium.com/containermind/how-to-deploy-wso2-api-manager-on-amazon-ecs-bdc5a8d22844?source=rss----52dca4938812---4</link>
            <guid isPermaLink="false">https://medium.com/p/bdc5a8d22844</guid>
            <category><![CDATA[api-management]]></category>
            <category><![CDATA[aws-ecs]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[wso2]]></category>
            <dc:creator><![CDATA[Imesh Gunaratne]]></dc:creator>
            <pubDate>Fri, 12 May 2017 20:41:34 GMT</pubDate>
            <atom:updated>2018-03-31T18:15:32.746Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7yi9RwuMp-VHYwXpyeVmdw.jpeg" /><figcaption>Image source: <a href="https://www.pexels.com/photo/abstract-art-blur-bulb-363622/">https://www.pexels.com/photo/abstract-art-blur-bulb-363622/</a></figcaption></figure><p>At WSO2 we have been mostly using Kubernetes and DC/OS for deploying WSO2 middleware on containers in production. While those can be run on any public cloud platform some users may prefer to use Amazon’s own container cluster management platform<a href="https://aws.amazon.com/ecs/"> EC2 Container Service (ECS)</a> due to various reasons. Very recently we evaluated ECS on running WSO2 API Manager on it with Docker.</p><p>As we found the main advantage of using ECS on AWS over setting up Kubernetes or DC/OS on AWS is that for ECS we would not need to create any EC2 instances for it’s controller, rather it will be provided as a service. On the contrary, as of today Kubernetes and DC/OS provide much more rich container management features compared to ECS. Nevertheless, in this article I will explain how to deploy WSO2 API Manager on ECS and configure load balancing rules in five steps:</p><h3><strong>1. Create an ECS Cluster</strong></h3><p>1.1. First of all login to your AWS console, open “EC2 Container Service” page and click on the “Create Cluster” button to create a new ECS cluster:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--p3NP-VjusU9GQEN4tNqA.png" /></figure><p>1.2 Enter ECS cluster details as follows; select the EC2 instance type and number of instances according to your capacity plan. In this POC I have used one m4.xlarge instance, in a production environment you may need more than one EC2 instance to provide HA:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/0*UocruHyghJlpLD3a." /></figure><p>1.3 Keep the default networking configuration as it is; this will create a VPC, two subnets and a new security group. As I understood port 80 is opened in ECS instances for communicating with the ECS agent. Therefore, CIDR block might not need to have 0.0.0.0/0 even though its given by default:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/0*IjmOD1VQo2fD3lzr." /></figure><p>1.4 Scroll down on the same page and select the option “Create new role” under “Container instance IAM role”. This will be used by the ECS container agent to makes calls to the Amazon ECS API actions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/0*-Dovw8g-8Fl_Xy1B." /></figure><p>1.5 Then press the “Create Cluster” button and wait for the ECS cluster to be created successfully. Once completed press the “View Cluster” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/0*S8aBkfyOUosGmWZA." /></figure><p>1.6 Now ECS will create EC2 instances and register them with the ECS cluster, this may take few minutes. Watch the “ECS Instances” tab for the instances to get activated:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/0*wW9Lx5eXHTyTiNga." /></figure><h3><strong>2. Create an Application Load Balancer</strong></h3><p>2.1 Now we would need to create an application load balancer for routing requests to ECS containers. Open Load Balancers page under EC2 service and press the “Create Load Balancer” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aAZLLPA-wrIbZed_." /></figure><p>2.2 Provide a load balancer name, HTTP and HTTPS listeners (keep the ports as 80 and 443):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Wx0u-8x9hYDDiLv2." /></figure><p>2.3 Provide availability zones for the load balancer to register container instances:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*thuqnGaaAcRimAf2." /></figure><p>2.4 Provide <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html">a SSL certificate and security policy</a> for the load balancer. For this you can use the wso2carbon self-signed certificate shipped with API Manager, in a production environment you might need to use a CA signed certificate:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TraTuUz_ZLcd7adV." /></figure><p>2.5 Configure a new security group for the load balancer. According to the clients that access the load balancer you may need to change the source CIDR:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dLOoKbISeUYk1wNg." /></figure><p>2.6 Configure the routing target group as follows. Here the application load balancer will use the target group for providing the routing rules and health checks. For the health check we will be deploying an echo API in a future step with the path “/echo/wso2&quot;:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oTaQuFOY6GRJouKd." /></figure><p>2.7 Select the ECS instance(s) from the instances list and press the “Add to registered” button and complete the load balancer creation wizard:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6UR8Tv2MkC6hHNAS." /></figure><p>2.8 Review the configuration at the final step of the wizard and create the load balancer, target group and the security group.</p><h3>3. Create an EC2 Container Registry</h3><p>3.1. In this approach we will be using an EC2 container registry for maintaining our container images. Create a new EC2 container registry and note down the registry hostname:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8-yqI26DpoVFPlhO." /></figure><p>In the above sample, registry hostname is “610968236798.dkr.ecr.us-west-1.amazonaws.com”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lLSc2Ievxb9nPfxd." /></figure><p>3.2. Next, we would need to build a new Docker image based on the official WSO2 API Manager Docker image for including API manager configurations and few APIs for tunneling API manager UI requests through the gateway. To do this a WSO2 account would be needed. If you don’t have one please create one at <a href="https://wso2.com/user/register">https://wso2.com/user/register</a> and login to WSO2 Docker registry on your local machine or on an EC2 instance using the following Docker command.</p><p>I would recommend to use an EC2 instance for this process as it might take some time to transfer Docker images from your local machine to the EC2 container registry depending on the internet brandwidth and latency.</p><pre>$ docker login <a href="https://docker.wso2.com/">https://docker.wso2.com</a></pre><p>3.3. Pull the latest WSO2 API Manager docker image to your local machine:</p><pre>$ docker pull docker.wso2.com/wso2am:2.1.0</pre><p>3.4 Clone the following git repository, this has a Dockerfile and a set of configuration files for creating a custom API Manager Docker image with configurations:</p><pre>$ git clone <a href="https://github.com/imesh/wso2-apim-docker.git">https://github.com/imesh/wso2-apim-docker.git</a></pre><p>3.5 Follow the README.md file and set load balancer hostname, http and https ports. You can find these details on the description tab of the load balancer:</p><pre>$ cd wso2-apim-docker</pre><pre>$ cat README.md</pre><p>Similarly if any other configurations need to be added to the API-M container such as datasources, clustering configurations, etc copy those configuration files from the product distribution to the above conf directory and set the required values.</p><p>3.6 Build the Docker image after updating the configuration files with the following command:</p><pre>$ cd wso2-apim-docker</pre><pre>$ ./build.sh</pre><p>3.7. Tag the Docker image with the EC2 container registry hostname and repository name:</p><pre>$ docker tag wso2am-with-config:2.1.0 [EC2-Container-Registry-Hostname]/wso2am:2.1.0</pre><p>For an example:</p><pre>$ docker tag docker.wso2.com/wso2am:2.1.0 610968236798.dkr.ecr.us-west-1.amazonaws.com/wso2am:2.1.0</pre><p>3.8. Go to the above created container registry and press the “View Push Commands” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yoyiXLHQQgDYDo9I." /></figure><p>3.9. Execute the AWS CLI command shown in the below page to retrieve the Docker login credentials. Afterwards, execute the Docker login command printed on the shell. This will add Docker credentials in your local machine for pushing the above Docker image to EC2 container registry:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TQvAmN5Zk1C1-MCm." /></figure><p>3.10. Push above API-M Docker image to the EC2 Container Registry created above:</p><pre>$ docker push [EC2-Container-Registry-Hostname]/wso2am:2.1.0</pre><p>For an example:</p><pre>$ docker push 610968236798.dkr.ecr.us-west-1.amazonaws.com/wso2am:2.1.0</pre><p>Once the container is pushed, it should be listed in the ECS container registry repository:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4p0vYlKcc7j-5asA." /></figure><h3>4. Create an ECS Task Definition</h3><p>4.1 ECS uses tasks for scheduling containers in its container cluster. Create a new task definition by pressing the “Create new Task Definition” button on the “Task Definitions” page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oXakhRx9KXxoOaZa." /></figure><p>4.2 Provide a name for the task definition and keep networking mode as “Bridge”. With “Host” networking mode only one container will be able to create a given container port on the same host:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/0*T_YedEb8PEFwhs_z." /></figure><p>4.3 Press the “Add container” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/0*nZafKP-WqCpdd6pe." /></figure><p>4.4 Provide a container name and the API-M Docker Image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*urLFHYsvaiX91c7c." /></figure><p>4.5 Provide port mappings as follows. Zero has been used for the host ports to let it generate dynamic host ports:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/0*fKdT5HURVM0j5iUN." /></figure><p>Afterwards, add the container to the task definition and create the task definition.</p><h3>5. Create an ECS Service</h3><p>5.1 Next, we need to create an ECS service to let the load balancer discover the container host port mappings and for creating tasks from the task definition. Go to the above created task definition and create a service from the actions menu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/0*uWERKvQ9ZsLUlqyr." /></figure><p>5.2 Provide a service name and set the number of tasks to one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/0*iT-JxmlGCT46LygR." /></figure><p>5.3 Select the application load balancer created above, select the container port 8243 (this is the HTTPS port of the API gateway) and press the “Add to ELB” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lXqe66my4gcGWFKn." /></figure><p>5.4 Select the target group created for the load balancer as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*32t1QyE09ttoIeyy." /></figure><p>5.5 Press the “Save” button and press the “Create Service” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nAj9VmdYLXdQoQbq." /></figure><p>5.6 Once the service is created successfully, press the “View Service” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GLpg_gE7S9Xbr1Th." /></figure><p>5.7 Now the service will get created and it will create a task for spinning a container. On the service page, wait for the task to be activated:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TmFjdTMVEcxBrmzm." /></figure><p>5.8 Go to the load balancer target group and wait for the container to get started. Once the API Manager server is completely started the health check will pass and the status will changed to “healthy”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*h3nIeNjpkwxobYHt." /></figure><p>5.9 Now, find the load balancer DNS name from the load balancer description tab:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KjzP4gLRr6UoTI9B." /></figure><p>5.10 Open a new browser tab and access the API-M Publisher using the load balancer DNS name as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ia3_2y_inlEY7uX0." /></figure><p>5.11 Login to the API publisher using the default admin credentials (admin/admin):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cQjgojUo88UuaL_9." /></figure><h3>6. Deploy Sample PizzaShack API</h3><p>6.1 Now you can deploy the sample PizzaShack API bundled with the API manager and verify the deployment. To do this, press the Deploy Sample API button on the API Publisher home page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VaUpLCB6eLMSS_1d." /></figure><p>6.2 Go to API Store and subscribe for the above API. Then generate keys and verify the API by using the API console:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FGcEuCsvlkBIfpsfawut_A.png" /></figure><h3>Conclusion</h3><p>In this article WSO2 API Manager was deployed on Amazon ECS using a single container with all-in-one profile which includes API Publisher, Store, Key Manager, Throttling Manager, Gateway, Message Broker, and CEP in one JVM. In this deployment the ECS service will auto-heal the container by scheduling another container via ECS tasks if the existing container fails to respond. This process can be verified by stopping the current task forcefully via the ECS console. As I found currently ECS services only allow to map one port of a container with an ELB. Therefore, the API Publisher and Store UIs were exposed via the API gateway. In a production deployment if needed API Manager components can be run in separate container clusters and scaled separately.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bdc5a8d22844" width="1" height="1" alt=""><hr><p><a href="https://medium.com/containermind/how-to-deploy-wso2-api-manager-on-amazon-ecs-bdc5a8d22844">How to Deploy WSO2 API Manager on Amazon ECS</a> was originally published in <a href="https://medium.com/containermind">ContainerMind</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Reference Architecture for Deploying WSO2 Middleware on Kubernetes]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/containermind/a-reference-architecture-for-deploying-wso2-middleware-on-kubernetes-d4dee7601e8e?source=rss----52dca4938812---4"><img src="https://cdn-images-1.medium.com/max/2600/1*TqbBqkeJeM79qLcrk8kAvw.jpeg" width="6488"></a></p><p class="medium-feed-snippet">Kubernetes is an open source container management system for automating deployment, operations, scaling of containerized applications and&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/containermind/a-reference-architecture-for-deploying-wso2-middleware-on-kubernetes-d4dee7601e8e?source=rss----52dca4938812---4">Continue reading on ContainerMind »</a></p></div>]]></description>
            <link>https://medium.com/containermind/a-reference-architecture-for-deploying-wso2-middleware-on-kubernetes-d4dee7601e8e?source=rss----52dca4938812---4</link>
            <guid isPermaLink="false">https://medium.com/p/d4dee7601e8e</guid>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Imesh Gunaratne]]></dc:creator>
            <pubDate>Wed, 18 Jan 2017 20:21:41 GMT</pubDate>
            <atom:updated>2018-03-31T18:17:24.930Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Containerizing WSO2 Middleware]]></title>
            <link>https://medium.com/containermind/containerizing-wso2-middleware-9398da54d553?source=rss----52dca4938812---4</link>
            <guid isPermaLink="false">https://medium.com/p/9398da54d553</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[dcos]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[wso2]]></category>
            <dc:creator><![CDATA[Imesh Gunaratne]]></dc:creator>
            <pubDate>Sat, 01 Oct 2016 12:30:55 GMT</pubDate>
            <atom:updated>2018-03-31T18:17:56.614Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WJwsF7lnEBff1zhGYstbPQ.jpeg" /><figcaption>Image source: <a href="https://www.flickr.com/photos/xavier33300/15236610911/">https://www.flickr.com/photos/xavier33300/15236610911/</a></figcaption></figure><p><em>Deploying WSO2 Middleware on Containers in Production</em></p><p>A heavier car may need more fuel for reaching higher speeds than a car of the same spec with less weight [1]. Sports car manufacturers always adhere to this concept and use light weight material such as aluminum [2] and carbon fiber [3] for improving fuel efficiency. The same theory may apply to software systems. The heavier the software components, the higher the computation power they need. Traditional virtual machines use a dedicated operating system instance for providing an isolated environment for software applications. This operating system instance needs additional memory, disk and processing power in addition to the computation power needed by the applications. Linux containers solved this problem by reducing the weight of the isolated unit of execution by sharing the host operating system kernel with hundreds of containers. The following diagram illustrates a sample scenario how much resources containers would save compared to virtual machines:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rFyXD24Lsk8kCXfUgsnyKg.png" /><figcaption>Figure 1: A resource usage comparison between a VM and a container</figcaption></figure><h3>The Containerization Process</h3><p>The process of deploying a WSO2 middleware on a container is quite straightforward, it’s matter of following few steps;</p><ol><li>Download a Linux OS container image.</li><li>Create a new container image from the above OS image by adding Oracle JDK, product distribution and configurations required.</li><li>Export JAVA_HOME environment variable.</li><li>Make the entry point invoke the wso2server.sh bash script found inside $CARBON_HOME/bin folder.</li></ol><p>That’s it! Start a container from the above container image on a container host with a set of host port mappings and you will have a WSO2 server running on a container in no time. Use the container host IP address and the host ports for accessing the services. If HA is needed, create few more container instances following the same approach on multiple container hosts and front those with a load balancer. If clustering is required, either use Well Known Address (WKA) membership scheme [4] with few limitations or have your own membership scheme for automatically discovering the WSO2 server cluster similar to [5]. The main problem with WKA membership scheme is that, if all well known member containers get terminated, the entire WSO2 server cluster may fail. Even though this may look like a major drawback for most high intensity, medium and large scale deployments, it would work well for low intensity, small scale deployments which are not mission critical. If containers go down due to some reason, either a human or an automated process can bring them back to the proper state. This has been the practice for many years with VMs.</p><p>Nevertheless, if the requirement is other way around, and need more high intensity, completely automated, large scale deployment, a container cluster manager and a configuration manager (CM) would provide additional advantages. Let’s see how those can improve the overall productivity of the project and final outcome:</p><h3>Configuration Management</h3><p>Ideally software systems that run on containers need to have two types of configuration parameters according to twelve-factor app [6] methodology:</p><ol><li>Product specific and global configurations</li><li>Environment specific configurations</li></ol><p>The product specific configurations can be burned into the container image itself and environment specific values can be passed via environment variables. In that way, a single container image can be used in all environments. However currently, Carbon 4 based WSO2 products can only be configured via configuration files and Java system properties. They do not support to be configured via environment variables. Nevertheless if anyone is willing to put some effort on this, an init script can be written to read environment variables at the container startup and update the required configuration files. Generally Carbon 4 based WSO2 middleware have considerable amount of config files and parameters inside them. Therefore this might be a tedious task. According to the current design discussions, in Carbon 5, there will be only one config file in each product and environment variables will be supported OOB.</p><h4>What if a CM is run in the Container similar to VMs?</h4><p>Yes, technically that would work, most people would tend to do this with the experience they have with VMs. However IMO containers are designed to work slightly differently than VMs. For an example, if we compare the time it takes to apply a new configuration or a software update by running a CM inside a container vs starting a new container with the new configuration or update, the later is extremely fast. It would take around 20 to 30 seconds to configure a WSO2 product using a CM whereas it would only take few milli-seconds to bring up a new container. The server startup/restart time would be the same in both approaches. Since the container image creation process with layered container images is much efficient and fast this would work very well in most scenarios. Therefore the total config and software update propagation time would be much faster with the second approach.</p><h3>Choosing a Configuration Manager</h3><p>There are many different configuration management systems available for applying configurations at the container build time, to name few; Ansible [7], Puppet [8], Chef [9] and Salt [10]. WSO2 has been using Puppet for many years now and currently uses the same for containers. We have simplified the way we use Puppet by incorporating Hiera for separating out configuration data from manifests. Most importantly container image build process does not use a Puppet master, instead it runs Puppet in masterless mode (puppet apply). Therefore even without having much knowledge on Puppet, those can be used easily.</p><h3>Container Image Build Automation</h3><p>WSO2 has built an automation process for building container images for WSO2 middleware based on standard Docker image build process and Puppet provisioning. This has simplified the process of managing configuration data with Puppet, executing the build, defining ports and environment variables, product specific runtime configurations and finally optimizing the container image size. WSO2 ships these artifacts [11] for each product release. Therefore it would be much productive to use these without creating Dockerfiles on your own.</p><h3>Choosing a Container Cluster Manager</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tsx2hMmZG0v9gC4ZHcECCQ.png" /><figcaption>Figure 2: Deployment architecture for a container cluster manager based deployment</figcaption></figure><p>The above figure illustrates how most of the software products are deployed on a container cluster manager in general. The same applies to WSO2 middleware on high level. At the time this article being written, there are only few container cluster managers available. They are Kubernetes, DC/OS, Docker Swarm, Nomad, AWS ECS, GKE and ACE. Out of these, WSO2 has used Kubernetes and DC/OS in production for many deployments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6zHcy4h0roIBh6bvWLFfAg.png" /><figcaption>Figure 3: Container cluster management platforms supported for WSO2 middleware</figcaption></figure><h4>Strengths of Kubernetes</h4><p>Kubernetes was born as a result of Google’s experience on running containers at scale for more than a decade. It has covered almost all the key requirements of container cluster management in depth. Therefore it’s the first most preference for me as of today:</p><ul><li>Container grouping</li><li>Container orchestration</li><li>Container to container routing</li><li>Load balancing</li><li>Auto healing</li><li>Horizontal autoscaling</li><li>Rolling updates</li><li>Mounting volumes</li><li>Distributing secrets</li><li>Application health checking</li><li>Resource monitoring and log access</li><li>Identity and authorization</li><li>Multi-tenancy</li></ul><p>Please read <a href="https://medium.com/container-mind/a-new-era-of-container-cluster-management-with-kubernetes-cd0b804e1409#.vszyf8b6b">this</a> article on more detailed information on Kubernetes.</p><h4>Reasons to Choose DC/OS</h4><p>AFAIU at the moment DC/OS has less features compared to Kubernetes. However it’s a production grade container cluster manager which has been there for some time now. The major advantage I see with DC/OS is the custom scheduler support for BigData and Analytics platforms. This feature is still not there in Kubernetes. Many major Big Data and Analytics platforms such as Spark, Kafka and Cassandra can be deployed on DC/OS with a single CLI command or via the UI.</p><h3>The Deployment Process</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AWXOl72c2rhEu6mexzKKOQ.png" /><figcaption>Figure 4: Container deployment process on a container cluster manager</figcaption></figure><p>WSO2 has released artifacts required for completely automating containerized deployments on Kubernetes and DC/OS. This includes Puppet Modules [12] for configuration management, Dockerfiles [11] for building docker images, container orchestration artifacts [13], [14] for each platform and WSO2 Carbon membership schemes [5], [15] for auto discovering the clusters. Kubernetes artifacts include replication controllers for container orchestration and services for load balancing. For DC/OS we have built Marathon applications for orchestration and parameters for the Marathon load balancer for load balancing. These artifacts are used in many WSO2 production deployments.</p><p>Please refer following presentations on detailed information on deploying WSO2 middleware on each platform:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.slideshare.net%2Fslideshow%2Fembed_code%2Fkey%2FNqu3YkVQ0apFqn&amp;url=http%3A%2F%2Fwww.slideshare.net%2Fimesh%2Fdeploying-wso2-middleware-on-kubernetes&amp;image=http%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fdeployingwso2middlewareonkubernetes-v21-160320063549-thumbnail-4.jpg%3Fcb%3D1458455810&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=slideshare" width="600" height="500" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f6badc01f1acc544b8209badcdcbf2d/href">https://medium.com/media/7f6badc01f1acc544b8209badcdcbf2d/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.slideshare.net%2Fslideshow%2Fembed_code%2Fkey%2F3PUPytzk4eUtEW&amp;url=http%3A%2F%2Fwww.slideshare.net%2Fimesh%2Fdeploying-wso2-middleware-on-mesos&amp;image=http%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fdeployingwso2middlewareonmesos-v11-160320063831-thumbnail-4.jpg%3Fcb%3D1458455958&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=slideshare" width="600" height="500" frameborder="0" scrolling="no"><a href="https://medium.com/media/511e23c82aa4816d28d61a1bf25a0186/href">https://medium.com/media/511e23c82aa4816d28d61a1bf25a0186/href</a></iframe><p>Documentation on WSO2 Puppet Modules, Dockerfiles, Kubernetes and Mesos Artifacts can be found at [16].</p><h3>References</h3><p>[1] <a href="http://auto.howstuffworks.com/buying-selling/how-to-buy-a-fuel-efficient-car2.htm">http://auto.howstuffworks.com/buying-selling/how-to-buy-a-fuel-efficient-car2.htm</a></p><p>[2] <a href="http://www.aluminum.org/product-markets/automotive">http://www.aluminum.org/product-markets/automotive</a></p><p>[3] <a href="http://auto.howstuffworks.com/fuel-efficiency/fuel-economy/carbon-fiber-oil-crisis1.htm">http://auto.howstuffworks.com/fuel-efficiency/fuel-economy/carbon-fiber-oil-crisis1.htm</a></p><p>[4] <a href="https://docs.wso2.com/display/CLUSTER44x/Overview">https://docs.wso2.com/display/CLUSTER44x/Overview</a></p><p>[5] <a href="https://github.com/wso2/kubernetes-artifacts/tree/master/common/kubernetes-membership-scheme">https://github.com/wso2/kubernetes-artifacts/tree/master/common/kubernetes-membership-scheme</a></p><p>[6] <a href="https://12factor.net/config">https://12factor.net/config</a></p><p>[7] <a href="http://docs.ansible.com/ansible/guide_docker.html">http://docs.ansible.com/ansible/guide_docker.html</a></p><p>[8] <a href="https://puppet.com/blog/building-puppet-based-applications-inside-docker">https://puppet.com/blog/building-puppet-based-applications-inside-docker</a></p><p>[9] <a href="https://www.safaribooksonline.com/blog/2015/04/28/building-docker-images-with-chef-provisioning/">https://www.safaribooksonline.com/blog/2015/04/28/building-docker-images-with-chef-provisioning/</a></p><p>[10] <a href="https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.dockerng.html">https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.dockerng.html</a></p><p>[11] <a href="https://github.com/wso2/dockerfiles">https://github.com/wso2/dockerfiles</a></p><p>[12] <a href="https://github.com/wso2/puppet-modules">https://github.com/wso2/puppet-modules</a></p><p>[13] <a href="https://github.com/wso2/kubernetes-artifacts">https://github.com/wso2/kubernetes-artifacts</a></p><p>[14] <a href="https://github.com/wso2/mesos-artifacts">https://github.com/wso2/mesos-artifacts</a></p><p>[15] <a href="https://github.com/wso2/mesos-artifacts/tree/master/common/mesos-membership-scheme">https://github.com/wso2/mesos-artifacts/tree/master/common/mesos-membership-scheme</a></p><p>[16] <a href="http://docs.wso2.org/">http://docs.wso2.org/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9398da54d553" width="1" height="1" alt=""><hr><p><a href="https://medium.com/containermind/containerizing-wso2-middleware-9398da54d553">Containerizing WSO2 Middleware</a> was originally published in <a href="https://medium.com/containermind">ContainerMind</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is Mesos DC/OS really a Data Center Operating System?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/containermind/is-mesos-dc-os-really-a-data-center-operating-system-21fee1fcfe62?source=rss----52dca4938812---4"><img src="https://cdn-images-1.medium.com/max/1280/1*AvjAMU-nsodZlufmp1339A.png" width="1280"></a></p><p class="medium-feed-snippet">A walk through of DC/OS container cluster manager</p><p class="medium-feed-link"><a href="https://medium.com/containermind/is-mesos-dc-os-really-a-data-center-operating-system-21fee1fcfe62?source=rss----52dca4938812---4">Continue reading on ContainerMind »</a></p></div>]]></description>
            <link>https://medium.com/containermind/is-mesos-dc-os-really-a-data-center-operating-system-21fee1fcfe62?source=rss----52dca4938812---4</link>
            <guid isPermaLink="false">https://medium.com/p/21fee1fcfe62</guid>
            <category><![CDATA[dcos]]></category>
            <category><![CDATA[cluster]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[mesos]]></category>
            <dc:creator><![CDATA[Imesh Gunaratne]]></dc:creator>
            <pubDate>Sat, 01 Oct 2016 12:25:58 GMT</pubDate>
            <atom:updated>2018-03-31T18:18:12.007Z</atom:updated>
        </item>
    </channel>
</rss>