<?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 Hildred Adebayo on Medium]]></title>
        <description><![CDATA[Stories by Hildred Adebayo on Medium]]></description>
        <link>https://medium.com/@hildredadebayo?source=rss-acaf32a49dac------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MvuPuBu9YGlmuFUPF_MipQ.jpeg</url>
            <title>Stories by Hildred Adebayo on Medium</title>
            <link>https://medium.com/@hildredadebayo?source=rss-acaf32a49dac------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 15:39:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hildredadebayo/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[Exposing Multi-Namespace Apps via Istio Gateway]]></title>
            <link>https://medium.com/@hildredadebayo/exposing-multi-namespace-apps-via-istio-gateway-e5d92c9808d2?source=rss-acaf32a49dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5d92c9808d2</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[service-mesh]]></category>
            <category><![CDATA[istio]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Hildred Adebayo]]></dc:creator>
            <pubDate>Mon, 27 Oct 2025 12:53:20 GMT</pubDate>
            <atom:updated>2025-10-27T13:05:42.738Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IzWwUIvoKGdk7dRJZlEcKA.png" /><figcaption>Source: <a href="https://blog.container-solutions.com/solving-2-common-deployment-dilemmas-in-istio">https://blog.container-solutions.com/solving-2-common-deployment-dilemmas-in-istio</a></figcaption></figure><p>Ever wondered how Istio can be used to manage traffic for applications across different namespaces? Let’s explore that together while adapting an existing DevOps Lab project to use Istio.</p><p>Before we dive in, credit goes to Zudonu Osomudeya, whose excellent <a href="https://medium.com/@osomudeyazudonu/the-0-devops-home-lab-that-finally-made-me-job-ready-no-cloud-bills-no-headaches-51121ec2c986">DevOps Lab Project</a> formed the foundation of this work. This demo builds upon his setup, with the modification of exposing application and monitoring stacks via Istio.</p><h3>Understanding Istio</h3><p>Think of <strong>Istio</strong> as an orchestrator for proxies — just like Kubernetes orchestrates containers.<br>At its core, Istio uses <strong>Envoy</strong>, the most widely adopted proxy in the Kubernetes ecosystem, to manage and secure service-to-service communication.</p><h4>Components of Istio</h4><ol><li><strong>Data Plane:</strong> Handles traffic between microservices — similar to Kubernetes worker nodes.</li><li><strong>Control Plane (Istiod):</strong> Configures and manages the data plane — similar to Kubernetes master components.</li></ol><h4>Benefits of Istio</h4><ol><li>Traffic management</li><li>Reduced operational overhead</li><li>Security and mTLS support</li><li>Reliability through retries, circuit breakers, and failovers</li><li>Observability with metrics, traces, and logs</li><li>Policy enforcement for granular control</li></ol><p>For this tutorial, we’ll be running locally on a <strong>k3d cluster</strong> — a lightweight wrapper around k3s that allows you to run Kubernetes clusters inside Docker easily (the cluster setup is outside the scope of this tutorial).</p><p>In our <strong>k3d cluster</strong>, we’ll be working with <strong>two namespaces</strong>:</p><ol><li>humor-game: contains the deployed application stack</li><li>monitoring: contains the monitoring tools (Prometheus and Grafana)</li></ol><p>To verify the applications in the application namespace, run:</p><pre>kubectl get pods -n humor-game<br><br>#Output<br>NAME                        READY   STATUS<br>backend-968c9d597-fp757     1/1     Running<br>frontend-7c498db554-ldjhn   1/1     Running<br>postgres-5f689b589c-jcdn5   1/1     Running<br>redis-669555bdfb-v4ctq      1/1     Running</pre><pre>kubectl get svc -n humor-game<br><br>#Output<br>NAME       TYPE        CLUSTER-IP      PORT(S)<br>backend    ClusterIP   10.43.84.21     3001/TCP<br>frontend   ClusterIP   10.43.237.33    80/TCP<br>postgres   ClusterIP   10.43.203.35    5432/TCP<br>redis      ClusterIP   10.43.200.89    6379/TCP</pre><p>To verify the applications in the monitoring namespace, run:</p><pre>kubectl get pods -n monitoring<br><br>#Output<br>NAME                          READY   STATUS<br>grafana-6c4bcbdbdd-gksbb      1/1     Running<br>prometheus-865799fd76-nhmgt   1/1     Running</pre><h4>Our Goal</h4><p>We’ll expose <strong>both the application stack (in humor-game)</strong> and <strong>the monitoring stack (in monitoring)</strong> under the same domain: gameapp.local</p><p>This means:</p><p>https://gameapp.local → Application frontend</p><p>https://grafana.gameapp.local → Grafana dashboard</p><p>https://prometheus.gameapp.local → Prometheus metrics</p><p>Let’s get started.</p><h4>Step 1: Install Istio</h4><p>First, install the Istio CLI and deploy the demo profile:</p><pre>#Download Istio binary<br>curl -L https://istio.io/downloadIstio | sh -<br>#Add istio path to current terminal session <br>export PATH=$PATH:$HOME/.istioctl/bin<br>#Verify istio version<br>istioctl version --remote=false<br>#Deploy Istio components into your Kubernetes cluster<br>istioctl install --set profile=demo -y</pre><p>Confirm Istio pods are running:</p><pre>kubectl get pods -n istio-system<br><br>#Output<br>istio-egressgateway-69999bf7c9-wnjc9   1/1   Running<br>istio-ingressgateway-6bc9f458-7gpxd    1/1   Running<br>istiod-74b74bdf56-97f76                1/1   Running</pre><p>Next, enable sidecar injection in your app namespace:</p><pre>kubectl label namespace humor-game istio-injection=enabled</pre><p>Restart application deployments to update istio sidecar injection:</p><pre>kubectl rollout restart deployment -n humor-game --all<br><br>#Confirm sidecar injection<br>kubectl get pods -n humor-game<br><br>#Output<br>NAME                        READY   STATUS<br>backend-968c9d597-fp757     2/2     Running<br>frontend-7c498db554-ldjhn   2/2     Running<br>postgres-5f689b589c-jcdn5   2/2     Running<br>redis-669555bdfb-v4ctq      2/2     Running</pre><p>Notice now the number of pods running per service is two? The second pod is the istio sidecar ready to proxy traffic into your application</p><h4>Step 2: Create a Local TLS Certificate</h4><p>Since we’re working locally, we’ll generate a <strong>self-signed TLS certificate</strong> and store it as a Kubernetes secret.</p><blockquote>Note: (In production, certificates are usually issued by trusted authorities like DigiCert and managed via AWS Certificate Manager or similar services.)</blockquote><pre>mkdir certs &amp;&amp; cd certs<br><br>openssl req -x509 -newkey rsa:2048 \<br>  -keyout gameapp.key \<br>  -out gameapp.crt \<br>  -days 365 \<br>  -nodes \<br>  -subj &quot;/CN=gameapp.local/O=humor-game&quot;</pre><p>Update your /etc/hosts file to map the local domain:</p><pre>echo &#39;127.0.0.1   gameapp.local grafana.gameapp.local prometheus.gameapp.local&#39; | sudo tee -a /etc/hosts &gt; /dev/null</pre><p>Then, create the secret in the Istio namespace:</p><pre>kubectl create -n istio-system secret tls gameapp-certificate \<br>--key=gameapp.key --cert=gameapp.crt</pre><p>Check that it was created successfully:</p><pre>kubectl get secrets -n istio-system<br><br>#Output<br>NAME                  TYPE                DATA<br>gameapp-certificate   kubernetes.io/tls   2<br>istio-ca-secret       istio.io/ca-root    5</pre><blockquote><strong>Caveat:</strong></blockquote><blockquote>When you visit https://gameapp.local (or any of its subdomains) in your browser, you’ll likely see a “Not secure” warning you’ll have to bypass on the browser— even though the URL begins with <strong>https://</strong> and a TLS certificate is in use.<br>This happens because the certificate is <strong>self-signed</strong>, meaning it wasn’t issued by a trusted certificate authority. In production setups, certificates from providers like DigiCert are used specifically to avoid this.</blockquote><h4>Step 3: Create the Gateway and VirtualServices</h4><p>To route traffic through Istio, we’ll need:</p><ol><li>A <strong>Gateway</strong> — acts as the entry point into the mesh (think of it as Istio’s equivalent of a Kubernetes Ingress).</li><li>Two <strong>VirtualServices</strong> — one for the app stack and one for the monitoring stack.</li></ol><p><strong><em>App Virtual Service</em></strong></p><pre>apiVersion: networking.istio.io/v1beta1<br>kind: VirtualService<br>metadata:<br>  name: humor-game-vs<br>  namespace: humor-game<br>spec:<br>  hosts:<br>    - &quot;gameapp.local&quot;<br>  gateways:<br>    - humor-game-gateway<br>  http:<br>    - route:<br>        - destination:<br>            host: frontend.humor-game.svc.cluster.local<br>            port:<br>              number: 80</pre><p><strong><em>Monitoring Virtual Services</em></strong></p><pre>apiVersion: networking.istio.io/v1beta1<br>kind: VirtualService<br>metadata:<br>  name: prometheus-vs<br>  namespace: monitoring<br>spec:<br>  hosts:<br>    - &quot;prometheus.gameapp.local&quot;<br>  gateways:<br>    - humor-game/humor-game-gateway  # cross-namespace reference<br>  http:<br>    - route:<br>        - destination:<br>            host: prometheus.monitoring.svc.cluster.local<br>            port:<br>              number: 9090<br><br>---<br>apiVersion: networking.istio.io/v1beta1<br>kind: VirtualService<br>metadata:<br>  name: grafana-vs<br>  namespace: monitoring<br>spec:<br>  hosts:<br>    - &quot;grafana.gameapp.local&quot;<br>  gateways:<br>    - humor-game/humor-game-gateway  # cross-namespace reference<br>  http:<br>    - route:<br>        - destination:<br>            host: grafana.monitoring.svc.cluster.local<br>            port:<br>              number: 3000</pre><blockquote>Note: The cross-namespace reference line is key — it allows services in the monitoring namespace to use a gateway defined in another namespace.</blockquote><blockquote><strong>Bonus Tip:</strong><br>Another way to achieve cross-namespace exposure is by using Istio’s<strong> “delegates” </strong>feature, which allows you to split and manage routing configurations across namespaces in a more modular way.</blockquote><p><strong><em>Gateway Definition</em></strong></p><p>Finally, let’s define the <strong>Gateway</strong> that ties it all together:</p><pre>apiVersion: networking.istio.io/v1beta1<br>kind: Gateway<br>metadata:<br>  name: humor-game-gateway<br>  namespace: humor-game<br>spec:<br>  selector:<br>    istio: ingressgateway<br>  servers:<br>    - port:<br>        number: 443<br>        name: https-app<br>        protocol: HTTPS<br>      hosts:<br>        - &quot;gameapp.local&quot;<br>      tls:<br>        mode: SIMPLE<br>        credentialName: gameapp-certificate<br><br>    - port:<br>        number: 443<br>        name: https-monitoring<br>        protocol: HTTPS<br>      hosts:<br>        - &quot;grafana.gameapp.local&quot;<br>        - &quot;prometheus.gameapp.local&quot;<br>      tls:<br>        mode: SIMPLE<br>        credentialName: gameapp-certificate</pre><h3>And That’s It!</h3><p>At this point, all traffic to your local domain (gameapp.local) passes through <strong>Istio’s ingress gateway</strong>, which securely routes requests to your app and monitoring stacks — even though they live in <strong>different namespaces</strong>.</p><p>When you visit:</p><blockquote>https://gameapp.local</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6hiGftHEGP70FV3uBsnNeA.png" /></figure><blockquote>https://prometheus.gameapp.local</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u1th_mJwbsJIRTFZRA2aRw.png" /></figure><blockquote><a href="https://grafana.gameapp.local/">https://grafana.gameapp.local</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3yCRaIeni4VVAF46D5Iupw.png" /></figure><p>The fact that you followed along, experimented, and understood how Istio orchestrates secure, cross-namespace traffic means you’ve deepened your grasp of service mesh fundamentals. Keep tweaking, breaking, and rebuilding — that’s how mastery is born 🚀🚀</p><p><strong>Let’s connect on </strong><a href="http://www.linkedin.com/in/oluwatobiloba-adebayo"><strong>LinkedIn</strong></a><strong> </strong>🤝</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5d92c9808d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Elastic File System (EFS) Cross Account Mount]]></title>
            <link>https://awstip.com/elastic-file-system-efs-cross-account-mount-48bf6c4612ef?source=rss-acaf32a49dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/48bf6c4612ef</guid>
            <category><![CDATA[ec2-instance]]></category>
            <category><![CDATA[elastic-file-system]]></category>
            <category><![CDATA[iam-roles]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Hildred Adebayo]]></dc:creator>
            <pubDate>Tue, 16 Jan 2024 19:48:01 GMT</pubDate>
            <atom:updated>2024-01-17T14:37:25.385Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*F68Fvxv2mgCD1q1LmFSNNw.jpeg" /></figure><blockquote>Imagine a scenario where two AWS accounts, Account A and Account B, are collaborating on a project. The EFS itself is created and managed in Account A however Account B hosts a set of EC2 instances that require access to shared files stored in the EFS located in Account A.</blockquote><blockquote>In this article I’ll walk you through the process of mounting an Elastic File System on your EC2 Linux instance in a separate AWS account. Let’s dive in!</blockquote><p>First, a quick overview of EFS.</p><p>Elastic File System (EFS) is a scalable and fully managed file storage service provided by Amazon Web Services (AWS). It is designed to be highly available and durable, making it suitable for a wide range of use cases, such as content storage, data backup, and application development.</p><p><strong>Why use EFS?</strong></p><p>One of the key advantages of EFS is its ability to automatically scale storage capacity based on your usage, eliminating the need for manual intervention in capacity planning. It also provides strong data consistency, durability, and low-latency performance.</p><p>Now, to the practical stuff.</p><p><strong><em>Note: Account A = Account EFS is located, Account B = Account EC2 instance is located</em></strong></p><p><strong>STEP 1</strong></p><p>Establish a VPC Peering Connection between Account A and Account B (To set this up, refer to <a href="https://docs.aws.amazon.com/vpc/latest/peering/working-with-vpc-peering.html"><strong><em>documentation</em></strong></a>)</p><p><strong>STEP 2</strong></p><p>In Account A, we need to create a cross account role that can be assumed by EC2 instances in Account B.</p><p>Head over to the IAM service on the AWS console then, create role</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c7we8cKg8K7CEspcqaKHSA.png" /></figure><p>Select AWS Account then Another AWS Account and fill in the account ID for Account B as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*bM-u3B-H4P8F9vcGto-TwQ.png" /></figure><p>On the next page (Add permissions), attach the following AWS managed Policies:</p><ul><li>AmazonElasticFileSystemsUtils</li><li>AmazonElasticFileSystemClientFullAccess</li></ul><p>Name the role, then create role:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MVU3oBotWUUo9qWSmDRUPA.png" /></figure><p><strong>STEP 3</strong></p><p>Now, head over to Account B, where your EC2 instance is located. In this step, we will be attaching the role created in step one to your instance so it has the permissions to read and write to the file system in Account A.</p><p>Head over to the Policies section of the IAM service, Create Policy in JSON format and paste in the json code below, replacing the placeholder with the ARN of the role created in step 2:</p><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;: &quot;sts:AssumeRole&quot;,<br>      &quot;Resource&quot;: &quot;&lt;ARN of Cross Account Role created in 1 above&gt;&quot;<br>    }<br>  ]<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*qzbTCeSg71gG0BuW53KHrA.png" /></figure><p>On the next page, name it <strong><em>sts-assume-role-for-efs</em> </strong>and create the policy.</p><p>Now, attach this policy to the IAM role attached to the EC2 instance. Still in the IAM section, select the role, add permissions, attach policies, search for the policy we just created then add permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*pIBlLCqzISG1qPwCCcaZhw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k3_PW0smYMvR3ybBFZRM3Q.png" /></figure><p><strong>STEP 4</strong></p><p>In this step, we set up the <strong><em>amazon-efs-utils</em></strong> package we will use to mount the file system on our EC2 instance.</p><p>Within the EC2 instance (you can either SSH into the server or connect using Systems Manager)</p><p>Run the following commands to update the instance and install amazon-efs-utils package:</p><pre>sudo yum -y update <br>sudo yum -y install amazon-efs-utils</pre><p><strong>STEP 5</strong></p><p>In this step, we update the <strong><em>/etc/hosts</em></strong> file on the EC2 instance with your EFS IP and EFS DNS as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*3aOHbvY34mpDKjEuZ1W8Kw.png" /></figure><blockquote>Note: You can get information about the IP and DNS of your file system in the Network tab on the EFS Console Page</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dnMFzm16vMXuEZqn0qXGcQ.png" /></figure><p><strong>STEP 6</strong></p><p>To allow traffic access between the file system in Account A and the EC2 instance in Account B, we need to open up firewalls i.e open security group rules attached to both services.</p><p>In Account A, on the Security group attached to your file system, open up Inbound and Outbound traffic on the NFS port (2049) to the specific subnet CIDR block where your EC2 instance is launched.</p><p>In Account B, on the EC2 Security group, open up Inbound and Outbound traffic on the NFS port (2049) to the IP address attached to your file system.</p><p><strong>STEP 7</strong></p><p>Finally! Your Elastic File System can now be mounted by running this command:</p><pre>sudo mount -t efs &lt;EFS DNS NAME&gt; &lt;MOUNT DIRECTORY&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*fdTOFZVgUAptTpDNjULAKA.png" /></figure><p>By running <strong><em>df -h</em></strong> we see that your file system is mounted in the efs subdirectory of the home user directory.</p><p><strong>I hope this deep dive into mounting your EFS cross-account has been as thrilling for you as it was for me! By now, your fingers should be itching to grab the reins and take control of your own file system masterpiece. So, don’t hold back — dive right in </strong>😉</p><p><strong>Feel free to connect on </strong><a href="http://www.linkedin.com/in/oluwatobiloba-adebayo"><strong>LinkedIn</strong></a><strong> and please leave a clap if you found this article helpful </strong>❤️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48bf6c4612ef" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/elastic-file-system-efs-cross-account-mount-48bf6c4612ef">Elastic File System (EFS) Cross Account Mount</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a Docker Application to Azure App Service with Terraform (Part 2)]]></title>
            <link>https://medium.com/@hildredadebayo/deploying-a-docker-application-to-azure-app-service-with-terraform-part-2-11f68f8b1863?source=rss-acaf32a49dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/11f68f8b1863</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[azure-app-service]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[Hildred Adebayo]]></dc:creator>
            <pubDate>Mon, 06 Feb 2023 22:22:21 GMT</pubDate>
            <atom:updated>2023-02-07T10:31:50.852Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pPGmUYQx6yDyQD425Zp_Vw.png" /></figure><blockquote><strong>In the first part of this article, we containerized a Django portfolio application. Now, it’s time to deploy it to Azure App Service using Terraform.</strong></blockquote><p>Azure App Service is a fully managed platform for building, deploying, and scaling web applications. It provides a range of features and tools for building, deploying, and managing web applications, including support for various programming languages and frameworks, automatic scaling, and integration with other Azure services.</p><p><strong>Prerequisites</strong></p><ul><li>The Docker image of your application pushed to dockerhub</li><li>Azure CLI installed on your machine</li><li>Terraform installed on your machine</li></ul><p><strong>Steps</strong></p><p><em>Note: Before we begin, ensure you are logged into your azure account via CLI using this command:</em></p><pre>az login</pre><ul><li>Create an azure resource group</li><li>Create an azure app service plan</li><li>Create an azure app service running the docker application</li></ul><p>To do this, we will be writing 3 simple Terraform files in a terraform-scripts directory, located in the root folder of the application all with the .tf extension: provider.tf, variables.tf &amp; main.tf.</p><p>To refresh our minds on what the directory structure looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/255/0*BR3fXxcjm1eiHVU8" /></figure><p><strong><em>provider.tf:</em></strong></p><p>A provider in terraform is a plugin that enables interaction with an API. This file tells terraform to set the cloud provider as azure for provisioning all resources. In the required_providers block, the version of the azure provider module to be used has been specified.</p><pre># Use the Azure Resource Manager Provider<br>provider &quot;azurerm&quot; {<br>  features {}<br>}<br><br><br>terraform {<br>  required_providers {<br>    azurerm = {<br>      source  = &quot;hashicorp/azurerm&quot;<br>      version = &quot;2.92.0&quot;<br>    }<br>  }<br>}</pre><p><strong><em>variables.tf:</em></strong></p><p>For readability and easy code management, all variables required for resources to be provisioned and the application to run are defined in this file and referenced in the main.tf file that does the heavy lifting of provisioning.</p><p>We’ll be defining 7 variables:</p><ul><li>A resource group name</li><li>A deployment region</li><li>Docker registry URL</li><li>Docker registry Username</li><li>Docker registry URL Password</li><li>Docker image</li><li>Secret key (its value will however not be declared in the file)</li></ul><pre>variable &quot;rg-name&quot; {<br>  default = &quot;django-portfolio-rg&quot;<br>}<br><br>variable &quot;rg-location&quot; {<br>  default = &quot;northeurope&quot;<br>}<br><br>variable &quot;DOCKER_REGISTRY_SERVER_URL&quot; {<br>  default = &quot;[URL to the docker repository your image is stored]&quot;<br>  sensitive = true<br><br>}<br><br>variable &quot;DOCKER_REGISTRY_SERVER_USERNAME&quot; {<br>  default = &quot;[your docker username]&quot;<br>  sensitive = true<br><br>}<br><br>variable &quot;DOCKER_REGISTRY_SERVER_PASSWORD&quot; {<br>  default = &quot;[your docker password]&quot;<br>  sensitive = true<br><br>}<br><br>variable &quot;DOCKER_IMAGE&quot; {<br>  default = &quot;DOCKER|[your docker image name and tag]&quot;<br>}<br><br>#Pass this variable in the terraform apply command<br>variable &quot;SECRET_KEY&quot; {<br>  sensitive = true<br>}</pre><p><strong><em>main.tf:</em></strong></p><p>This file will be referencing both provider.tf and main.tf. Here, we will be creating a resource group, app service plan and app service.</p><pre># Create a new Resource Group<br>resource &quot;azurerm_resource_group&quot; &quot;group&quot; {<br>  name     = var.rg-name<br>  location = var.rg-location<br>}<br><br># Create an App Service Plan<br>resource &quot;azurerm_app_service_plan&quot; &quot;appserviceplan&quot; {<br>  name                = &quot;${azurerm_resource_group.group.name}-plan&quot;<br>  location            = &quot;${azurerm_resource_group.group.location}&quot;<br>  resource_group_name = &quot;${azurerm_resource_group.group.name}&quot;<br><br>  # Define Linux as Host OS<br>  kind = &quot;Linux&quot;<br>  reserved = true<br><br>  # Choose size<br>  sku {<br>    tier = &quot;Free&quot;<br>    size = &quot;F1&quot;<br>  }<br>}<br><br># Create an Azure Web App Service for Containers in that App Service Plan<br>resource &quot;azurerm_app_service&quot; &quot;django-portfolio-dockerapp&quot; {<br>  name                = &quot;${azurerm_resource_group.group.name}-dockerapp&quot;<br>  location            = &quot;${azurerm_resource_group.group.location}&quot;<br>  resource_group_name = &quot;${azurerm_resource_group.group.name}&quot;<br>  app_service_plan_id = &quot;${azurerm_app_service_plan.appserviceplan.id}&quot;<br><br>app_settings = {<br>    WEBSITES_ENABLE_APP_SERVICE_STORAGE = false<br>    DOCKER_REGISTRY_SERVER_URL = var.DOCKER_REGISTRY_SERVER_URL  <br>    DOCKER_REGISTRY_SERVER_USERNAME = var.DOCKER_REGISTRY_SERVER_USERNAME<br>    DOCKER_REGISTRY_SERVER_PASSWORD = var.DOCKER_REGISTRY_SERVER_PASSWORD<br>    SECRET_KEY= var.SECRET_KEY<br>  }<br><br><br><br>site_config {<br>    linux_fx_version = var.DOCKER_IMAGE<br>    always_on        = &quot;false&quot;<br>    use_32_bit_worker_process = true<br>  }<br><br>identity {<br>    type = &quot;SystemAssigned&quot;<br>  }<br>}</pre><p><em>Note: When working with a Linux host, reserved must be set to true else, you’ll have provisioned a windows OS with a Linux logo.</em></p><p>At this point, we’re set to run the terraform commands:</p><p><strong><em>terraform init:</em></strong><em> initializes a working directory containing Terraform configuration files</em></p><p><strong><em>terraform plan:</em></strong><em> lets you preview the actions Terraform would take to modify your infrastructure</em></p><p><strong><em>terraform apply:</em></strong><em> executes the actions proposed in a terraform plan</em></p><p>Remember there still is no <strong>SECRET_KEY</strong> value in the variables file? It will be passed directly in the <em>terraform plan and apply</em> commands this way, following this sequence:</p><pre>terraform init<br>terraform plan -var SECRET_KEY=&quot;secret_key_string&quot;<br>terraform apply -var SECRET_KEY=&quot;secret_key_string&quot;</pre><p>When these commands have been successfully executed, head over to Resource group on Azure console to confirm all resources have been provisioned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*T2UM2Y4QKuBZr1AF" /></figure><p>Now, let’s take a look at the configuration of the running docker container:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YOI_M6hgtGTtLiiw" /></figure><p>Look familiar? Those are the variables set in the <strong><em>variables.tf, </em></strong>referenced while provisioning the resources in the <strong><em>main.tf</em></strong> file.</p><blockquote>Note: A better way to handle storing variables will be to use the Azure Key vaults service which encrypts values and can be referenced within the runtime environment.</blockquote><p>Now, we can visit the application page with a URL provided by Azure app service:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*e7ErBQJYb3sT7QfW" /></figure><p>When you open up the URL, viola! we have the portfolio application running:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pgdixG0PKkvEfOn-" /></figure><p><strong>Whew! Finally, we have arrived at the of this journey. I hope you enjoyed it as much as I did and learnt a lot. Now, I leave you to get started with Terraform and App service and maybe explore the use of key vault? </strong>😉</p><p><strong>Feel free to connect on </strong><a href="http://www.linkedin.com/in/oluwatobiloba-adebayo"><strong>LinkedIn</strong></a><strong> and please leave a clap if you found this article helpful </strong>❤️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11f68f8b1863" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a Docker Application to Azure App Service with Terraform (Part 1)]]></title>
            <link>https://medium.com/@hildredadebayo/deploying-a-docker-application-to-azure-app-service-with-terraform-part-1-7c304770d32f?source=rss-acaf32a49dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c304770d32f</guid>
            <category><![CDATA[azure-app-service]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Hildred Adebayo]]></dc:creator>
            <pubDate>Mon, 06 Feb 2023 12:41:07 GMT</pubDate>
            <atom:updated>2023-02-07T10:17:47.042Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1KbKDiiB2JZal5qF7mBuqg.png" /></figure><blockquote><strong>Docker + Terraform + Fully managed web hosting service = Magic! In this 2 part article, we will see how to manage dependencies seamlessly, speed up provisioning resources and let the cloud provider do the heavy lifting of managing running our application. Shall we?</strong></blockquote><p>Docker has become a popular tool for developers in recent years, due to its ability to simplify the deployment and management of applications. Docker provides a consistent environment for running applications by managing dependencies required for an application to run, taking away the complexity and extra effort of having to install and manage dependencies which in time past could be hellish for developers.</p><p>When running applications with docker, an image is first created then run in a docker container, exposing the desired port. How does this image get created?</p><p>The essence of this article is to walk you through building a docker image with a Dockerfile and running the application on a fully managed hosting service (the power of cloud computing right?)</p><p>In hosting this application, we will leverage Infrastructure as Code (IaC) with terraform. Terraform is a choice IaC tool because it works with various cloud providers, preventing vendor locking. It is an open source project, comprising numerous modules and cloud specific parameters that allow for seamless integration with any desired cloud provider such as Azure, AWS, GCP.</p><p>Using terraform is also very useful for documentation processes and reduces human errors that could come from manual configurations. The best part is, it is very fast 🚀🚀 in provisioning resources.</p><p>Now that we have a basic introduction to the service and tools we will be working with, let’s begin our Docker-Terraform-Azure journey!</p><p>First, the prerequisites for creating a docker image are:</p><ul><li>Docker installed on your machine</li><li>The application code and any necessary dependencies</li></ul><p>In this tutorial, we will be dockerizing a django application with this directory structure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/1*618M0veuqlr4eUUA9gn18g.png" /></figure><p>Let’s take a look at the dependencies required to run this portfolio application in the requirements.txt file:</p><pre>asgiref==3.4.1<br>certifi==2021.5.30<br>charset-normalizer==2.0.4<br>Django==3.2.6<br>django-crispy-forms==1.12.0<br>django-environ==0.7.0<br>gunicorn==20.1.0<br>idna==3.2<br>pytz==2021.1<br>requests==2.26.0<br>sqlparse==0.4.1<br>urllib3==1.26.6<br>whitenoise==5.3.0<br>pandas</pre><p>To run this application locally, one might go the route of a virtual environment and install all these dependencies locally in the virtual environment and when the need to run the application on another machine arises, repeat this same process. Our goal is to save ourselves that stress and repetition so, we’ll write a Dockerfile in the root folder of the django application to bundle these dependencies.</p><p>Take a look at this Dockerfile:</p><pre>FROM python:3.8<br><br>ENV PYTHONUNBUFFERED 1<br><br>RUN mkdir /app<br><br>WORKDIR /app<br><br>COPY . /app<br><br>RUN pip3 install -r requirements.txt<br><br>ENV RUNTIME_SECRET_KEY $SECRET_KEY<br><br>RUN echo SECRET_KEY=$RUNTIME_SECRET_KEY &gt; portfolio/.env<br><br>EXPOSE 80<br><br>ENTRYPOINT [&quot;python3&quot;, &quot;manage.py&quot;, &quot;runserver&quot;, &quot;0.0.0.0:80&quot;]</pre><p>Explaining this file line by line:</p><ul><li><strong><em>Line 1</em></strong>: It is a django application which means it is written in python (in this case version 3.8) hence, our base image being python:3.8</li><li><strong><em>Line 2</em></strong>: When we run our application, it is very helpful to see the output of our container as it runs. Setting this variable ensures the container output (stdout and stderr) streams are sent straight to the terminal.</li><li><strong><em>Line 3</em></strong>: The <strong>RUN</strong> command tells docker this is a shell command to run directly in the terminal. In this case, create an /app directory where the code in this local directory will be copied to.</li><li><strong><em>Line 4</em></strong>: <strong>WORKDIR</strong> gives itself away. It instructs to change the current directory to the /app directory created in step 3. This means, every line of code coming afterwards is run in the /app directory.</li><li><strong><em>Line 5</em></strong>: This line tells docker to copy all the files in the current working directory to the /app folder (there is a connected .dockerignore file we will come to shortly).</li><li><strong><em>Line 6</em></strong>: Now to the dependencies. This line recursively instals all of the dependencies in the requirements.txt file in the /app directory created in the docker image. Once this is successful, at this point we have bundled up our application with all its required dependencies.</li><li><strong><em>Line 7</em></strong>: Now, this is an interesting part. For a django application to run, it requires a <strong>SECRET_KEY</strong> declared in the settings file of the project. This <strong>SECRET_KEY</strong> is not to be exposed in your image because it is a sensitive credential. To avoid exposing it, the value has been set to be stored in the Application hosting environment (Azure App Service) and referenced in this line using the <strong>ENV</strong> command.</li></ul><blockquote>Here, <strong>SECRET_KEY</strong> is the name with which the value has been stored in Azure App Service and using interpolation, the value of the key is called and stored in our container as a variable called <strong>RUNTIME_SECRET_KEY</strong>. This simply said, the same variable is stored with the name <strong>SECRET_KEY</strong> in Azure App Service and <strong>RUNTIME_SECRET_KEY</strong> in our docker image.</blockquote><ul><li><strong><em>Line 8</em></strong>: Now that we have gotten the secret key value into the docker image, we have to create a .env file where the SECRET_KEY is referenced from in the docker container at runtime. This is why we are echoing the value of the variable and saving into the variable SECRET_KEY declared in the settings file.</li><li><strong><em>Line 9</em></strong>: This application will run on port 80 (the default Azure App Service port) hence, exposing this port.</li><li><strong><em>Line 10</em></strong>: This is the startup command for running a django application. The <strong>ENTRYPOINT</strong> command tells the docker container, run this command to start this application.</li></ul><p>To be able to deploy this docker image to Azure app service, we have to build the application and push it to a dockerhub repository. There are other container registries like Azure container registry and Amazon elastic container registry. However, the tools chosen in this article are all geared towards avoiding being vendor locked which is why we’re using dockerhub.</p><p>Before building this application, remember there was a .dockerignore file mentioned earlier. This file works much like a .gitignore file does. This file tells docker to exclude whatever files are written in it from the image during the build process. In this case, this is useful in excluding the .env file present in the django project directory. This .env file was required in the development process to get the application to start locally but since it’s not intended to be stored in the docker image, it is excluded from the image build using this approach.</p><p>This is the content of the .dockerignore file:</p><pre>portfolio/.env</pre><p>After adding the Dockerfile and .dockerignore file, here’s what the directory structure looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/1*7iquD8Qn2hdVD8AsMVQ33Q.png" /></figure><p>Next, head over to dockerhub to create a repository, naming it whatever resonates with you. The repository name will usually follow this convention:</p><pre>[dockerusername]/[repositoryname]</pre><p>Now to build this application, open a terminal where your application is and in the project root directory where the Dockerfile is stored, run this command:</p><pre>docker build -t [dockerusername]/[repositoryname]:[tagvalue] .</pre><p>If you do not give a tag value, dockerhub will default to the ‘latest’ tag <em>(Note: When building the image, make sure to include the period (.) at the end of the command specifying to copy all files in the current working directory into the docker image)</em>. As the build goes on, the output shows the layers as they are being created in the docker image.</p><blockquote>A step that ideally comes between the build and the push steps is the test step. This step can be done on a local machine however, because we are calling a runtime variable from Azure App Service, this test will be done in the hosting environment (a development slot) because the image is built in a way that fits the app service environment.</blockquote><p>The final step is to push the image to dockerhub. Note that before you push, you must have logged into docker through your command line using the docker login command. This will prompt you to fill in required credentials to connect to your dockerhub account.</p><p>To push the image, run the following command:</p><pre>docker push [dockerusername]/[repositoryname]:[tagvalue]</pre><p>The image is now available to be deployed on app service from dockerhub. In the second part of this article, we will dive into deploying this image and running it in App service, provisioning the required resources with Terraform.</p><p><strong>I hope you’ve learnt a thing or two about Docker, hope to see you at Part 2!</strong></p><p><strong>Feel free to connect on </strong><a href="http://www.linkedin.com/in/oluwatobiloba-adebayo"><strong>LinkedIn</strong></a><strong> and please leave a clap if you found this article helpful </strong>❤️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c304770d32f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AUTOMATION WITH AWS (Systems Manager and S3)]]></title>
            <link>https://awstip.com/automation-with-aws-systems-manager-and-s3-2ec560ac584f?source=rss-acaf32a49dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ec560ac584f</guid>
            <category><![CDATA[shell-script]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-systems-manager]]></category>
            <category><![CDATA[lambda-function]]></category>
            <dc:creator><![CDATA[Hildred Adebayo]]></dc:creator>
            <pubDate>Mon, 19 Dec 2022 17:20:37 GMT</pubDate>
            <atom:updated>2024-12-11T22:09:26.645Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tFl-8wQUENETYLjX5mYWuA.png" /></figure><p><strong><em>Wonder how AWS services are used? Let’s explore the use of some AWS services while completing an automation task together.</em></strong></p><p>We’re going to be looking at something interesting today. You know how services could sometimes stop, leading to either the application itself not running anymore or a component of the entire application being stopped? I don’t know about you but I used to find this pretty annoying when it meant me going into a server to check the status of services before identifying my culprit, then restarting it to get things going again.</p><p><em>The goals for this tutorial are to:</em></p><ol><li>Explore multiple AWS services</li><li>Identify the servers with a stopped service and restart the service with a shell script</li><li>Run the script every hour and export the logs for storage</li><li>Aggregate the logs from a very nested directory structure into a single text file of course for monitoring record keeping purposes and analysis.</li></ol><p>Like it is in DevOps, many roads lead to the market. This could at first look like a traditional cronjob task however, cloud computing has made jobs like this easier.</p><p><strong>Identify the servers with stopped services and restart the service (supervisor)</strong></p><p>This can be done with this shell script:</p><pre>#!/bin/bash<br>DATE=$(date +&quot;%Y-%m-%d_%H:%M&quot;)<br>#Check stopped supervisor status<br>if runuser -l root -c &#39;supervisorctl status all&#39; | grep &#39;STOPPED&#39;<br>then<br> #Print Server Identifier<br> hostname<br> #Print Current Date <br> echo $DATE<br> #Restart supervisor service<br> runuser -l root -c &#39;supervisorctl restart all&#39;<br>fi</pre><p><strong>Run the script every hour and export the logs for storage</strong></p><p>To achieve this, we will be using 2 AWS services: Systems Manager State Manager and S3.</p><p>AWS Systems Manager State Manager is a secure and scalable configuration management service that automates the process of keeping managed nodes (EC2 instances in our case) and other AWS resources in a state predefined by you.</p><ul><li>Head to the AWS Systems Manager Section of AWS</li><li>Scroll to the State Manager section</li><li>Create an association</li></ul><p>Let’s name our association <em>“restart-supervisor-cron” </em>and select the AWS-RunShellScript option to run the shell script. This option gives us access to the AWS Command Line Interface (CLI), which interprets the shell script just as a terminal within any server would.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PAg9BGHTCPNfNDCp6kvAPg.png" /></figure><p>Next, paste the script into the parameters section and specify what directory to run the script in (assuming there’s a target directory the script needs to be ran). In this case, none of the commands is directory specific therefore, this portion of the configuration can be left out. Then select the target instances you intend running the script in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NOZPmFMzcSslkzUYwcNiXQ.png" /></figure><p>Now, to the automation and logs storage part. The cron section of the configuration page takes care of automating the script to be ran every hour. There are other time scheduling options to be used. Setting this up largely depends on individual needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CV1s2Sfs68JyXez6wo045Q.png" /></figure><p>The final bit of storing logs in an s3 bucket can be set up in the “Output Options” section where you get to specify your preferred s3 bucket name. For the purpose of this tutorial, we will name it ‘supervisor-restart-logs’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XDHAdaIYIoCCCm85xvB3JA.png" /></figure><p>Once this is done, there is an optional section where you can create CloudWatch alarms but that won’t be covered in this article.</p><p>At this point, we can go ahead to save our association and viola! we have an automated service restart pipeline set up in AWS.</p><p><strong>Aggregate the logs into a single text file</strong></p><p>Now while we have provisioned an S3 bucket to store the logs from every run, there is a structure that makes logs generated by State Manager not so easy to manage especially when your intention is to have all logs in a single file.</p><p>Let’s talk about the very nested structure of State Manager S3 logs.</p><p>Imagine you’re running the script every hour on 100 servers. Every hour, each server sends auto generated logs with this type of structure to a folder within the S3 bucket. For context, this is what the log of one server looks like:</p><pre><strong>023678f4-w4v6-7tb5-9253-10d289frfshe/i-07804g3e15cca6d4u/awsrunShellScript/0.awsrunShellScript/stdout</strong></pre><p>Pretty long for a single log output right?</p><ul><li>The parent directory <strong><em>023678f4-w4v6–7tb5–9253–10d289frfshe </em></strong>is an auto generated log stream id</li><li><strong><em>I-07804g3e15cca6d4u</em></strong> represents the EC2 instance id</li><li><strong><em>stdout</em></strong> is the file containing the actual log</li></ul><p>This folder structure means having a hundred file paths looking like this from running the shell script just once.</p><p>How then do we aggregate all these logs into a single file for easier analysis and readability? One way will be to write a<strong> Lambda function.</strong></p><p>There are 4 steps to getting this lambda function up and ready for this use case:</p><ol><li>Create a lambda execution role</li><li>Create an S3 bucket for storing the aggregated logs (Name: aggregated-logs-bucket)</li><li>Write the lambda function</li><li>Add an S3 bucket trigger to automate running the code on every upload to the logs storage.</li></ol><p>To begin, head to the <strong>Roles</strong> section of <strong>IAM service</strong> on your AWS console to Create a role named extract-s3-contents-role (can be named anything) with the <em>AWSLambdaBasicExecutionRole</em> and <em>AmazonS3FullAccess </em>policies. This role allows the lambda function to be executed and access the s3 service.</p><p>Next, head to the <strong>Lambda service</strong> in AWS and create a lambda function.</p><p>Of the first 3 options, choose Author from scratch and name the function anything that fits your use case. In this article, the function will be named <strong><em>Extract-s3-contents</em></strong> and use the Python 3.9 runtime.</p><p>Under Permissions, change the execution role to extract-s3-contents-role and now, the function can be successfully created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jwAUbcUL3gds5ucwKzHvNQ.png" /></figure><p>In the code block to be deployed, we will be importing 2 libraries: boto3 and datetime libraries.</p><p>Boto3 is an AWS Software Development Kit (SDK) for Python we will use heavily for manipulating the S3 service we are fetching data from.</p><pre># Import required libraries<br>import boto3<br>from datetime import datetime<br><br>s3_client = boto3.client(&#39;s3&#39;)<br><br># Create a datetime variable<br>now = datetime.now()<br>hour = str(now.strftime(&quot;%Y-%m-%d %H&quot;))<br><br># Name aggregated log files dynamically<br>filename = &quot;horizon-logs:&quot; + hour + &quot;.txt&quot;<br><br>def lambda_handler(event, context):<br> <br>    # Get the list of all files in the S3 bucket<br>    objects = s3_client.list_objects(Bucket=&quot;extract-s3-contents&quot;)<br>    <br>    # Create an empty list to store aggregated logs<br>    logs = []<br>    <br>    # Iterate through each file in the S3 bucket and <br>    # read date creation property of each file<br>    for obj in objects[&#39;Contents&#39;]:<br>        last_modified = str(obj[&#39;LastModified&#39;])<br>  <br>        # Get the file key<br>        file_key = obj[&#39;Key&#39;]<br>        <br>        # Check if the file is in a nested folder<br>        if &#39;stdout&#39; in file_key and hour in last_modified:<br>            <br>            # Get the file content<br>            file_content = s3_client.get_object(Bucket=&quot;extract-s3-contents&quot;, Key=file_key)[&#39;Body&#39;].read()<br>            <br>            # Append the file content to the list of logs<br>            logs.append(file_content)<br>       <br>    # Put the aggregated logs into a file and <br>    # store in the second created s3 bucket<br>    s3_client.put_object(Bucket=&quot;aggregated-logs-bucket&quot;, Key=filename, Body=b&quot;\n&quot;.join(logs))</pre><p>Finally, we have to attach an S3 trigger.</p><p>At the top of the lambda function page, add a trigger.</p><p>Configure the trigger source to be S3 and select <em>All object create events</em> as the event type.</p><p>Next check the box that warns against recursive invocation to avoid the function being triggered endlessly and incurring increased costs. This was why a second bucket had to be created before adding an s3 trigger.</p><p>Now, every hour once the script is run, the logs are automatically aggregated into an S3 bucket (aggregated-logs-bucket) for readability and can be conveniently processed if required for downstream analysis.</p><p><strong>I hope you enjoyed this AWS exploration and now, you can set up State manager and a Lambda function either for this use case or your custom use case.</strong></p><p><strong>Feel free to connect on </strong><a href="http://www.linkedin.com/in/oluwatobiloba-adebayo"><strong>LinkedIn</strong></a><strong> and please leave a clap if you found this article helpful </strong>❤️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ec560ac584f" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/automation-with-aws-systems-manager-and-s3-2ec560ac584f">AUTOMATION WITH AWS (Systems Manager and S3)</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Linux Basics]]></title>
            <link>https://medium.com/@hildredadebayo/getting-started-with-linux-basics-4fececb187d2?source=rss-acaf32a49dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fececb187d2</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[command-line]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Hildred Adebayo]]></dc:creator>
            <pubDate>Fri, 25 Nov 2022 15:08:41 GMT</pubDate>
            <atom:updated>2022-11-25T15:08:41.625Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*YsTobHVLYiRBRCfk1an1Hw.png" /><figcaption>Source: TEAM ENCRYPT / LINUX IN A NUTSHELL 6TH ED</figcaption></figure><p>There is a good reason why your journey to DevOps or Cloud computing, requires knowledge of the linux operating system. To know why and get started on the basics of linux , let’s take a quick dive together.</p><p>Linux is the world’s most used operating system with over 95% of the top web servers and over 85% of smartphones running on linux. Many of the tools developed for DevOps and Cloud computing operations are first built to support linux systems before being made available for Windows. There are a variety of linux distributions including Debian, Red Hat Enterprise Linux (RHEL), CentOS, Fedora among others.</p><p><strong>Working with the Linux Shell</strong></p><p>Although the graphical interface of the operating system seems easier to use and more appealing to users, working with the shell is more powerful, as using the graphical interface alone can be limited in function. In working with the shell, the <strong><em>terminal</em></strong> is a useful program which provides a graphical interface with which we interact with the shell. There are several flavours of the linux shell such as the C shell, Z shell and the most popular BASH shell (Bourne Again Shell).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*HMuuOQYWUTptEz-AkaNapg.png" /><figcaption>Source: LinuxCommand.org</figcaption></figure><p><strong>File Types in Linux</strong></p><p>There are 3 file types:</p><ul><li><strong>Regular files</strong>: This is the most common file type in the linux system. Examples of such files are text files, images and binary files.</li><li><strong>Directory</strong>: A folder that stores other files</li><li><strong>Special files</strong> could be Character files, Block files, Links</li></ul><p>In this article, we will be talking about Regular files and Directories</p><p><strong>Basic Linux commands</strong></p><p>Let’s look at a compilation of some of the commonly used commands in the linux shell. Some of these commands can either be used on their own or together with flags (options that modify the behaviour of these commands). Let’s take a look at how this works:</p><pre>$ pwd</pre><p>This is a very useful command that prints the directory you are currently working in. If you are in the home directory, the output of this command will return: <strong>/home/username</strong></p><pre>$ cd</pre><p>For navigating between files and directories in the linux command line, this is the command to use. You could either work with the absolute path of the file for example:</p><p><strong>cd /home/Downloads/Recent</strong></p><p>or if you are already within the ‘Downloads’ folder, you can switch into the ‘Recent’ folder with the command:</p><p><strong>cd Recent</strong></p><p>If this command is used without a directory option, it would take you back to your home directory.</p><pre>$ ls</pre><p>This command lists the contents of a directory. For example, to list the contents of our <strong>/home/Downloads/Recent</strong> directory run the command:</p><p><strong>ls /home/Downloads/Recent</strong></p><p>There are certain flags that can be used with this command:</p><p><strong>ls -a</strong></p><p>List all the contents of a directory including hidden files (hidden files start with a period[.] before the filename or directory: An example of a hidden directory is <strong>.excel-files</strong>)</p><p><strong>ls -l</strong></p><p>List all contents in a long format. This is very useful for viewing more details about files and directories such as file permissions, date of creation, file owner and group.</p><p><strong>ls -lh</strong></p><p>List all contents with their sizes in a human readable format.</p><pre>$ echo [string]</pre><p>This command is a built-in utility that displays a line of text or string using the standard output. It is mostly used in shell scripts to output status text to the screen or into a file.</p><pre>$ cat</pre><p>This command, followed by a filename, prints to the terminal the contents of the file. For example:</p><p><strong>cat /home/Downloads/file.txt</strong></p><pre>$ mkdir</pre><p>This command is used to create directories in the shell. If a relative path is provided following the command, the directory is created within the current working directory. If an absolute path is provided, the directory provided is where the file gets created.</p><p>For example if you are in the Desktop directory:</p><p><strong>mkdir example</strong> creates a directory within the Desktop directory</p><p><strong>mkdir /home/Downloads/example</strong> will create the directory in the Downloads directory</p><p>A very useful flag with this command is the -p flag. This flag modifies the behaviour of the command to create a parent directory along with the directory intended to be created. For example:</p><p><strong>mkdir -p /home/Downloads/Parent/Child</strong></p><p>In this example, both the Parent and Child directories are created at once.</p><pre>$ df -h</pre><p>This command shows the system’s disk space usage in a human readable format.</p><pre>$ man [command name]</pre><p>This command is a very useful manual for commands that can be used in the shell. It prints to the terminal information about whichever command you need to learn about. Some of the Information printed includes the command description<strong>, </strong>usage (including applicable flags) and some history.</p><pre>$ uname</pre><p>This command is more useful when used with flags (-v or -r) to print out the linux version or release the system runs on.</p><pre>$ nano [filename], vim [filename]</pre><p>To edit files in the terminal, we use text editors. There are different flavours of text editors, the most widely used being vim and nano. Although vim comes by default, the nano text editor has to be installed for usage.</p><pre>$ htop</pre><p>This command monitors system resources and server processes in real time. It is very useful in troubleshooting to determine the cause of load on the system by each process and kill a process utilising excessive server resources.</p><pre>$ grep [option] [pattern] [filename]</pre><p>The grep command is useful for searching for patterns in files. It can be used with the following flags:</p><p>-r: search a directory recursively for a pattern</p><p>-i: search case insensitive (without this flag, the grep command is case sensitive)</p><p>-v: search for all that do not match a specific pattern</p><p>-w: search for the whole word and not just the pattern</p><pre>$ sudo,  su</pre><p>Either of these commands provides a user with administrator/root privileges to run commands. The difference between these 2 approaches is that with the<strong> sudo</strong> command, the password for the user attempting to run a command with root privileges is required while with the <strong>su</strong> command, the user is switched to the root user and root password is required. It is therefore safer to use sudo over su.</p><p><strong>File Permissions</strong></p><p>As discussed earlier, the <strong>ls -l</strong> command, prints out the long list format of files and directories within the current working directory or a directory specified after the command. At the beginning of this output, we see the permissions shown as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*51nEsytpiuN8boHrjQ3hcw.png" /><figcaption>Photo credit: Linux Shell Tips</figcaption></figure><p>Explaining the permissions in the first line <strong>drwxr-xr-x:</strong></p><ol><li>The first character represents the type of file:</li></ol><ul><li><strong>d</strong> means it’s a directory</li><li><strong>- </strong>means it’s a regular file</li><li><strong>l</strong> means it’s a link</li></ul><p>2. The next 3 characters ‘rwx’ show the owner permissions: <strong>r for read</strong>, <strong>w. for write</strong> and <strong>x for executable.</strong></p><p>3. The following 3 characters show the group permissions</p><p>4. The last 3 characters show permissions for others</p><p>Permissions are written numerically in octal values:</p><ul><li>r — 4</li><li>w — 2</li><li>x — 1</li><li>No permission — 0</li></ul><p>By adding the numbers, we can interprete the permissions for example:</p><p><strong>7</strong> represents <strong>r (4) + w (2) + x(1)</strong> permissions while, <strong>5</strong> represents <strong>r(4) + x(1)</strong> permissions.</p><p>To change the permissions of a file, we use the command:</p><pre>$ chmod</pre><p>Following this owner, group and others convention as well as the octal value notations, let’s interpret some permissions:</p><ul><li><strong>chmod 777</strong> = full access for owner, group and others</li><li><strong>chmod 750</strong> = full access for owner, read and execute access for group and no permissions for others</li><li><strong>chmod 555</strong> = read and execute access for owner, group and others</li><li><strong>chmod 660</strong> = read and write access for owner and group, no permissions for others</li><li><strong>chmod 400</strong> = read access for owner and no permissions for group and others.</li></ul><p><strong>Thanks for reading. Best wishes in your career growth! </strong>😃</p><p><strong>Feel free to connect on </strong><a href="http://www.linkedin.com/in/oluwatobiloba-adebayo"><strong>LinkedIn</strong></a><strong> and please leave a clap if you found this article helpful </strong>❤️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fececb187d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding DevOps]]></title>
            <link>https://medium.com/@hildredadebayo/understanding-devops-d05956e02ee4?source=rss-acaf32a49dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/d05956e02ee4</guid>
            <category><![CDATA[waterfall-methodologies]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[agile-methodology]]></category>
            <category><![CDATA[version-control-system]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Hildred Adebayo]]></dc:creator>
            <pubDate>Fri, 04 Nov 2022 13:35:58 GMT</pubDate>
            <atom:updated>2022-11-04T13:35:58.047Z</atom:updated>
            <content:encoded><![CDATA[<h3>Undestanding DevOps</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*usj1oHNRZKiPRg_2eS6ifQ.png" /><figcaption>Photo credit: Information Age</figcaption></figure><p>In recent times, the word DevOps has been used more frequently in the tech space. While some have a rough idea what this word connotes, others probably see it commonly as ‘high level tech’ but is that really what it is?</p><p>DevOps is first a culture, a practice having automation, code quality, increased organisational productivity and infrastructure scaling at its heart. In past times, releases were mostly complicated procedures, coming with headaches of fixing cumbersome bugs hiding in a large code base, and prolonged product release timelines.</p><p>The DevOps mindset is best explained by the CALMS model, an acronym for <strong><em>Culture, Automation, Lean, Measurement, and Sharing.</em></strong></p><p>Let’s take a quick dive into the CALMS DevOps model:</p><p>The <strong><em>CULTURE </em></strong>of DevOps is Collaborative. It is a philosophy of cross-team empathy and business alignment, such that the entire development and operations lifecycle is seen as the business of the entire team by integrating Development, Operations, Quality assurance and Security teams to ensure high quality and security of products before getting to end users.</p><p><strong><em>AUTOMATION</em></strong> is the ‘making life better’ part of DevOps, the core aspect of the philosophy that improves code quality, speed of innovating for customers, eases company growth with changing markets and ensures product reliability. There are many aspects to automation, major ones being:</p><ul><li><em>Continuous Integration:</em></li></ul><p>The practice of pushing smaller pieces of code to a centralised code repository frequently. These code changes are automatically built and tested (unit tests) to identify errors before a successful integration into the repository. The main advantage of this practice is how swiftly bugs can be identified, improving code quality.</p><p>This centralised code repository is called a <strong><em>Version Control System, </em></strong>that keeps track of periodic code changes and creates versions for each of these changes made. It also supports collaboration on projects with each contributor being able to have a version of the project on their personal computers to work on. A very popular version control tool is Git.</p><ul><li><em>Continuous Delivery/Deployment:</em></li></ul><p>This practice builds on Continuous Integration. After a successful code integration process, the build artifact generated from the build step is automatically deployed to a test/staging environment where code changes are run through further tests (UI testing, Load testing, API reliability testing etc..) to ensure readiness for a production environment. Considering Delivery and Deployment are wrongly used interchangeably, it is worthy of note that there is one main difference between both practices. Continuous delivery, involves a manual approval step while Continuous deployment pipelines automatically deploy code changes all the way to production straight from push.</p><ul><li><em>Infrastructure as Code (IAC):</em></li></ul><p>Managing one server manually is easily workable but how about managing changes to resources on over a hundred servers? Scary stuff right?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*kwAGjWyfxxjdH8ycknMGHw.png" /></figure><p>Here’s where IAC comes in. With this practice, infrastructure is provisioned using code, version control and continuous integration. This makes infrastructure easily deployable, maintaining consistency of configurations and reproducibility across environments (Test, Staging/UAT and Production). Terraform, AWS Cloudformation and Ansible are some of the tools popularly used for configuration management. The choice of tools to be used is largely dependent on use cases.</p><ul><li><em>Monitoring and Logging:</em></li></ul><p>Arguably one of the 2 most important steps in the automation cycle (planning being the other), this practice is vital for 2 main reasons:</p><p>➢ Understanding Application and Infrastructure performance</p><p>➢ Ensuring early troubleshooting of errors which could affect user experience.</p><p><strong><em>LEAN </em></strong>targets creating more value for customers with fewer resources. Closely related to Agile development, lean aims at eliminating waste, amplifying learning, introducing flexibility, and providing efficient, incremental changes to products based on user/client feedback.</p><p>In iterative development,<strong><em> MEASUREMENT</em></strong> is vital in determining where you are in the development lifecycle in relation to where you are eventually headed. Analysing data from your development process aids making fact-driven decisions, monitor each process and learn about trends of products and organisation as a whole.</p><p>For DevOps to work,<strong><em> SHARING</em></strong> new<strong><em> </em></strong>insights across the organisation must be at the heart of the model. Sharing fosters learning, breaking down silos, and fosters transparency and collaboration.</p><p>Finally, there are different methodologies that compare with DevOps, let’s try to make distinctions between DevOps and two other popular methodologies in the IT space:</p><p><strong>Waterfall vs Agile vs DevOps</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*ytNAQxXSOUaL3K-TKCuBug.png" /><figcaption>Photo credit: Veritis transcend</figcaption></figure><p><strong><em>Waterfall</em></strong> is an older methodology, involving planning SDLC (Software development lifecycle) from beginning to end, gathering customer requirements at the beginning of the project and following through with gathering customer business and technical requirements, planning, development, testing, deployment and customer verification in a sequential order.</p><p>While this methodology is still being used, more organisations are adopting the Agile methodology due to more high impact setbacks that come with it compared to using the Agile methodology. Some of the setbacks include:</p><ul><li>Implementing changes required by customers in the verification stage can be difficult considering the product is completely developed before these errors become visible to customers when the product is released to them.</li><li>Cost incurred in making changes are unpredictable</li></ul><p><strong><em>Agile</em></strong> is an iterative software development methodology based on customer-focused feedback, in contrast to <strong><em>DevOps</em></strong> that is more of an organisation-focused feedback system. With Agile, the period of time an MVP gets released can be significantly reduced as it supports ‘on-the-go’ changes following a time-based deliverables approach called <em>Sprints.</em></p><p>The goal of Agile is to bridge the gap between <em>customers</em> and the development<em> team while </em>DevOps goal is to bridge the gap between the <em>development team</em> and the <em>operations team.</em></p><p>DevOps and Agile however are similar however, as they both support small, rapid incremental changes to products.</p><p><strong>I’m glad we made it to the end of this article together </strong>😃<strong>.</strong></p><p><strong>I hope this was helpful in understanding the DevOps concept and introducing you to version control.</strong></p><p><strong>Feel free to connect on </strong><a href="http://www.linkedin.com/in/oluwatobiloba-adebayo"><strong>LinkedIn</strong></a><strong> and please leave a clap if you found this article helpful </strong>❤️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d05956e02ee4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MY HACKBIO EXPERIENCE]]></title>
            <link>https://medium.com/hackbio/my-hackbio-experience-eec91e41255?source=rss-acaf32a49dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/eec91e41255</guid>
            <dc:creator><![CDATA[Hildred Adebayo]]></dc:creator>
            <pubDate>Sat, 05 Sep 2020 00:10:25 GMT</pubDate>
            <atom:updated>2020-09-07T12:13:16.599Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Il9GpDUfZYN57cM7wvGqYw.jpeg" /></figure><h3>WHO AM I?</h3><p>I am Adebayo Oluwatobiloba Hildred, from Nigeria. I have a bachelor’s degree in Physiology from the University of Ilorin, Nigeria. Currently, I am taking a master&#39;s degree in Cell biology and genetics at the University of Lagos, Nigeria.</p><h3>MY JOURNEY TO COMPUTATIONAL BIOLOGY</h3><p>Growing up, I used to sniff around, looking for my mother’s anatomy books.</p><p>She always hid them because she thought a 9-year-old didn’t need all that information. My fascination, however, was unending and I wanted to know the ‘why’ behind the development of all these body systems.</p><p>A degree in physiology exposed me to the mechanisms of action of body systems and revealed the little wonders in As, Ts, Cs, and Gs! <strong>DNA</strong>!!</p><p>Oh as rightly guessed, my curiosity level shot up and I wanted to see these power molecules in action. As I worked in an embryology laboratory, the self-driven DNA made babies before my very eyes and it dawned on me, I needed to know more.</p><p>Bioinformatics became my focus and I started to read texts, learning to code, taking online webinars and after 3 months, I craved real-life bioinformatics experience.</p><p>Hackbio came along, just in time and I knew this was my shot!</p><h3>MY AMAZING EXPERIENCE</h3><p>I want to start by saying, I miss this experience already as it approaches its end. My experience on hackbio has transformed me professionally, as well as personally in such a short period (I can only imagine if it lasted longer).</p><p>Hackbio made me realize just how flexible and interesting science can be. I have really benefited from learning how to collaborate virtually with teammates across the world on platforms like <a href="https://github.com/">Github</a>, and Google Drive. This has improved my team spirit tremendously and taught me to maximize the strengths of every member of a team.</p><p>I have also been exposed to various software such as MAFFT, MUSCLE, BLAST, IQTREE, web servers such as GALAXY, EMBOSS, databases such as GISAID, GENBANK and have strengthened my python and bash scripting knowledge.</p><p>I am grateful for my experience and growth and cannot wait to begin to largely impact the scientific community.</p><p><strong>THANK YOU SCIENCE! THANK YOU HACKBIO!</strong></p><p>Slack username: @Hildred</p><p>LinkedIn:<a href="https://www.linkedin.com/in/oluwatobiloba-adebayo-86795013b/">https://www.linkedin.com/in/oluwatobiloba-adebayo-86795013b/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eec91e41255" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackbio/my-hackbio-experience-eec91e41255">MY HACKBIO EXPERIENCE</a> was originally published in <a href="https://medium.com/hackbio">HackBio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>