<?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[Stories by Ayesha Jayasankha on Medium]]></title>
        <description><![CDATA[Stories by Ayesha Jayasankha on Medium]]></description>
        <link>https://medium.com/@ayeshajayasankha?source=rss-9232870cc5be------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lAaaqKI8VzH4cYfBTw80hg.jpeg</url>
            <title>Stories by Ayesha Jayasankha on Medium</title>
            <link>https://medium.com/@ayeshajayasankha?source=rss-9232870cc5be------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 03:02:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayeshajayasankha/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deploying WSO2 Identity Server on AWS ECS-Fargate with Hazelcast Clustering]]></title>
            <link>https://medium.com/@ayeshajayasankha/deploying-wso2-identity-server-on-aws-ecs-fargate-with-hazelcast-clustering-49b47ccbb9bf?source=rss-9232870cc5be------2</link>
            <guid isPermaLink="false">https://medium.com/p/49b47ccbb9bf</guid>
            <category><![CDATA[fargate]]></category>
            <category><![CDATA[hazelcast]]></category>
            <category><![CDATA[wso2-identity-server]]></category>
            <category><![CDATA[aws-ecs]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Ayesha Jayasankha]]></dc:creator>
            <pubDate>Tue, 11 Nov 2025 12:33:18 GMT</pubDate>
            <atom:updated>2025-11-11T12:35:56.216Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*py7DdMqJKSt7BqTZ9YC4jQ.png" /></figure><p>In this guide, I’ll walk through deploying <a href="https://wso2.com/identity-server/">WSO2 Identity Server</a> (IS) on an Amazon ECS cluster with Hazelcast-based clustering. This setup ensures high availability and scalability for enterprise-grade IAM workloads.</p><h4>Prerequisites</h4><p>Before starting, make sure you have:</p><ul><li>An <strong>AWS account</strong>. If you don’t already have one, <a href="https://aws.amazon.com/">sign up</a> here and take advantage of the <a href="https://aws.amazon.com/free/?trk=99f831a2-d162-429a-9a77-a89f6b3bd6cd&amp;sc_channel=ps&amp;ef_id=Cj0KCQjw06-oBhC6ARIsAGuzdw03qBfKD7AA8ejOZPfdI7Pg4XshpRd57Q1p-a8--id9VCM5Cjg78xEaAmJtEALw_wcB%3AG%3As&amp;s_kwcid=AL%214422%213%21645125273267%21e%21%21g%21%21aws+free+tier%2119574556890%21145779847112&amp;all-free-tier.sort-by=item.additionalFields.SortRank&amp;all-free-tier.sort-order=asc&amp;awsf.Free+Tier+Types=*all&amp;awsf.Free+Tier+Categories=*all">Free Tier</a>.</li><li>Basic knowledge of <a href="https://www.docker.com/"><strong>Docker</strong></a>, <a href="https://docs.aws.amazon.com/ecs/"><strong>ECS</strong></a>, and <a href="https://wso2.com/identity-server/"><strong>Identity Server</strong></a>.</li><li>A configured <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"><strong>VPC</strong></a> (default or custom).</li></ul><h4>Create an ECS Cluster</h4><ol><li>Navigate to Amazon ECS → Clusters and click Create Cluster.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UNHrEOnLcIQ297KOV882Bw.png" /><figcaption>1. Create cluster view</figcaption></figure><p>2. Provide a name for your cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y27qFgoM3VVR6xd8ivb8VQ.png" /><figcaption>2. Cluster name</figcaption></figure><p>3. Select Fargate only as the infrastructure type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x6V6vXEHGiETCFKNBup1wg.png" /><figcaption>3. Fargate type</figcaption></figure><h4>Build the Docker Image</h4><p>Once the cluster is ready:</p><ol><li>Open the cluster in the AWS console.</li></ol><p>Now, create a custom WSO2 Identity Server Docker image with clustering enabled.</p><p>Update your deployment.toml with the following configs:</p><pre>[clustering]<br>membership_scheme = &quot;aws-ecs&quot;</pre><pre>[clustering.properties]<br>region = &quot;&lt;your-aws-region&gt;&quot;<br>clusterName = &quot;&lt;your-cluster-name&gt;&quot;<br>hostHeader = &quot;ecs&quot;<br>vpcCidrBlock = &quot;&lt;your-vpc-cidr&gt;&quot;<br>tagKey = &quot;aws:ecs:clusterName&quot;<br>tagValue = &quot;&lt;your-cluster-name&gt;&quot;</pre><blockquote>You can update the tagKey and tagValue to any available values if required. Please note that both tagKey and tagValue are mandatory for the deployment</blockquote><blockquote>For vpcCidrBlock, make sure to use a wildcard configuration (10.0.*.*) instead of a standard CIDR block (10.0.0.0/24).</blockquote><p>After building the image:</p><ul><li>Push it to Docker Hub (or ECR if preferred).</li><li>This image will be referenced in the ECS task definition.</li></ul><h4>Create IAM Roles and Policies</h4><p>Next, configure IAM to allow ECS tasks to discover Fargate instances.</p><ol><li>Create a custom policy (is-hazel-cluster) with the following permissions:</li></ol><pre>{<br> &quot;Version&quot;: &quot;2012-10-17&quot;,<br> &quot;Statement&quot;: [<br>  {<br>   &quot;Effect&quot;: &quot;Allow&quot;,<br>   &quot;Action&quot;: [<br>    &quot;ecs:ListTasks&quot;,<br>    &quot;ecs:DescribeTasks&quot;,<br>    &quot;ec2:DescribeNetworkInterfaces&quot;<br>   ],<br>   &quot;Resource&quot;: [<br>    &quot;*&quot;<br>   ]<br>  }<br> ]<br>}</pre><p>2. Create a task role and attach:</p><ul><li>AmazonECSTaskExecutionRolePolicy</li><li>is-hazel-cluster</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dE2NrrEPGiRWMnvFAc4tVg.png" /><figcaption>4. Attach policies to the created role</figcaption></figure><h4>Create a Task Definition</h4><p>Now define how your containers will run:</p><ol><li>Go to ECS → Task Definitions → Create new task definition.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bLl-HsmrDxbL1pHphzJryQ.png" /><figcaption>5. Task definition name</figcaption></figure><p>2. Configure the required details:</p><ul><li>Select Fargate launch type and select the previously create task role both both sections.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-rzPWBlJeyKsg_mBvycpRw.png" /><figcaption>6. Define Fargate instance configurations</figcaption></figure><ul><li>Add your custom Identity Server container (from Docker Hub/ECR).</li><li>Map port 9443 for HTTPS.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*60AYPnyOfc0FnH9k3-mM1A.png" /><figcaption>7. Container configurations</figcaption></figure><h4>Deploy the Service</h4><ol><li>Go to your ECS cluster and click Create Service.</li></ol><p>2. Choose the task definition you just created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ancNx1P3fjuwHvKs3qQvPA.png" /><figcaption>8. Deploy service</figcaption></figure><p>3. Set the replica count to 2 (for clustering).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0AuIABtvf3-pE45g_hM0FA.png" /><figcaption>9. Replica configurations</figcaption></figure><p>3. Update VPC and security groups according to your requirements.</p><p>4. Create the service and wait for the tasks are running</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sIoEEgrS3DP7vp2D7BHPnw.png" /><figcaption>10. Task details</figcaption></figure><h4>Verify Deployment</h4><p>Once both tasks are running, check the container logs.</p><p>You should see Identity Server startup logs:</p><pre>[2025-11-11 10:39:26,268] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Cluster domain: wso2.carbon.domain<br>[2025-11-11 10:39:26,269] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Loading hazelcast configuration from axis2 clustering configuration<br>[2025-11-11 10:39:26,335] []  WARN {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - localMemberHost is configured to use the loopback address. Hazelcast Clustering needs ip addresses for localMemberHost and well-known members.<br>[2025-11-11 10:39:26,336] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Using aws-ecs based membership management scheme<br>[2025-11-11 10:39:26,375] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Hazelcast cluster is initializing...<br>[2025-11-11 10:39:28,391] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Hazelcast initialized in 2016ms<br>[2025-11-11 10:39:28,413] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Local member: [91690a01-a143-4325-b131-e26c59c20594] - Host:172.31.21.236, Remote Host:null, Port: 5701, HTTP:9763, HTTPS:9443, Domain: wso2.carbon.domain, Sub-domain:worker, Active:true<br>[2025-11-11 10:39:28,502] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Elected this member [91690a01-a143-4325-b131-e26c59c20594] as the Coordinator node<br>[2025-11-11 10:39:28,504] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Cluster initialization completed<br>[2025-11-11 10:39:28,720] []  INFO {org.apache.tomcat.util.net.NioEndpoint.certificate} - Connector [https-jsse-nio-9443], TLS virtual host [_default_], certificate type [UNDEFINED] configured from keystore [/home/wso2carbon/wso2is-7.2.0/repository/resources/security/wso2carbon.p12] using alias [wso2carbon] with trust store [/home/wso2carbon/wso2is-7.2.0/repository/resources/security/client-truststore.p12]<br>[2025-11-11 10:39:28,779] []  INFO {org.wso2.identity.apps.common.internal.AppsCommonServiceStartupObserver} - My Account URL : https://localhost:9443/myaccount<br>[2025-11-11 10:39:28,780] []  INFO {org.wso2.identity.apps.common.internal.AppsCommonServiceStartupObserver} - Console URL : https://localhost:9443/console<br>[2025-11-11 10:39:28,781] []  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Server           :  WSO2 Identity Server-7.2.0</pre><pre>[2025-11-11 10:39:28,782] []  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - WSO2 Carbon started in 48 secc</pre><p>When the second node joins, Hazelcast clustering kicks in:</p><pre>[2025-11-11 10:39:45,998] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Cluster domain: wso2.carbon.domain<br>[2025-11-11 10:39:45,998] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Loading hazelcast configuration from axis2 clustering configuration<br>[2025-11-11 10:39:46,057] []  WARN {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - localMemberHost is configured to use the loopback address. Hazelcast Clustering needs ip addresses for localMemberHost and well-known members.<br>[2025-11-11 10:39:46,057] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Using aws-ecs based membership management scheme<br>[2025-11-11 10:39:46,072] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Hazelcast cluster is initializing...<br>[2025-11-11 10:39:52,304] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Hazelcast initialized in 6232ms<br>[2025-11-11 10:39:52,335] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Local member: [9f3d737e-72f3-432b-b1e7-1e972dfc60f2] - Host:172.31.6.180, Remote Host:null, Port: 5701, HTTP:9763, HTTPS:9443, Domain: wso2.carbon.domain, Sub-domain:worker, Active:true<br>[2025-11-11 10:39:52,366] []  INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Cluster initialization completed<br>[2025-11-11 10:39:52,853] []  INFO {org.apache.tomcat.util.net.NioEndpoint.certificate} - Connector [https-jsse-nio-9443], TLS virtual host [_default_], certificate type [UNDEFINED] configured from keystore [/home/wso2carbon/wso2is-7.2.0/repository/resources/security/wso2carbon.p12] using alias [wso2carbon] with trust store [/home/wso2carbon/wso2is-7.2.0/repository/resources/security/client-truststore.p12]<br>[2025-11-11 10:39:52,944] []  INFO {org.wso2.identity.apps.common.internal.AppsCommonServiceStartupObserver} - My Account URL : https://localhost:9443/myaccount<br>[2025-11-11 10:39:52,945] []  INFO {org.wso2.identity.apps.common.internal.AppsCommonServiceStartupObserver} - Console URL : https://localhost:9443/console<br>[2025-11-11 10:39:52,948] []  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Server           :  WSO2 Identity Server-7.2.0<br>[2025-11-11 10:39:52,950] []  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - WSO2 Carbon started in 56 sec</pre><p>In the first node, you can view the new member details.</p><pre>[2025-11-11 10:39:52,272] [] INFO {org.wso2.carbon.hazelcast.aws.AWSBasedMembershipScheme} - Member joined [9f3d737e-72f3-432b-b1e7-1e972dfc60f2]: /172.31.6.180:5701</pre><p>This confirms that your ECS-based Identity Server cluster is up and running with Hazelcast clustering enabled 🎉.</p><p>External References</p><ul><li><a href="https://wso2.com/identity-server/">https://wso2.com/identity-server/</a></li><li><a href="https://hazelcast.com/">https://hazelcast.com/</a></li><li><a href="https://docs.aws.amazon.com/ecs/">https://docs.aws.amazon.com/ecs/</a></li><li><a href="https://is.docs.wso2.com/en/latest/deploy/deployment-guide/#clustering-related-configurations">https://is.docs.wso2.com/en/latest/deploy/deployment-guide/#clustering-related-configurations</a></li><li><a href="https://docs.hazelcast.com/hazelcast/5.2/deploy/deploying-on-aws#ecsfargate-configuration">https://docs.hazelcast.com/hazelcast/5.2/deploy/deploying-on-aws#ecsfargate-configuration</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49b47ccbb9bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying WSO2 Identity Server on AWS ECS-EC2 with Hazelcast Clustering]]></title>
            <link>https://medium.com/@ayeshajayasankha/deploying-wso2-identity-server-on-aws-ecs-ec2-with-hazelcast-clustering-2f1a6e0d58ec?source=rss-9232870cc5be------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f1a6e0d58ec</guid>
            <category><![CDATA[hazelcast]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[aws-ecs]]></category>
            <category><![CDATA[wso2-identity-server]]></category>
            <dc:creator><![CDATA[Ayesha Jayasankha]]></dc:creator>
            <pubDate>Thu, 02 Oct 2025 17:25:23 GMT</pubDate>
            <atom:updated>2025-10-02T17:25:23.124Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WknkUVmX0aBY3PlH1GxEkQ.png" /></figure><p>In this guide, I’ll walk through deploying <a href="https://wso2.com/identity-server/">WSO2 Identity Server</a> (IS) on an Amazon ECS cluster with Hazelcast-based clustering. This setup ensures high availability and scalability for enterprise-grade IAM workloads.</p><h4>Prerequisites</h4><p>Before starting, make sure you have:</p><ul><li>An <strong>AWS account</strong>. If you don’t already have one, <a href="https://aws.amazon.com/">sign up</a> here and take advantage of the <a href="https://aws.amazon.com/free/?trk=99f831a2-d162-429a-9a77-a89f6b3bd6cd&amp;sc_channel=ps&amp;ef_id=Cj0KCQjw06-oBhC6ARIsAGuzdw03qBfKD7AA8ejOZPfdI7Pg4XshpRd57Q1p-a8--id9VCM5Cjg78xEaAmJtEALw_wcB%3AG%3As&amp;s_kwcid=AL%214422%213%21645125273267%21e%21%21g%21%21aws+free+tier%2119574556890%21145779847112&amp;all-free-tier.sort-by=item.additionalFields.SortRank&amp;all-free-tier.sort-order=asc&amp;awsf.Free+Tier+Types=*all&amp;awsf.Free+Tier+Categories=*all">Free Tier</a>.</li><li>Basic knowledge of <a href="https://www.docker.com/"><strong>Docker</strong></a>, <a href="https://docs.aws.amazon.com/ecs/"><strong>ECS</strong></a>, and <a href="https://wso2.com/identity-server/"><strong>Identity Server</strong></a>.</li><li>A configured <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"><strong>VPC</strong></a> (default or custom).</li></ul><h4>Create an ECS Cluster</h4><ol><li>Navigate to Amazon ECS → Clusters and click Create Cluster.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ese3jDpow_nFDwCdvcVBmg.png" /><figcaption>1. Create cluster view</figcaption></figure><p>2. Provide a name for your cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y27qFgoM3VVR6xd8ivb8VQ.png" /><figcaption>2. Cluster name</figcaption></figure><p>3. Select EC2 Instances as the infrastructure type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AdYJunj8TUlsBkLNpgEwcw.png" /><figcaption>3. ECS instance type</figcaption></figure><p>4. Configure your EC2 instances (vCPU, memory, AMI, etc.). For the EC2 instance role, click on the create role.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WKO82InUNw94Kxa3Mw3N8g.png" /><figcaption>4. EC2 configurations and roles</figcaption></figure><p>5. For networking:</p><ul><li>You can use the default VPC or a custom VPC.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LXLamj4mhZxw6taLwLIP-A.png" /><figcaption>5. VPC details</figcaption></figure><ul><li>Create a new security group and allow the necessary inbound rules. For simplicity, we’ll allow all ports (not recommended for production).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0AiK5lIlffB5CwaM-mN8mQ.png" /><figcaption>6. Security group details</figcaption></figure><h4>Build the Docker Image</h4><p>Once the cluster is ready:</p><ol><li>Open the cluster in the AWS console.</li><li>In the Tags section, copy the value of the tag aws:cloudformation:stack-name — you’ll need this later.</li></ol><p>Now, create a custom WSO2 Identity Server Docker image with clustering enabled.</p><p>Update your deployment.toml with the following configs:</p><pre>[clustering]<br>membership_scheme = &quot;aws-ecs&quot;<br><br>[clustering.properties]<br>region = &quot;&lt;your-aws-region&gt;&quot;<br>clusterName = &quot;&lt;your-cluster-name&gt;&quot;<br>hostHeader = &quot;ec2&quot;<br>vpcCidrBlock = &quot;&lt;your-vpc-cidr&gt;&quot;<br>tagValue = &quot;&lt;aws:cloudformation:stack-name-value&gt;&quot;</pre><p>After building the image:</p><ul><li>Push it to Docker Hub (or ECR if preferred).</li><li>This image will be referenced in the ECS task definition.</li></ul><h4>Create IAM Roles and Policies</h4><p>Next, configure IAM to allow ECS tasks to discover EC2 instances.</p><ol><li>Create a custom policy (IS-ECS-TESTING) with the following permissions:</li></ol><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Action&quot;: [<br>        &quot;ec2:DescribeAvailabilityZones&quot;,<br>        &quot;ec2:DescribeInstances&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;*&quot;<br>    }<br>  ]<br>}</pre><p>2. Create a task role and attach:</p><ul><li>AmazonECSTaskExecutionRolePolicy</li><li>IS-7–2-ECS-TESTING</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Esw2MbKhEvRkz0DRHG6Lvw.png" /><figcaption>7. Task execution role creation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y-rYYdFg69tBruPjA8aSEg.png" /><figcaption>8. Attach policies to the created role</figcaption></figure><h4>Create a Task Definition</h4><p>Now define how your containers will run:</p><ol><li>Go to ECS → Task Definitions → Create new task definition.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bLl-HsmrDxbL1pHphzJryQ.png" /><figcaption>9. Task definition name</figcaption></figure><p>2. Configure the required details:</p><ul><li>Select EC2 launch type and select the previously create task role both both sections.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4pNXd6UCNEPjMGbxLmECvg.png" /><figcaption>10. EC2 configs and roles</figcaption></figure><ul><li>Add your custom Identity Server container (from Docker Hub/ECR).</li><li>Map port 9443 for HTTPS.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lkuvwvbFlZDwvuh4BWjmOQ.png" /><figcaption>11. Container images and port mapping</figcaption></figure><h4>Deploy the Service</h4><ol><li>Go to your ECS cluster and click Create Service.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uaO86lbmx2-pBodkrxMFmg.png" /><figcaption>12. Create service</figcaption></figure><p>2. Choose the task definition you just created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mem1L4t2ez2XGBmhf9-W6g.png" /><figcaption>13. Task definition for the service</figcaption></figure><p>3. Set the replica count to 2 (for clustering).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7WJhFAPRW5XQpz9dK_ModQ.png" /><figcaption>14. Replica configs and AZs</figcaption></figure><p>4. Create the service and wait for ECS to provision the tasks on EC2 instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P_XR_UgMjmFYz62FBbJTwg.png" /><figcaption>15. Created EC2s by auto scaling group</figcaption></figure><h4>Verify Deployment</h4><p>Once both EC2 instances are running, check the container logs.</p><p>You should see Identity Server startup logs:</p><pre>[2025-10-01 18:44:34,383] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Cluster domain: wso2.carbon.domain<br>[2025-10-01 18:44:34,386] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Loading hazelcast configuration from axis2 clustering configuration<br>[2025-10-01 18:44:34,586] [] WARN {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - localMemberHost is configured to use the loopback address. Hazelcast Clustering needs ip addresses for localMemberHost and well-known members.<br>[2025-10-01 18:44:34,588] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Using aws-ecs based membership management scheme<br>[2025-10-01 18:44:34,614] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Hazelcast cluster is initializing...<br>[2025-10-01 18:44:41,816] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Hazelcast initialized in 7202ms<br>[2025-10-01 18:44:41,828] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Local member: [056f2fea-43bc-47b2-a22a-7500fd8d9f95] - Host:172.31.32.175, Remote Host:null, Port: 5701, HTTP:9763, HTTPS:9443, Domain: wso2.carbon.domain, Sub-domain:worker, Active:true<br>[2025-10-01 18:44:42,007] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Elected this member [056f2fea-43bc-47b2-a22a-7500fd8d9f95] as the Coordinator node<br>[2025-10-01 18:44:42,008] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Cluster initialization completed</pre><pre>[2025-10-01 18:44:42,597] [] INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - WSO2 Carbon started in 116 sec</pre><p>When the second node joins, Hazelcast clustering kicks in:</p><pre>[2025-10-01 18:44:31,956] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Loading hazelcast configuration from axis2 clustering configuration<br>[2025-10-01 18:44:31,955] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Cluster domain: wso2.carbon.domain<br>[2025-10-01 18:44:32,066] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Using aws-ecs based membership management scheme<br>[2025-10-01 18:44:32,066] [] WARN {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - localMemberHost is configured to use the loopback address. Hazelcast Clustering needs ip addresses for localMemberHost and well-known members.<br>[2025-10-01 18:44:32,145] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Hazelcast cluster is initializing...<br>[2025-10-01 18:44:47,342] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Hazelcast initialized in 15197ms<br>[2025-10-01 18:44:47,365] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Local member: [59ddfc43-f143-4a5f-b23c-ee693a637d1e] - Host:172.31.11.0, Remote Host:null, Port: 5701, HTTP:9763, HTTPS:9443, Domain: wso2.carbon.domain, Sub-domain:worker, Active:true<br>[2025-10-01 18:44:47,453] [] INFO {org.wso2.carbon.hazelcast.HazelcastClusteringAgent} - Cluster initialization completed</pre><p>In the first node, you can view the new member details.</p><pre>[2025-10-01 18:44:47,290] [] INFO {org.wso2.carbon.hazelcast.aws.AWSBasedMembershipScheme} - Member joined [59ddfc43-f143-4a5f-b23c-ee693a637d1e]: /172.31.11.0:5701</pre><p>This confirms that your ECS-based Identity Server cluster is up and running with Hazelcast clustering enabled 🎉.</p><p>External References</p><ul><li><a href="https://wso2.com/identity-server/">https://wso2.com/identity-server/</a></li><li><a href="https://hazelcast.com/">https://hazelcast.com/</a></li><li><a href="https://docs.aws.amazon.com/ecs/">https://docs.aws.amazon.com/ecs/</a></li><li><a href="https://is.docs.wso2.com/en/latest/deploy/deployment-guide/#clustering-related-configurations">https://is.docs.wso2.com/en/latest/deploy/deployment-guide/#clustering-related-configurations</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f1a6e0d58ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying WSO2 Identity Server on OpenShift]]></title>
            <link>https://medium.com/@ayeshajayasankha/deploying-wso2-identity-server-on-openshift-ec9117d7930e?source=rss-9232870cc5be------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec9117d7930e</guid>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[identity-server]]></category>
            <category><![CDATA[helm]]></category>
            <dc:creator><![CDATA[Ayesha Jayasankha]]></dc:creator>
            <pubDate>Mon, 12 May 2025 16:09:56 GMT</pubDate>
            <atom:updated>2025-05-22T07:17:30.849Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8afHhFNcNiYqSradhksLjg.png" /></figure><p>WSO2 Identity Server (IS) is a powerful open-source identity and access management (IAM) solution designed to handle authentication, authorization, identity provisioning, single sign-on (SSO), and more. Deploying WSO2 Identity Server in a containerized environment like Red Hat OpenShift enables greater scalability, automation, and enterprise integration with Kubernetes-native infrastructure.</p><p>This guide walks you through the process of deploying WSO2 Identity Server on OpenShift.</p><p><strong>Setup OpenShift cluster:</strong></p><p>You can follow to setup OpenShift cluster locally. If you have a cluster already, you can use that.</p><ul><li><a href="https://medium.com/@ayeshajayasankha/setup-openshift-cluster-locally-53a83a433ce3">https://medium.com/@ayeshajayasankha/setup-openshift-cluster-locally-53a83a433ce3</a></li></ul><p>In this article, I’ll walk you through two approaches for deploying WSO2 IS on OpenShift while ensuring compatibility with OpenShift’s hardened security model:</p><ul><li>Option 1: Use the official WSO2 Docker images directly with Helm.</li><li>Option 2: Create and deploy custom Docker images tailored for OpenShift.</li></ul><h4>Prerequisite</h4><p><strong>Step 1: Define the Release Name and Namespace for the Deployment</strong></p><p>We’ll start by setting the necessary environment variables and preparing the OpenShift environment for deploying WSO2 Identity Server using Helm.</p><pre>export NAMESPACE=&quot;&lt;Kubernetes Namespace to deploy the identity server resources&gt;&quot;<br>export RELEASE_NAME=&quot;&lt;Helm release name of the identity server deployment&gt;&quot;</pre><p>Replace the placeholders with your desired values. For example:</p><pre>export NAMESPACE=&quot;wso2-openshift&quot;<br>export RELEASE_NAME=&quot;wso2&quot;</pre><p>2. Create the Namespace</p><p>Create the namespace in your OpenShift cluster and this will logically group all the resources related to your WSO2 Identity Server deployment.</p><pre>oc create ns $NAMESPACE</pre><p>3. Download helm repository</p><p>Clone the official Helm chart repository from GitHub. This will download the required chart files to your local machine and move you into the project directory where the Helm deployment can be configured and executed.</p><pre>git clone https://github.com/wso2/kubernetes-is.git &amp;&amp; cd kubernetes-is</pre><h4>Option 1: Use the official WSO2 Docker images directly with Helm</h4><p>The official WSO2 Docker images are already configured to run using a dedicated non-root user and group. To deploy these images on OpenShift, we’ll disable the default seccomp profiles to avoid permission-related issues.</p><p>Since the container runs with the user defined in the Docker image, we must grant the anyuid Security Context Constraint (SCC) to the associated service account. This allows the pod to run with the specified non-root user, bypassing OpenShift’s default restrictions.</p><ol><li>Grant anyuid Permission to the Service Account</li></ol><pre>SERVICE_ACCOUNT_NAME=&quot;$RELEASE_NAME-identity-server&quot;<br>oc adm policy add-scc-to-user anyuid -z $SERVICE_ACCOUNT_NAME -n $NAMESPACE</pre><p>2. Deploy helm chart</p><pre>helm install $RELEASE_NAME . -f values.yaml -n $NAMESPACE &amp;&amp; \<br> --set deployment.securityContext.seccompProfile.enabled=false &amp;&amp; \<br> --set deployment.apparmor.enabled=false &amp;&amp; \<br> --set deployment.image.registry=&quot;wso2&quot; &amp;&amp; \<br> --set deployment.image.repository=&quot;wso2is&quot; &amp;&amp; \<br> --set deployment.image.tag=&quot;7.1.0-alpine&quot; &amp;&amp; \<br> --set deployment.replicas=1</pre><h4>Option 2: Deploying a Custom Docker Image Using Helm Charts</h4><p>To fully comply with OpenShift’s security model especially its use of arbitrary user IDs we can create a custom Docker image tailored for OpenShift environments. In this section, I’ll demonstrate how to modify the image to ensure compatibility, including how to set group ownership to the root group (GID 0), which allows access when OpenShift assigns a random UID at runtime.</p><p>The official WSO2 Docker images run as a non-root user with a fixed UID. While that works on standard Kubernetes clusters, OpenShift often injects a random UID and restricts container privileges. To prevent permission issues, we update the image to:</p><ul><li>Allow group write access to required directories</li><li>Assign root group ownership (GID 0)</li><li>Bundle dependencies like the MySQL JDBC driver for ease of testing</li></ul><h4>Source Base</h4><p>We use the alpine/is Dockerfile from the official <a href="https://github.com/wso2/docker-is/tree/master/dockerfiles/alpine/is">WSO2 Docker GitHub repository</a> as our base. You can retain the same Docker entrypoint script defined in the original alpine/is image for your deployment. Below is the modified Dockerfile:</p><pre>FROM alpine:3.20.3<br>LABEL maintainer=”WSO2 Docker Maintainers &lt;dev@wso2.org&gt;” \<br>com.wso2.docker.source=&quot;https://github.com/wso2/docker-is/releases/tag/v7.1.0.1&quot;<br>ENV LANG=&#39;en_US.UTF-8&#39; LANGUAGE=&#39;en_US:en&#39; LC_ALL=&#39;en_US.UTF-8&#39;<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br># Install JDK dependencies<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br>RUN apk add - no-cache tzdata musl-locales musl-locales-lang &amp;&amp; rm -rf /var/cache/apk/*<br>ENV JAVA_VERSION jdk-21.0.6+7<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br># Install Eclipse Temurin OpenJDK 21<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br>RUN set -eux; \<br>apk add - no-cache - virtual .fetch-deps curl wget; \<br>ARCH=&quot;$(apk - print-arch)&quot;; \<br>case &quot;${ARCH}&quot; in \<br>aarch64) ESUM=&#39;2798990401d9c47eaeddb7d5148f577770e4c1013b9223290a43765463204ae4&#39;; \<br>BINARY_URL=&#39;https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.6%2B7/OpenJDK21U-jdk_aarch64_alpine-linux_hotspot_21.0.6_7.tar.gz&#39; ;; \<br>x86_64) ESUM=&#39;6c66470a9143ad562570a34c1583d9fa50bf904f6f9ced642e9d800ce043a0f3&#39;; \<br>BINARY_URL=&#39;https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.6%2B7/OpenJDK21U-jdk_x64_alpine-linux_hotspot_21.0.6_7.tar.gz&#39; ;; \<br>*) echo &quot;Unsupported arch: ${ARCH}&quot;; exit 1 ;; \<br>esac; \<br>wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \<br>echo &quot;${ESUM} /tmp/openjdk.tar.gz&quot; | sha256sum -c -; \<br>mkdir -p /opt/java/openjdk; \<br>tar -xzf /tmp/openjdk.tar.gz -C /opt/java/openjdk - strip-components=1 - no-same-owner; \<br>rm -rf /tmp/openjdk.tar.gz; \<br>apk del .fetch-deps;<br>ENV JAVA_HOME=/opt/java/openjdk \<br>PATH=&quot;/opt/java/openjdk/bin:$PATH&quot;<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br># Build‑time arguments<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br>ARG USER=wso2carbon<br>ARG USER_ID=802<br># Use root group so OpenShift containers<br>ARG USER_GROUP=root<br>ARG USER_GROUP_ID=0<br>ARG USER_HOME=/home/${USER}<br>ARG WSO2_SERVER_NAME=wso2is<br>ARG WSO2_SERVER_VERSION=7.1.0<br>ARG WSO2_SERVER_REPOSITORY=product-is<br>ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION}<br>ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}<br>ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_VERSION}/${WSO2_SERVER}.zip<br>ARG DNS_JAVA_VERSION=3.6.1<br>ARG MOTD=&#39;printf &quot;\n Welcome to WSO2 Docker Resources \n - - - - - - - - - - - - - - - - - \n This container runs WSO2 Identity Server under the Apache 2.0 license. \n Read more @ http://www.apache.org/licenses/LICENSE-2.0.\n&quot;&#39;<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br># Create user &amp; group, set MOTD<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br>RUN adduser -S -u ${USER_ID} -h ${USER_HOME} -G ${USER_GROUP} ${USER} &amp;&amp; \<br>echo ${MOTD} &gt; &quot;${USER_HOME}/.ashrc&quot;<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br># Java preferences directories to avoid warnings<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br>RUN mkdir -p ${USER_HOME}/.java/.{systemPrefs,userPrefs} &amp;&amp; \<br>chmod -R g+rwX ${USER_HOME}/.java &amp;&amp; chown -R ${USER}:${USER_GROUP} ${USER_HOME}/.java<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br># Copy entrypoint<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br>COPY - chown=wso2carbon:${USER_GROUP} docker-entrypoint.sh ${USER_HOME}/<br>RUN chmod g+rx ${USER_HOME}/docker-entrypoint.sh<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br># Install additional packages required by IS<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br>RUN apk add - no-cache netcat-openbsd unzip wget<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br># Download and unpack WSO2 Identity Server, fix permissions<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br>RUN wget -O /tmp/${WSO2_SERVER}.zip &quot;${WSO2_SERVER_DIST_URL}&quot; &amp;&amp; \<br>unzip -d ${USER_HOME} /tmp/${WSO2_SERVER}.zip &amp;&amp; \<br>rm -f /tmp/${WSO2_SERVER}.zip &amp;&amp; \<br>chown -R ${USER}:${USER_GROUP} ${WSO2_SERVER_HOME} &amp;&amp; \<br>chmod -R g+rwX ${WSO2_SERVER_HOME}<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br># Add MySQL Connector/J library<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br>ADD - chown=wso2carbon:${USER_GROUP} https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/8.2.0/mysql-connector-j-8.2.0.jar ${WSO2_SERVER_HOME}/repository/components/lib<br>RUN chmod g+rxX ${WSO2_SERVER_HOME}/repository/components/lib/mysql-connector-j-8.2.0.jar<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br># Add dnsjava library for K8s membership scheme<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br>ADD - chown=wso2carbon:${USER_GROUP} https://repo1.maven.org/maven2/dnsjava/dnsjava/${DNS_JAVA_VERSION}/dnsjava-${DNS_JAVA_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/lib<br>RUN chmod g+rwX ${WSO2_SERVER_HOME}/repository/components/lib/dnsjava-${DNS_JAVA_VERSION}.jar<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br># Switch to non‑root user<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br>USER ${USER_ID}<br>WORKDIR ${USER_HOME}<br>ENV WORKING_DIRECTORY=${USER_HOME} \<br>WSO2_SERVER_HOME=${WSO2_SERVER_HOME}<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br># Expose ports &amp; run<br># - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br>EXPOSE 4000 9763 9443<br>ENTRYPOINT [&quot;/home/wso2carbon/docker-entrypoint.sh&quot;]</pre><ol><li>Build and Push the Custom Image</li></ol><p>Replace &lt;your-registry&gt; with your container registry.</p><pre>docker build -t &lt;your-registry&gt;/wso2is-openshift:7.1.0 .<br>docker push &lt;your-registry&gt;/wso2is-openshift:7.1.0</pre><p>2. Deploy MySQL in Your Cluster</p><p>Use the OpenShift-provided mysql-ephemeral template to quickly deploy a MySQL pod:</p><pre>oc new-app --template=mysql-ephemeral \<br>  -p MYSQL_USER=user \<br>  -p MYSQL_PASSWORD=pass \<br>  -p MYSQL_DATABASE=mydb \<br>  -p MYSQL_ROOT_PASSWORD=rootpass \<br>  -n $NAMESPACE</pre><p>3. Port Forward the MySQL Pod</p><p>You’ll need to connect to the MySQL server to run WSO2 database scripts.</p><pre># Get the MySQL pod name<br>oc get pods -n $NAMESPACE</pre><pre># Start port forwarding<br>oc port-forward &lt;POD_NAME&gt; 3306:3306 -n $NAMESPACE &amp;</pre><p>4. Prepare the Databases and Apply WSO2 Schema</p><p>After port-forwarding the MySQL service, you can create the required databases and initialize them with the WSO2 Identity Server schemas.</p><pre>mysql -h 127.0.0.1 -P 3306 -u root -p’rootpass’ -e &quot;CREATE DATABASE WSO2IDENTITY_DB;&quot;<br>mysql -h 127.0.0.1 -P 3306 -u root -p’rootpass’ -e &quot;CREATE DATABASE WSO2SHARED_DB;&quot;</pre><p>Download and extract <a href="https://github.com/wso2/product-is/releases/tag/v7.1.0">WSO2 Identity Server 7.1.0</a>, then navigate to the product directory and execute the following commands:</p><pre>mysql -h 127.0.0.1 -P 3306 -u root -p&#39;rootpass&#39; WSO2IDENTITY_DB &lt; dbscripts/identity/mysql.sql<br>mysql -h 127.0.0.1 -P 3306 -u root -p&#39;rootpass&#39; WSO2IDENTITY_DB &lt; dbscripts/consent/mysql.sql<br>mysql -h 127.0.0.1 -P 3306 -u root -p&#39;rootpass&#39; WSO2SHARED_DB &lt; dbscripts/mysql.sql</pre><p>5. Deploy WSO2 Identity Server with MySQL database</p><pre>export DOCKER_REGISTRY=&quot;&lt;your-registry&gt;&quot;<br>export DOCKER_REPOSITORY=&quot;wso2is-openshift&quot;<br>export DOCKER_TAG=&quot;7.1.0&quot;</pre><pre>helm install $RELEASE_NAME . -f values.yaml -n $NAMESPACE \<br>  --set deployment.securityContext.runAsUser.enabled=false \<br>  --set deployment.apparmor.enabled=false \<br>  --set deployment.image.registry=&quot;$DOCKER_REGISTRY&quot; \<br>  --set deployment.image.repository=&quot;$DOCKER_REPOSITORY&quot; \<br>  --set deployment.image.tag=&quot;$DOCKER_TAG&quot; \<br>  --set deployment.replicas=1 \<br>  --set deployment.configMaps.entryPoint.defaultMode=0457 \<br>  --set deploymentToml.database.identity.type=mysql \<br>  --set deploymentToml.database.identity.url=&quot;jdbc:mysql://mysql:3306/WSO2IDENTITY_DB&quot; \<br>  --set deploymentToml.database.identity.username=&quot;root&quot; \<br>  --set deploymentToml.database.identity.password=&quot;rootpass&quot; \<br>  --set deploymentToml.database.identity.driver=&quot;com.mysql.cj.jdbc.Driver&quot; \<br>  --set deploymentToml.database.shared.type=mysql \<br>  --set deploymentToml.database.shared.url=&quot;jdbc:mysql://mysql:3306/WSO2SHARED_DB&quot; \<br>  --set deploymentToml.database.shared.username=&quot;root&quot; \<br>  --set deploymentToml.database.shared.password=&quot;rootpass&quot; \<br>  --set deploymentToml.database.shared.driver=&quot;com.mysql.cj.jdbc.Driver&quot; \<br>  --set deploymentToml.database.consent.type=mysql \<br>  --set deploymentToml.database.consent.url=&quot;jdbc:mysql://mysql:3306/WSO2IDENTITY_DB&quot; \<br>  --set deploymentToml.database.consent.username=&quot;root&quot; \<br>  --set deploymentToml.database.consent.password=&quot;rootpass&quot; \<br>  --set deploymentToml.database.consent.driver=&quot;com.mysql.cj.jdbc.Driver&quot; \<br>  --set deploymentToml.database.user.type=mysql \<br>  --set deploymentToml.database.user.url=&quot;jdbc:mysql://mysql:3306/WSO2SHARED_DB&quot; \<br>  --set deploymentToml.database.user.username=&quot;root&quot; \<br>  --set deploymentToml.database.user.password=&quot;rootpass&quot; \<br>  --set deploymentToml.database.user.driver=&quot;com.mysql.cj.jdbc.Driver&quot;</pre><h3>Post Steps</h3><p><strong>Expose the Identity Server Using an OpenShift Route<br></strong>After deploying the Identity Server, you can expose it externally using a passthrough route.</p><pre>oc get svc -n $NAMESPACE<br>export SERVICE_NAME=$RELEASE_NAME-identity-server<br><br># Create route<br>oc create route passthrough wso2is-ssl --service=$SERVICE_NAME \<br>--port=9443 --hostname=wso2is.com -n $NAMESPACE</pre><p>Now you can access the WSO2 Identity Server console by adding the required host mapping.</p><p>Deploying WSO2 Identity Server on OpenShift enables a secure and scalable identity management solution in a cloud-native environment. By following this guide, you can set up and customize your deployment to suit your development needs while leveraging the power of OpenShift.</p><h3>References</h3><ul><li><a href="https://github.com/wso2/kubernetes-is">https://github.com/wso2/kubernetes-is</a></li><li><a href="https://github.com/wso2/product-is">https://github.com/wso2/product-is</a></li><li><a href="https://github.com/wso2/docker-is">https://github.com/wso2/docker-is</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec9117d7930e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup OpenShift Cluster Locally]]></title>
            <link>https://medium.com/@ayeshajayasankha/setup-openshift-cluster-locally-53a83a433ce3?source=rss-9232870cc5be------2</link>
            <guid isPermaLink="false">https://medium.com/p/53a83a433ce3</guid>
            <category><![CDATA[containerization]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[crc]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[clustering]]></category>
            <dc:creator><![CDATA[Ayesha Jayasankha]]></dc:creator>
            <pubDate>Mon, 12 May 2025 13:06:13 GMT</pubDate>
            <atom:updated>2025-05-12T13:07:19.812Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*Ax7Z7h93XlgQxXLKMGlXkw.png" /></figure><h3><strong>What is OpenShift?</strong></h3><p>OpenShift is a Kubernetes-based container application platform developed by Red Hat. It extends Kubernetes with powerful developer and operational tools, a built-in CI/CD pipeline system, robust security policies, and a web-based console for managing workloads. OpenShift streamlines the process of building, deploying, and scaling applications in containers, making it a preferred choice for enterprise-grade cloud-native development. It’s available as a fully managed service (like OpenShift Online or OpenShift Dedicated) or for self-managed installations (like OpenShift Container Platform and CodeReady Containers for local setups).</p><p>Setting up OpenShift locally is a great way to explore its powerful features without needing a full-blown cloud or datacenter. In this guide, I’ll walk you through how to install and run OpenShift on your local machine.</p><h3>Prerequisites</h3><ul><li>Operating System: Linux, macOS, or Windows</li><li>Memory: At least 12GB</li><li>CPU: 6 cores+</li><li>Disk: 35+ GB</li></ul><h3>Setup OC (OpenShift CLI)</h3><pre>OCP_VERSION=4.14.20<br>ARCH=$(uname -m)<br>BASE_URL=&quot;https://mirror.openshift.com/pub/openshift-v4/$ARCH/clients/ocp/${OCP_VERSION}&quot;<br>curl -LO &quot;$BASE_URL/openshift-client-linux-${OCP_VERSION}.tar.gz&quot;<br>tar -xzf openshift-client-linux-${OCP_VERSION}.tar.gz<br>sudo mv oc kubectl /usr/local/bin/<br>sudo chmod +x /usr/local/bin/oc /usr/local/bin/kubectl<br>oc version</pre><h3>Setting up Red Hat Account and Downloading OpenShift Locally</h3><h4>Creating a Red Hat Account</h4><ol><li>Visit the Red Hat Developer website: <a href="https://developers.redhat.com/">https://developers.redhat.com/</a></li><li>Click on “Register” or “Log In” if you already have an account.</li><li>Follow the prompts to create a new account by providing your email address, name, and creating a password.</li><li>Verify your email address when prompted.</li><li>Once registered and logged in, you will have a Red Hat account.</li></ol><h4>Downloading OpenShift Locally</h4><ol><li>After logging in, navigate to the OpenShift section of the Red Hat website:</li></ol><p><a href="https://developers.redhat.com/products/openshift-local/overview">https://developers.redhat.com/products/openshift-local/overview</a></p><ol><li>Select Install openshift on your laptop</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vkOjskfKMYHyWJXs" /><figcaption>CRC download view</figcaption></figure><ol><li>Download the CRC binary compatible with your operating system (Linux, macOS, or Windows).</li><li>You might need to accept the terms and conditions or agree to the developer program to initiate the download.</li><li>Download the pull secret as it requires during the startup steps</li></ol><pre># Using linux amd64 version in this blog<br><br>wget https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz<br>tar xvf crc-linux-amd64.tar.xz<br>mkdir -p ~/local/bin<br>mv crc-linux-*-amd64/crc ~/local/bin/<br>export PATH=$HOME/local/bin:$PATH<br>echo &#39;export PATH=$HOME/local/bin:$PATH&#39; &gt;&gt; ~/.bashrc<br>source ~/.bashrc<br>crc version</pre><h4>Setup CRC configurations</h4><p>To optimize the configuration for your machine, adjust the settings for the number of CPUs, memory, and telemetry consent.</p><pre>crc config set cpus 6<br>crc config set memory 12384<br>crc config set consent-telemetry yes</pre><h4>Start openshift cluster</h4><p>Once configured, you can initialize and start your local OpenShift cluster:</p><pre>crc setup<br>crc start</pre><p>During the initialization, you’ll need to provide the saved pull secret (you can download it from your Red Hat OpenShift account).</p><h4><strong>Verify cluster configurations</strong></h4><p>You can run following command to get the deployed pods in all namespaces.</p><pre>oc get pods -A</pre><h4>Access OpenShift Console</h4><p>After starting CRC, OpenShift will generate a route to access the OpenShift Web Console locally. To retrieve the URL for the web console, follow these steps:</p><pre>crc console</pre><p>This will output a URL like: <a href="https://console-openshift-console.apps-crc.testing/">https://console-openshift-console.apps-crc.testing</a>. Open the URL provided in your web browser and enter the openshift credentials to login. You can get the credentials using folllowing command.</p><pre>crc console --credentials</pre><p>This will display the username and password required to log in. Typically, the username is kubeadmin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rnOkqQXEB_aYiyrQJ_aHqQ.png" /><figcaption>OpenShift console login portal</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K9D0xxmUVF7qAEJgda2bsA.png" /><figcaption>OpenShift console</figcaption></figure><h4>Clean Up OpenShift cluster</h4><p>When you’re done working with the cluster, you can stop it, delete the resources, and clean up the environment:</p><pre>crc stop<br>crc delete<br>crc cleanup</pre><p>These commands will stop the OpenShift cluster, remove any deployed resources, and clean up CRC configurations.</p><p>In summary, we’ve explored how to set up OpenShift locally using CRC. By following these steps, you’ll be able to efficiently manage your local OpenShift environment, enabling smooth development and testing workflows. ;-)</p><h4>References</h4><ul><li><a href="https://developer.redhat.com/">https://developer.redhat.com/</a></li><li><a href="https://developers.redhat.com/products/openshift-local/overview">https://developers.redhat.com/products/openshift-local/overview</a></li><li><a href="https://docs.redhat.com/en/documentation/openshift_container_platform/4.8/html/cli_tools/openshift-cli-oc#cli-getting-started">https://docs.redhat.com/en/documentation/openshift_container_platform/4.8/html/cli_tools/openshift-cli-oc#cli-getting-started</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53a83a433ce3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Strategies for Exposing Your Kubernetes Application]]></title>
            <link>https://medium.com/@ayeshajayasankha/strategies-for-exposing-your-kubernetes-application-eb7a576a22ab?source=rss-9232870cc5be------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb7a576a22ab</guid>
            <category><![CDATA[load-balancing]]></category>
            <category><![CDATA[services]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[container-orchestration]]></category>
            <dc:creator><![CDATA[Ayesha Jayasankha]]></dc:creator>
            <pubDate>Sun, 08 Sep 2024 07:02:03 GMT</pubDate>
            <atom:updated>2024-09-08T07:02:03.518Z</atom:updated>
            <content:encoded><![CDATA[<h3>Expose your Kubernetes application</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9cQltfPWWdUoP1h28kLSNw.jpeg" /></figure><p>Kubernetes is an open-source platform that manages containerized applications in a scalable manner. It allows users to deploy and expose their applications for access by other services or users. In this article, we will discuss two common ways of exposing applications.</p><ol><li>Port forwarding</li><li>Kubernetes services</li></ol><h4>Using port forward</h4><p><strong>How port forward works</strong><br>Port forwarding allows users to access internal resources of the cluster from their local machine. This method is useful for accessing resources that are not exposed to the local machine through services. The main purpose of port forwarding is to test and debug applications deployed in the Kubernetes cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*WSN-dJ5uhgwPl0dhSZjFiQ.png" /></figure><p><strong>Port forward your applications</strong></p><p>You can use port forwarding to access pods, deployments, or services from your local machine. Port forwarding requires specifying the resource type, and if not specified, it defaults to using the pod as the resource type.</p><pre>kubectl port-forward &lt;resource_type&gt;/&lt;resource_name&gt; &lt;local_port&gt;/&lt;remote_port&gt;</pre><p>You can use the following command to deploy a nginx pod in your cluster with port 80.</p><pre>kubectl run nginx-pod --image=nginx --port=80</pre><p>Now you can use the port forward mechanism to access the nginx pod from the local machine.</p><pre>kubectl port-forward pods/nginx-pod 8888:80</pre><pre>curl http://127.0.0.1:8888/</pre><h4>Using Kubernetes service</h4><p><strong>What is a service in Kubernetes</strong></p><p>A Service is a method for exposing a network application that is running as one or more Pods in your cluster. Since Pods are short-lived resources that can be replaced at any time, a Service provides a way to access the applications using a unique IP address or name.</p><p><strong>Different types of services in Kubernetes</strong></p><ul><li>Cluster IP</li><li>Node Port</li><li>Load Balancer</li><li>External Name</li><li>Headless Services</li></ul><p>You can use the following command to deploy a nginx pod in your cluster with port 80 to test the service types.</p><pre>kubectl run nginx-pod --image=nginx --port=80</pre><p><strong>Cluster IP</strong></p><p>This is the default service type in Kubernetes, and it exposes a service that can only be accessed within the cluster. However, you can expose these services to the public using Ingress or gateways.</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  labels:<br>    run: nginx-pod<br>  name: nginxsvc-clusterip<br>spec:<br>  ports:<br>  - port: 80<br>    protocol: TCP<br>    targetPort: 80<br>  selector:<br>    run: nginx-pod<br>  type: ClusterIP</pre><p><strong>Node Port</strong></p><p>This service type allows you to expose a service on a specific port on each node in your cluster. Kubernetes typically allows users to choose port allocations between 30000 and 32767. If users haven’t specified a port, Kubernetes will automatically assign one. Since this method exposes the port on each node, it can be less secure compared to other service types.</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  labels:<br>    run: nginx-pod<br>  name: nginxsvc-nodeport<br>spec:<br>  ports:<br>  - port: 80<br>    protocol: TCP<br>    targetPort: 80<br>    nodePort: 31000<br>  selector:<br>    run: nginx-pod<br>  type: NodePort</pre><p><strong>Load Balancer</strong></p><p>This method is designed to use an external load balancer that distributes incoming traffic to your service’s Pods. The load balancer is managed by cloud providers (such as Azure, AWS, etc.). Although this is a widely used service type, it can be costlier because cloud providers typically charge for these types of load balancers.</p><pre>piVersion: v1<br>kind: Service<br>metadata:<br>  labels:<br>    run: nginx-pod<br>  name: nginxsvc-loadbalancer<br>spec:<br>  ports:<br>  - port: 80<br>    protocol: TCP<br>    targetPort: 80<br>  selector:<br>    run: nginx-pod<br>  type: LoadBalancer</pre><p><strong>External Name</strong></p><p>This service type maps services to external DNS names. It does not create an external service but only creates a CNAME record in the cluster’s DNS. This service type is useful when users need to access resources from outside the cluster.</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: db-service<br>spec:<br>  type: ExternalName<br>  externalName: database.example.com</pre><p><strong>Headless Services</strong></p><p>This service type allows users to connect directly to a Pod without using virtual IP addresses. It does not provide load balancing or a single entry point like a regular service and instead enables direct access to Pods. This method is particularly useful for stateful applications.</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  labels:<br>    run: nginx-pod<br>  name: nginxsvc-headlessservice<br>spec:<br>  ports:<br>  - port: 80<br>    protocol: TCP<br>    targetPort: 80<br>  selector:<br>    run: nginx-pod<br>  clusterIP: None</pre><p>We can use these service types in various use cases and scenarios.</p><p><strong>References</strong></p><ul><li><a href="https://kubernetes.io/docs/concepts/services-networking/service/">https://kubernetes.io/docs/concepts/services-networking/service/</a></li><li><a href="https://kubernetes.io/docs/concepts/workloads/pods/">https://kubernetes.io/docs/concepts/workloads/pods/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb7a576a22ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Connect Looker Studio with Azure — Part II]]></title>
            <link>https://medium.com/@ayeshajayasankha/connect-looker-studio-with-azure-part-ii-1768c7c3722e?source=rss-9232870cc5be------2</link>
            <guid isPermaLink="false">https://medium.com/p/1768c7c3722e</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[automation-account]]></category>
            <category><![CDATA[google-sheets]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Ayesha Jayasankha]]></dc:creator>
            <pubDate>Sun, 31 Dec 2023 14:10:03 GMT</pubDate>
            <atom:updated>2023-12-31T14:10:03.060Z</atom:updated>
            <content:encoded><![CDATA[<h3>Connect Looker Studio with Azure — Part II</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eDRLS9PM7ezSq9gY-WVSKA.jpeg" /></figure><p>In the last article, I explained how to fetch data from Azure Log Analytics workspace to Google Sheets using Apps Script. If you haven’t read about that, you can refer to Connect Looker Studio with Azure — Part I</p><p><a href="https://medium.com/@ayeshajayasankha/connect-looker-studio-with-azure-f7ca5ce0b025">https://medium.com/@ayeshajayasankha/connect-looker-studio-with-azure-f7ca5ce0b025</a></p><p>In this article, I will explain how to publish data from Azure to Google Sheets using Azure Automation RunBooks.</p><h4>Why do we need to publish data?</h4><p>When fetching data using Apps Script, we had to store Azure AD application credentials within the script. However, when an Apps Script is accessible by multiple people, there’s a risk of exposing your Azure AD application credentials. Since there is no secure method to store credentials within Apps Script, it becomes necessary to shift the publication pathway to the Azure side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UYs9qOZFz3lOZNmy" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*71wacPEqJqSxsbYg" /></figure><h4>How to setup Google Cloud Console</h4><ol><li>Go to this link — <a href="https://console.cloud.google.com/">https://console.cloud.google.com/</a></li><li>Create a new project</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a8vr82FxSu4oayNr" /></figure><p>3. Then click on <strong>Library</strong> and enable <strong>Google Sheets API</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*V65W5dgduJ2h6wNW" /></figure><p>4. Now click on the <strong>Credentials</strong> panel and select <strong>Create credentials</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3KPqQ-1Q6i3IYnG7" /></figure><p>5. Next, create an OAuth application and save the Client ID and Client Secret for future reference.</p><p>6. Navigate to <a href="https://developers.google.com/oauthplayground/">https://developers.google.com/oauthplayground/</a> and select the following scopes and request an authorization code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/0*1VAH3lugCSDDbBwo" /></figure><p>7. Then exchange the authorization code for an access token and a refresh token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/0*HYXbtspe7Nhjr2_g" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/0*7qDI8525QVVMoyvu" /></figure><p>9. In this point you have the following details</p><p>i. Client ID</p><p>ii. Client Secret</p><p>iii. Access Token</p><p>iv. Refresh Token</p><p>Moving forward, you can use the refresh token grant type to get the access token for authentication.</p><h3>Create Azure automation runbook to publication</h3><ol><li>Login to the Azure Portal and create an Automation account. <a href="https://portal.azure.com/#home">https://portal.azure.com/#home</a></li><li>Create an Azure Key Vault and add your Client Secret and Refresh Token as ‘GOOGLE-CLIENT-SECRET’ and ‘GOOGLE-REFRESH-TOKEN’, respectively.</li><li>Your automation runbook should be able to authenticate to Azure with the required permissions to access the necessary resources, such as reading logs from Log Analytics or retrieving secrets from Key Vault. In this article, I’m using a hybrid worker, and the hybrid worker VM has access to the required Azure resources. For instructions on setting up a hybrid worker for your automation account, you can refer to <a href="https://learn.microsoft.com/en-us/azure/automation/automation-hybrid-runbook-worker">https://learn.microsoft.com/en-us/azure/automation/automation-hybrid-runbook-worker</a>.</li><li>The following code can be used to publish data from the automation account to Google Sheets.</li></ol><pre>&lt;#<br>    .DESCRIPTION<br>        The Runbook can be executed to publish azure statics to the google sheet<br><br>    .PARAMETER Automation_Account_Name<br>        Name of the Automation Account<br>    .PARAMETER Automation_Account_Resource_Group_Name<br>        Name of the Resource Group where the Automation Account resides<br>#&gt;<br><br>Param (<br>    [Parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]<br>    [String] $Automation_Account_Name,<br>    [Parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]<br>    [String] $Automation_Account_Resource_Group_Name<br>)<br><br>try<br>{<br>    Connect-AzAccount -Identity -ErrorAction stop -WarningAction SilentlyContinue<br>} catch {<br>    Write-Error -Message $_.Exception<br>    exit 1<br>}<br><br>$AutomationKeyVaultName = &quot;dummy-kv&quot;<br>$WorkspaceName          = &quot;dummy-workspace&quot;<br>$ResourceGroup          = &quot;dummy-rg&quot;<br>$GoogleSheetID          = &quot;dummy-sheet-id&quot;<br>$GoogleClientID      = &quot;dummy-client-id&quot;<br>$GoogleClientSecret  = Get-AzKeyVaultSecret -VaultName &quot;$AutomationKeyVaultName&quot; -Name &quot;GOOGLE-CLIENT-SECRET&quot; -AsPlainText<br>$GoogleRefreshToken  = Get-AzKeyVaultSecret -VaultName &quot;$AutomationKeyVaultName&quot; -Name &quot;GOOGLE-REFRESH-TOKEN&quot; -AsPlainText<br>$OutputFilePath      = &quot;output.csv&quot;<br>$CurrentDate         = Get-Date -Format &quot;yyyy-MM-dd&quot;<br><br>$KustoQuery = &quot;&lt;Add your kusto query in here&gt;&quot;<br><br>Write-Host &quot;Current Date : &quot; $CurrentDate<br><br>&lt;#<br>    .SYNOPSIS<br>        Function to get the access token for the google sheet<br>    .DESCRIPTION<br>        Get-AccessToken function is used to get the access token for the google sheet<br>#&gt;<br>function Get-AccessToken() {<br><br>  $Url = &quot;https://oauth2.googleapis.com/token&quot;<br><br>  $Headers = @{<br>      &#39;Content-Type&#39; = &#39;application/x-www-form-urlencoded&#39;<br>  }<br><br>  $Body = @{<br>      &#39;client_id&#39; = $GoogleClientID<br>      &#39;client_secret&#39; = $GoogleClientSecret<br>      &#39;refresh_token&#39; = $GoogleRefreshToken<br>      &#39;grant_type&#39; = &#39;refresh_token&#39;<br>  }<br><br>  try{<br>      $AccessTokenRes = Invoke-RestMethod -Method &#39;Post&#39; -Uri $Url -Headers $Headers -Body $Body<br>  } catch {<br>      Write-Error &quot;Failed to get bearer token for publish data.&quot; $_<br>      exit 1<br>  }<br><br>  $AccessToken = $AccessTokenRes.access_token<br>  return $AccessToken<br><br>}<br><br>&lt;#<br>    .SYNOPSIS<br>        Function to get the Azure Log Analytics workspace logs<br>    .DESCRIPTION<br>        Execute-LAQuery function is used to execute the kusto query and export the results to a csv file<br>#&gt;<br>function Execute-LAQuery($KustoQuery, $FilePath) {<br><br>  try {<br>    $Workspace = Get-AzOperationalInsightsWorkspace -Name $WorkspaceName -ResourceGroupName $ResourceGroup<br>    $KustoQueryOutput = Invoke-AzOperationalInsightsQuery -Workspace $Workspace -Query $KustoQuery -ErrorAction Stop | select -ExpandProperty Results<br>    $KustoQueryOutput | Export-Csv -Path $FilePath -NoTypeInformation<br><br>  } catch {<br>    Write-Error $_.Exception<br>    exit 1<br>  }<br>}<br><br>&lt;#<br>    .SYNOPSIS<br>        Function to build the json body for the google sheet<br>    .DESCRIPTION<br>        Build-JSonBody function is used to build the json body for the google sheet<br>#&gt;<br>function Build-Application-JsonBody() {<br>  $CsvData = Import-Csv -Path $OutputFilePath<br><br>  # Create a custom JSON object<br><br>  # Iterate through the CSV data and add each row to the &quot;values&quot; array<br>  foreach ($Row in $CsvData) {<br>    $Values= @($Row.&quot;TimeGenerated&quot;, $Row.&quot;LogEntry&quot;,)<br><br>    # Split the input string into parts based on the known pattern<br>    $Parts = $Values -split &#39; &#39;<br><br>    # Create a new array with the desired format<br>    $OutputArray = @(&quot;`&quot;$($Parts[0])`&quot;&quot;, &quot;`&quot;$($Parts[1])`&quot;&quot;)<br><br>    # Convert the array elements to a CSV-formatted string<br>    $CsvFormattedString = $OutputArray -join &#39;, &#39;<br><br>    $Jsonvalues += &quot;[ $CsvFormattedString ],&quot;<br>  }<br><br>  $Jsonvalues = $Jsonvalues.Substring(0, $Jsonvalues.Length - 1)<br><br>  $JsonObject = &quot;{ `&quot;values`&quot;: [ $Jsonvalues ] }&quot;<br>  return $JsonObject<br><br>}<br><br>&lt;#<br>    .SYNOPSIS<br>        Function to update the google sheet.<br>    .DESCRIPTION<br>        Update-Sheet function updates the google sheet.<br>#&gt;<br>function Update-Sheet($SheetName, $JsonBody) {<br><br>  $AccessToken = Get-AccessToken<br><br>  $Uri = &quot;https://sheets.googleapis.com/v4/spreadsheets/$GoogleSheetID/values/&quot;+$SheetName+&quot;:append?valueInputOption=RAW&quot;<br><br>  $Headers = @{<br>      &quot;Authorization&quot; = &quot;Bearer $AccessToken&quot;<br>      &quot;Content-Type&quot;  = &quot;application/json&quot;<br>  }<br><br>  Write-Host &quot;Publishing data to the google sheet&quot;<br><br>  try {<br>      Invoke-RestMethod -Uri $Uri -Headers $Headers -Method Post -Body $JsonBody<br>      &quot;Completed publishing data to the google sheet&quot;<br>  } catch {<br>    Write-Error $_.Exception<br>    exit 1<br>  }<br>}<br><br>&lt;#<br>    .SYNOPSIS<br>        Function to remove the CSV file.<br>    .DESCRIPTION<br>        Remove-CSV function removes the CSV file.<br>#&gt;<br>function Remove-CSV($FilePath) {<br>  if (Test-Path $FilePath) {<br>      # Delete the file<br>      Remove-Item -Path $FilePath -Force<br>      Write-Host &quot;CSV file $FilePath has been deleted.&quot;<br>  } else {<br>      Write-Host &quot;The CSV file $FilePath does not exist.&quot;<br>      exit 1<br>  }<br>}<br><br>Execute-LAQuery ($KustoQuery) $OutputFilePath<br>Update-Sheet &quot;Logs!A2:E&quot; (Build-JsonBody)<br>Remove-CSV $OutputFilePath</pre><p><strong>Happy Programming!!!</strong></p><p>References</p><ul><li><a href="https://learn.microsoft.com/en-us/azure/automation/automation-hybrid-runbook-worker">Azure Automation Hybrid Runbook Worker overview</a></li><li><a href="https://learn.microsoft.com/en-us/azure/automation/overview">Azure Automation overview</a></li><li><a href="https://developers.google.com/apis-explorer">Google APIs Explorer | Google for Developers</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1768c7c3722e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Connect Looker Studio with Azure — Part I]]></title>
            <link>https://medium.com/@ayeshajayasankha/connect-looker-studio-with-azure-f7ca5ce0b025?source=rss-9232870cc5be------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7ca5ce0b025</guid>
            <category><![CDATA[looker-studio]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[google-sheets]]></category>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Ayesha Jayasankha]]></dc:creator>
            <pubDate>Sat, 16 Dec 2023 11:52:59 GMT</pubDate>
            <atom:updated>2023-12-16T17:05:43.070Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eDRLS9PM7ezSq9gY-WVSKA.jpeg" /></figure><h3>What is a Looker dashboard</h3><p>Looker is a data analytic platform that allows you to create and manage dashboards and reports interactively with other organization members. Loker provides the capability to manage both real time and non real time dashboard. That allows users to take data driven decisions based on the performances or trends.</p><p>A Looker dashboard is a visual representation of data, presenting key metrics and insights in a clear and accessible manner. Those dashboards can be shared between users and multiple users can collaboratively work on the dashboard at the same time.</p><h3>How to create a looker dashboard</h3><p>To create a new dashboard in looker, you need to login to your looker studio. You can use the link below to sign in to the looker.</p><p><a href="https://lookerstudio.google.com/">https://lookerstudio.google.com/</a></p><p>After login to the looker space, click the create icon in the left top corner. There you can choose the type you want to create. It can be a “Report”, “Data source” or “Explorar”. In there click the “Report” section to create a new report.</p><p>Then it will automatically prompt you to link your data to the report that you created. In there you can link google analytics, looker data sources, local CSV files, google sheets etc. Click google sheet and it will show all the google sheets that you have the read access or a higher permission. Then click on the required spreadsheet and choose the worksheet that you want to connect.</p><p>Go to the google sheet and create a fresh google sheet to connect with the looker dashboard that you created.</p><h3>Link Looker dashboard with google sheet</h3><p>Then click on the Add data button to add the data source to the google sheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vY8GNBOPnRgIZFeF" /></figure><p>After you click on the Add data button it will allow you to add data using google connectors or your data sources. Go to the Google connectors and select google sheet and it will show the available google sheets to link with your dashboard.</p><h3>Fetch data from Azure Log Analytics Workspace</h3><p>To fetch data from Azure Log Analytics (LA) using Google Apps Script, you can make use of the HTTP service in Google Apps Script to send HTTP requests to the Azure Log Analytics API. For this one you need to Azure AD application to authenticate with Azure and that AD application should have the log reader permission on the Azure Log Analytics workspace.</p><p>You can use the following code section to fetch the data using Azure Log Analytics workspace.</p><pre>function updateSheetWithData() {<br>  // Set the API endpoint URL<br>  var apiUrl = &quot;https://login.microsoftonline.com/&lt;tenant ID&gt;/oauth2/token&quot;;<br>  // Set the request payload<br>  var payload = {<br>    &quot;grant_type&quot;: &quot;client_credentials&quot;,<br>    &quot;client_id&quot;: &quot;&lt;Client ID&gt;&quot;,<br>    &quot;client_secret&quot;: &quot;&lt;Client Secret&gt;&quot;,<br>    &quot;resource&quot;: &quot;https://api.loganalytics.io&quot;<br>  };<br><br>  // Set the headers for the API request<br>  var headers = {<br>  &quot;Content-Type&quot;: &quot;application/x-www-form-urlencoded&quot;<br>  };<br>  var urlEncodedPayload = Object.keys(payload)<br>  .map(key =&gt; encodeURIComponent(key) + &quot;=&quot; + encodeURIComponent(payload[key]))<br>  .join(&quot;&amp;&quot;);<br><br>  // Make the API request with headers and payload<br>  var options = {<br>    &quot;method&quot;: &quot;POST&quot;,<br>    &quot;headers&quot;: headers,<br>    &quot;payload&quot;: urlEncodedPayload<br>  };<br>  var response = UrlFetchApp.fetch(apiUrl, options);<br>  var data = JSON.parse(response.getContentText());<br>  var accessToken = data.access_token;<br>  var accessToken = data.access_token;<br>  var encodedQuery = &quot;Base 64 encoded query&quot;;<br>  <br>  var headers = {<br>    &quot;Authorization&quot;: &quot;Bearer &quot; + access_token<br>  };<br>  <br>  UpdateSheet(encodedQuery, accessToken, &quot;Organization&quot;, &quot;Event&quot;, &quot;customer-details&quot;, &quot;US&quot;)<br>}<br><br>function UpdateSheet(encodedQuery, access_token, appCount, event, sheetName, region) {<br>  var headers = {<br>    &quot;Authorization&quot;: &quot;Bearer &quot; + access_token<br>  };<br>  <br>  // Make the API request with headers<br>  var options = {<br>  &quot;method&quot;: &quot;GET&quot;,<br>  &quot;headers&quot;: headers<br>  };<br>  <br>  var apiUrl = &quot;https://api.loganalytics.io/v1/workspaces/&lt;Workspace ID&gt;/query?query=&quot;+encodedQuery;<br>  var response = UrlFetchApp.fetch(apiUrl, options);<br>  var data = JSON.parse(response.getContentText());<br>  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName);<br>  var lastRow = sheet.getLastRow();<br>  sheet.clear();<br>  var values = [[&quot;Date&quot;, appCount, event, &quot;Region&quot;]];<br>  var rows = data.tables[0].rows;<br>  rows = values.concat(rows);<br>  var startCell = sheet.getRange(&quot;A1:C31&quot;); // Modify the cell as per your requirement<br>  <br>  for (var i = 0; i &lt; rows.length; i++) {<br>  var rowData = rows[i];<br>  // Check if the 3rd column is empty<br>  if (rowData[3] == null) {<br>    rowData[3] = region;<br>    }<br>    // Define the target range for each row<br>    var targetRange = startCell.offset(i, 0, 1, rowData.length);<br>    // Set the values of the target range with the API data<br>    targetRange.setValues([rowData]);<br>  }<br>}<br><br>updateSheetWithData</pre><h3>Fetch data from Azure Application Insights</h3><p>To fetch data from Azure Application Insights using Google Apps Script, you can use a similar approach by making HTTP requests to the Application Insights API. You can use the AD application to authenticate and get the required data using Azure application insights.</p><p>Following is a example</p><pre>function updateSheetWithInsights() {<br>  // Set the API endpoint URL<br>  var apiUrl = &quot;https://login.microsoftonline.com/&lt;Tenant ID&gt;/oauth2/token&quot;;<br>  // Set the request payload<br>  var payload = {<br>    &quot;grant_type&quot;: &quot;client_credentials&quot;,<br>    &quot;client_id&quot;: &quot;Client ID&quot;,<br>    &quot;client_secret&quot;: &quot;Client Secret&quot;,<br>    &quot;resource&quot;: &quot;https://api.applicationinsights.io/&quot;<br>  };<br><br>  // Set the headers for the API request<br>  var headers = {<br>    &quot;Content-Type&quot;: &quot;application/x-www-form-urlencoded&quot;<br>  };<br><br>  var urlEncodedPayload = Object.keys(payload)<br>  .map(key =&gt; encodeURIComponent(key) + &quot;=&quot; + encodeURIComponent(payload[key]))<br>  .join(&quot;&amp;&quot;);<br><br>  // Make the API request with headers and payload<br>  var options = {<br>    &quot;method&quot;: &quot;POST&quot;,<br>    &quot;headers&quot;: headers,<br>    &quot;payload&quot;: urlEncodedPayload<br>  };<br><br>  var response = UrlFetchApp.fetch(apiUrl, options);<br>  var data = JSON.parse(response.getContentText());<br>  var accessToken = data.access_token;<br>  var kqlQuery = `KustoQuery let lastActivity = customEvents`;<br><br>  UpdateInsightsSheet(kqlQuery, accessToken, &quot;app-insights&quot;)<br>}<br><br>function UpdateInsightsSheet(kqlQuery, access_token, sheetName) {<br>  var headers = {<br>    &quot;Authorization&quot;: &quot;Bearer &quot; + access_token<br>  };<br>  var payload = {<br>    &#39;query&#39;: kqlQuery,<br>  };<br>  var options = {<br>    &#39;method&#39;: &#39;POST&#39;,<br>    &#39;headers&#39;: headers,<br>    &#39;payload&#39;: JSON.stringify(payload),<br>    &#39;contentType&#39;: &#39;application/json&#39;,<br>    &#39;muteHttpExceptions&#39;: true<br>  };<br>  var apiUrl = &quot;https://api.applicationinsights.io/v1/apps/&lt;App insights ID&gt;/query&quot;;<br>  var response = UrlFetchApp.fetch(apiUrl, options);<br>  var data = JSON.parse(response.getContentText());<br>  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName);<br>  sheet.clear();<br>  if (data &amp;&amp; data.tables &amp;&amp; data.tables.length &gt; 0 &amp;&amp; data.tables[0].rows.length &gt; 0) {<br>    var rows = data.tables[0].rows;<br>    // Define the values to be set in the sheet<br>    var values = [[&quot;Organization&quot;, &quot;Count&quot;, &quot;Last_Activity_TimeStamp&quot;, &quot;Last_Activity_Country&quot;, &quot;Activity&quot;]].concat(rows);<br>    // Set the values in the sheet starting from the first cell (A1)<br>    sheet.getRange(1, 1, values.length, values[0].length).setValues(values);<br>  }<br>}<br><br>updateSheetWithInsights</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7ca5ce0b025" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Private Links]]></title>
            <link>https://medium.com/@ayeshajayasankha/azure-private-links-d591dd7b8e32?source=rss-9232870cc5be------2</link>
            <guid isPermaLink="false">https://medium.com/p/d591dd7b8e32</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[private-endpoint]]></category>
            <category><![CDATA[azure-private-link]]></category>
            <dc:creator><![CDATA[Ayesha Jayasankha]]></dc:creator>
            <pubDate>Sun, 07 May 2023 14:17:48 GMT</pubDate>
            <atom:updated>2023-05-07T14:17:48.226Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*1dxahRqTkEML4Ysvo8bbbw.jpeg" /></figure><p><strong>What are private links</strong></p><p>When we define a private link, we can say private links are URLs that can be accessible for specific resources. We can use private links to share secure information without exposing it to the public internet. If you are using azure private links traffic will travel through the azure backbone.If you are Also we can connect azure resources with on-prem resources or AWS resources using ExpressRoute private peering, VPN tunnels, and peered virtual networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*90XDVAQ89e5hfO7IJHxMNw.png" /><figcaption>Image 1 — Connect</figcaption></figure><p>What is the main two parts of a private link</p><ol><li>Private link service</li><li>private link endpoint</li></ol><p><strong>Azure private link service</strong></p><p>It is a feature which is provided by Microsoft Azure to allow you to connect your own PaSS services using a private endpoint. From there you can connect either a private or public endpoint ip address to your protected resource.</p><p><strong>Azure private endpoint</strong></p><p>It is an interface that can be used to connect your virtual network to a protected resource like sql server, storage account etc. We can use private endpoints to connect with both public IP addresses and private IP addresses. It allows us to make a secure connection through the virtual networks without being exposed to the public internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*wM3hqybt-cZJHvVWzvbuKw.png" /><figcaption>Image 2 — Connect with private links</figcaption></figure><p><strong>Main benefits of private links</strong></p><ol><li>Ensure the security</li></ol><p>As private links allows you to connect through virtual networks without exposing to public internet it allows users to add additional security controls such as network policies, firewall rules etc.</p><p>2. Performance improvements</p><p>Since we have connections over private networks it can provide faster and consistent connection compared to the public internet.</p><p>3. Simplify the network architecture</p><p>We can reduce the networking cost and simplify the network architecture as there is no need for public IP addresses.</p><p>4. Custom Services</p><p>It allows users to create private endpoints for their own custom services hosted on premise.</p><p>References</p><ul><li><a href="https://learn.microsoft.com/en-us/azure/private-link/private-link-overview">https://learn.microsoft.com/en-us/azure/private-link/private-link-overview</a></li><li><a href="https://azure.microsoft.com/en-us/products/private-link/">https://azure.microsoft.com/en-us/products/private-link/</a></li><li>Image — <a href="https://cdn-dynmedia-1.microsoft.com/is/image/microsoftcorp/private-link_diagram?resMode=sharp2&amp;op_usm=1.5,0.65,15,0&amp;wid=1686&amp;qlt=100&amp;fmt=png-alpha&amp;fit=constrain">https://cdn-dynmedia-1.microsoft.com/is/image/microsoftcorp/private-link_diagram?resMode=sharp2&amp;op_usm=1.5,0.65,15,0&amp;wid=1686&amp;qlt=100&amp;fmt=png-alpha&amp;fit=constrain</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d591dd7b8e32" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy Magento 2 in Amazon EC2]]></title>
            <link>https://medium.com/@ayeshajayasankha/deploy-magento-2-in-amazone-ec2-a7c3981326c?source=rss-9232870cc5be------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7c3981326c</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[magento-2]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[mysql]]></category>
            <dc:creator><![CDATA[Ayesha Jayasankha]]></dc:creator>
            <pubDate>Thu, 14 Jul 2022 03:49:41 GMT</pubDate>
            <atom:updated>2022-07-22T04:13:24.959Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*-PF1IPR-apwLBQwzQsdAbg.jpeg" /></figure><p><strong>What is magento 2</strong></p><p>Magento 2 is an open source E-commerce platform. It allows you to create and customize your own e-store and carry out activities on that.</p><p><strong>What are the prerequisites to install magento 2</strong></p><ul><li>Nginx server</li><li>Apache server</li><li>Php (7.0 /7.1 /7.2 /7.3)</li><li>Composer</li><li>Mysql 5.7</li></ul><p>In this article I am explaining how we can install magento 2 on Amazon EC2. For that you need an account in AWS. you can create an account using <a href="https://aws.amazon.com/console/">https://aws.amazon.com/console/</a>. In amazon we don’t have apt or apt-get support. Therefore we can use yum as an alternative.</p><p>Install httpd in the amazon EC2 using yum</p><pre>sudo yum install httpd</pre><pre>sudo systemctl start httpd</pre><p>You can run systemctl status httpd</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/0*8wKiV-vVPEkj0s1f" /><figcaption>img 1 — http server status</figcaption></figure><p>Install php 7.2 using</p><pre>sudo amazon-linux-extras | grep php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/0*dC38orQtLb5QOjPi" /><figcaption>img 2 — available php servers</figcaption></figure><p>If php 7.2 is showing enable that otherwise,</p><pre>sudo yum clean metadata</pre><pre>sudo yum install php72 php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap}</pre><p>Verify the install php version using php -v</p><p><strong>Install composer</strong></p><p>You can use the following commands to install composer on EC2.</p><pre>sudo curl -sS https://getcomposer.org/installer | sudo php<br>sudo mv composer.phar /usr/local/bin/composer<br>sudo ln -s /usr/local/bin/composer /usr/bin/composer</pre><p><strong>Start mysql 5.7 server</strong></p><p>You can install mysql in your EC2 or you can use an externally hosted mysql server to connect with magento 2. You need to install or use the mysql 5.7 version. If you plan to use an external mysql server you can use RDS which is provided by amazon for that.</p><p><strong>Install magento 2</strong></p><p>Download magento tar from <a href="https://magento.com/tech-resources/download">https://magento.com/tech-resources/download</a></p><pre>cd /var/www/html</pre><pre>sudo mkdir magento</pre><pre>sudo tar -zxvf ~/Downloads/&lt;file name&gt; -C ./magento</pre><pre>cd magento</pre><pre>sudo composer install</pre><pre>sudo chmod -R 755 /var/www/html/magento</pre><p><strong>Configuration files</strong></p><p><strong>Nginx conf file</strong></p><p>Create magento.conf file in the /etc/nginx/conf.d and add the following file to there. For that you need to enter your generated certificate and keys to the /etc/nginx/ssl/ path.</p><pre>upstream fastcgi_backend {</pre><pre>server unix:/run/php-fpm/magento.sock;</pre><pre>}</pre><pre>server {</pre><pre>proxy_busy_buffers_size 512k;</pre><pre>proxy_buffers 4 512k;</pre><pre>proxy_buffer_size 256k;</pre><pre>fastcgi_buffers 16 32k;</pre><pre>fastcgi_buffer_size 64k;</pre><pre>fastcgi_busy_buffers_size 64k;</pre><pre>listen 443 ssl;</pre><pre>server_name &lt;your dns name&gt;(ex: magento.test.com);</pre><pre>ssl_certificate /etc/nginx/ssl/&lt;cert pem file&gt;;</pre><pre>ssl_certificate_key /etc/nginx/ssl/&lt;private key pem file&gt;;</pre><pre>set $MAGE_ROOT /var/www/html/magento;</pre><pre>set $MAGE_MODE developer; # or production</pre><pre>access_log /var/log/nginx/magento.com-access.log;</pre><pre>error_log /var/log/nginx/magento.com-error.log;</pre><pre>include /var/www/html/magento/nginx.conf.sample;</pre><pre>}</pre><p>Create a new user with a user name with magento and assign it to the nginx user group. And change the ownership of the directory to the new user.</p><pre>sudo chown -R magento /var/www/html/magento</pre><p><strong>php-pfm conf file</strong></p><p>Create a magento.conf file in the /etc/php-fpm.d/ directory.</p><pre>[magento]</pre><pre>user = magento</pre><pre>group = nginx</pre><pre>listen.owner = magento</pre><pre>listen.group = nginx</pre><pre>listen = /run/php-fpm/magento.sock</pre><pre>pm = ondemand</pre><pre>pm.max_children = 50</pre><pre>pm.process_idle_timeout = 10s</pre><pre>pm.max_requests = 500</pre><p>Then restart the php-fpm server using systemctl restart php-fpm.service</p><p>Restart the nginx service using systemctl restart nginx</p><p>Install the magento 2 using</p><pre>cd &lt;magento home&gt;</pre><pre>bin/magento setup:install</pre><pre>bin/magento sampledata:deploy</pre><pre>bin/magento setup:upgrade</pre><p>If it is asking for authentication,</p><p>Login to <a href="https://www.magentocommerce.com/magento-connect/customer/account/login/">https://www.magentocommerce.com/magento-connect/customer/account/login/</a></p><p>Go to developers-&gt;Secure keys and generate new key or use existing key. You can use public key as Username and Private key as Password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*te1Ehh6WldtCPtoOq9rTlw.png" /><figcaption>img 3 — magento 2 access keys</figcaption></figure><p><strong>Create a new user for magento</strong></p><p>Execute the following command in the command line to create a new admin user.</p><pre>bin/magento admin:user:create</pre><p>It will prompt you to enter username, password, email, first and last name.</p><p>After that you can use your own host entry (ex: magento.example.com) to connect to your magento store.</p><p><strong>External references</strong></p><ul><li><a href="https://aws.amazon.com/console/">Manage AWS Resources - AWS Management Console - AWS</a></li><li><a href="https://devdocs.magento.com/">Adobe Commerce Developer Guide</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7c3981326c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Trying out Rancher desktop with MAC]]></title>
            <link>https://medium.com/@ayeshajayasankha/trying-out-rancher-desktop-with-mac-d478ef87c576?source=rss-9232870cc5be------2</link>
            <guid isPermaLink="false">https://medium.com/p/d478ef87c576</guid>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Ayesha Jayasankha]]></dc:creator>
            <pubDate>Mon, 07 Feb 2022 16:39:48 GMT</pubDate>
            <atom:updated>2022-02-07T16:39:48.382Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*PPU69OdmJRZTU6-TRgYgZQ.png" /></figure><h4><strong>What is rancher desktop?</strong></h4><p>Rancher desktop is an open source program that provides Kubernetes and container management. Since Docker desktop cannot be used without licensing for commercial purposes with following conditions,</p><blockquote>More than 250 employee count or more than $10M USD in annual revenue</blockquote><p>Therefore Rancher desktop can be a good replacement solution for you. Here I will explain how to install Rancher desktop in your MAC.</p><h4><strong>Install Rancher desktop</strong></h4><p>To download Rancher desktop you can go to the <a href="https://github.com/rancher-sandbox/rancher-desktop/releases/">https://github.com/rancher-sandbox/rancher-desktop/releases/</a> and find the latest version from there. Go the assets section in the releases and download the relevant version from it. For MAC M1 chips it will be aarch64.dmg</p><p>Then it will automatically start the downloading the file. After finishing the downloading process you can open the dmg file and it will install application in to the local machine.</p><p>Here I will show a common problem that occur after the installation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*piQgQb98YMUkyPYGhLfINw.png" /><figcaption>Fig 1 : Permission denied error</figcaption></figure><p>There will be a prompt to ask for the permission and you need to provide your password to grant the access. If issue is not resolved you can check whether /usr/local/bin is existing in your local machine. If not you can create with mkdir /usr/local/bin</p><p>If it exist but still showing the error , you can use the following command to grant the access. sudo chown $USER /usr/local/bin</p><p>Then open you terminal and you can run kubectl get nodes command to verify that the rancher desktop is running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*XIOXm89x4n9bXCEEUex-zA.png" /><figcaption>Fig 2 : Rancher desktop node</figcaption></figure><p>You can download images through the rancher desktop interface. Go to the images section and click the + button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*88xD457_uSE3y1DX4cMN2w.png" /><figcaption>Fig 3 : Add new image to pull</figcaption></figure><p>Then you can type an image and click pull. It will start pulling the image to your local machine. Here I will use nginx image for pulling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wrohEJ4-bUgcdAywE2g6g.png" /><figcaption>Fig 4 : Pulling the new image</figcaption></figure><p>Next you can execute kubectl create deployment nginx-depl — image=nginx to deploy the nginx image that you pulled in the earlier stage.</p><p>After you executed the earlier step, run kubectl get pods command to verify that the nginx pod is up and running.</p><p>Reference:</p><ul><li><a href="https://rancherdesktop.io/">Rancher Desktop by SUSE</a></li><li><a href="https://github.com/rancher-sandbox/rancher-desktop">GitHub - rancher-sandbox/rancher-desktop: Kubernetes and container management to the desktop</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d478ef87c576" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>