<?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 Simon Head on Medium]]></title>
        <description><![CDATA[Stories by Simon Head on Medium]]></description>
        <link>https://medium.com/@simon-j-head?source=rss-841098de2fd6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Rgj_MASspQHh72SXxLZwmw@2x.jpeg</url>
            <title>Stories by Simon Head on Medium</title>
            <link>https://medium.com/@simon-j-head?source=rss-841098de2fd6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 13:01:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@simon-j-head/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[Installing GitLab on Kubernetes using AWS EKS]]></title>
            <link>https://simon-j-head.medium.com/installing-gitlab-on-kubernetes-using-aws-eks-3748f408bdc5?source=rss-841098de2fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/3748f408bdc5</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[gitlab]]></category>
            <dc:creator><![CDATA[Simon Head]]></dc:creator>
            <pubDate>Fri, 08 Jan 2021 13:14:28 GMT</pubDate>
            <atom:updated>2021-01-08T13:14:28.993Z</atom:updated>
            <content:encoded><![CDATA[<p>How to perform a Cloud Native installation of <a href="https://about.gitlab.com/">GitLab</a> running on EKS in AWS.</p><figure><img alt="https://about.gitlab.com/" src="https://cdn-images-1.medium.com/max/1024/1*WFdpa3IemBzfrysLhiDW5g.png" /><figcaption>The GitLab.com home page</figcaption></figure><p><a href="https://about.gitlab.com/">GitLab</a> is a web-based DevOps lifecycle tool that provides a Git-repository manager providing wiki, issue-tracking and continuous integration and deployment pipeline features, using an open-source license according to the <a href="https://en.wikipedia.org/wiki/GitLab">Wikipedia</a>. If you’ve not tried it out, you really should</p><p>This guide discusses setting up a public-facing GitLab running in a Managed Kubernetes cluster on AWS. The installation takes about an hour.</p><h3>Prerequisites (20 minutes)</h3><p>You will need the following in order to follow these instructions:</p><ul><li>a public domain that you can register a DNS record with, and</li><li>some client-side tooling</li></ul><p>You’ll need to specify a domain which will contain records to resolve GitLab. The easiest way is to <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-register.html">register a public domain in Route 53</a>. This is because by default the chart will install and configure <a href="https://cert-manager.io/docs/">cert-manager</a> to obtain free TLS certificates.</p><p>You also need the following tooling installed on a client:</p><ul><li><a href="https://aws.amazon.com/cli/">AWS CLI</a>: AWS CLI needed to register control plane and clients and get credentials</li><li><a href="https://eksctl.io/">Eksctl</a>: EKS command line</li><li><a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/">Kubectl</a>: Kubernetes client command line</li><li><a href="https://helm.sh/">Helm</a>: a package manager for Kubernetes</li></ul><p>On a Mac the easiest way is to first install <a href="https://brew.sh/">Homebrew</a>. Then use that to install the tooling like so:</p><pre>brew tap weaveworks/tap<br>brew install awscli eksctl kubectl helm</pre><p>Alternatively, each of the tools have installation instructions on their websites.</p><h3>Create an EKS Cluster (20 minutes)</h3><p>With your aws account configured for command line access the next step is to use eksctl to build the Kubernetes cluster. This is a single command that creates two m5.xlarge nodes in eu-west-2. A lot of the configuration below can be modified to suit your needs such as the region, name of the cluster etc. The <a href="https://docs.gitlab.com/charts/installation/cloud/eks.html">GitLab documentation</a> suggests at least two nodes of instance type m5.xlarge:</p><pre>eksctl create cluster \<br>  --name gitlab \<br>  --region eu-west-2 \<br>  --version 1.18 \<br>  --managed \<br>  --nodegroup-name standard-workers \<br>  --node-type m5.xlarge \<br>  --nodes 2 \<br>  --nodes-min 2 \<br>  --nodes-max 2</pre><p>To minimise undifferentiated heavy lifting we have chosen a managed node group. The minimum suggested version is 1.14 for <a href="https://docs.gitlab.com/charts/installation/cloud/eks.html">EKS</a>.</p><h3>Install GitLab Software (10 minutes)</h3><p>You first need to configure <a href="https://helm.sh/">Helm</a> to include the GitLab chart repository:</p><pre>helm repo add gitlab <a href="https://charts.gitlab.io/">https://charts.gitlab.io/</a><br>helm repo update</pre><p>Then, run the GitLab deployment via Helm. You will need a domain and an email address to do this (no emails are sent to that address). The following command creates a deployment called gitlab using the gitlab/gitlab helm chart:</p><pre>helm install gitlab gitlab/gitlab \<br>  --set global.hosts.domain=&quot;MYDOMAIN&quot; \<br>  --set certmanager-issuer.email=&quot;MYEMAILADDRESS&quot; \<br>  --set global.edition=ce</pre><p>The global.hosts.domain and certmanager-issuer.email are needed for the SSL certificate registration and the global.edition specified Community Edition (ce) or Enterprise Edition (ee). There are many many configuration options in the <a href="https://docs.gitlab.com/charts/">documentation</a>. For example, using an external Postgres Database (such as <a href="https://aws.amazon.com/rds/">AWS RDS</a>) or Redis (such as <a href="https://aws.amazon.com/elasticache/">ElastiCache</a>).</p><p>An alternative is to make a file containing the configuration such as values.yml containing the configuration. Helm can also supply this after an installation by issuing helm get values gitlab &gt; values.yaml:</p><pre>certmanager-issuer:<br>  email: MYEMAILADDRESS</pre><pre>global:<br>  edition: ce</pre><pre>  hosts:<br>    domain: MYDOMAIN</pre><h3>Register DNS Records (10 minutes)</h3><p>After a few minutes, obtain the Ingress Load Balancer EXTERNAL-IP (name) by entering the command:</p><pre>kubectl get svc -l app=nginx-ingress</pre><p>which should display something like:</p><pre>NAME                                      TYPE           CLUSTER-IP       EXTERNAL-IP                                                              PORT(S)                                   AGE</pre><pre>gitlab-nginx-ingress-controller           LoadBalancer   172.20.71.90     a66bfac3657a040ec9fe5a784bf2a483-916339528.us-east-1.elb.amazonaws.com   80:31564/TCP,443:31599/TCP,22:31246/TCP   20h</pre><pre>gitlab-nginx-ingress-controller-metrics   ClusterIP      172.20.1.224     &lt;none&gt;                                                                   9913/TCP                                  20h</pre><pre>gitlab-nginx-ingress-controller-stats     ClusterIP      172.20.6.149     &lt;none&gt;                                                                   18080/TCP                                 20h</pre><pre>gitlab-nginx-ingress-default-backend      ClusterIP      172.20.189.247   &lt;none&gt;                                                                   80/TCP                                    20h</pre><p>Copy the EXTERNAL-IP (which will be a name) field for the gitlab-nginx-ingress-controller and create DNS alias / CNAME records in <a href="https://aws.amazon.com/route53/">Amazon Route 53</a> for the following (on your public domain):</p><ul><li>gitlab.MYDOMAIN</li><li>registry.MYDOMAIN</li><li>minio.MYDOMAIN</li></ul><h3>Administrator Login (10 mins)</h3><p>An administrator (root) account will be created with a randomised password. The password can be obtained from Kubernetes secrets with (note that gitlab appears twice in the command):</p><pre>kubectl get secret gitlab-gitlab-initial-root-password --ojsonpath=’{.data.password}’ | base64 — decode ; echo</pre><p>You should be able to visit the website at https://gitlab.MYDOMAIN and login with the username root and the password output from the above command. This might not work immediately, you may have to wait 5 or 10 minutes for the certificates to become registered.</p><h3>Outlook</h3><p>This is a “basic” installation where GitLab has been split into multiple components but they are all running in the same Kubernetes cluster. It is possible to replace the existing Postgres database with an external database, to replace Redis with ElastiCache and replace Minio with S3. All to improve resilience. This is done by adding additional configuration to the Helm values.yml file.</p><p>But for now, you have a Cloud Native, self-healing installation of GitLab CE to get you started!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3748f408bdc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Which Cloud Provider is best for Managed Kubernetes?]]></title>
            <link>https://faun.pub/which-cloud-provider-is-best-for-managed-kubernetes-7de56f468a27?source=rss-841098de2fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/7de56f468a27</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[ibm]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Simon Head]]></dc:creator>
            <pubDate>Wed, 11 Mar 2020 15:42:14 GMT</pubDate>
            <atom:updated>2020-03-11T22:22:15.796Z</atom:updated>
            <content:encoded><![CDATA[<h4>A look at Amazon Web Services, Microsoft Azure, Google Cloud Platform and IBM Cloud.</h4><p>As part of the <a href="https://medium.com/faun/devops-culture-and-practice-5df063581c49">IBM DevOps Culture and Practice training</a>, we help each student in the classroom build a managed Kubernetes cluster using Amazon EKS. It’s the first thing we do, before fleshing-out a “development” and “operations” environment for a sample application.</p><p>We’re using Amazon mainly for historical reasons, having started with AWS EC2 VMs, then moving to Kubernetes and Kops, then EKS via the Cloud Formation templates and now using <a href="https://eksctl.io/">eksctl</a>. We never really did a study to validate if AWS is the best for our needs, but our clients use it. And they use it a lot.</p><p>In this brief note, we do a quick comparison of managed Kubernetes services between the four big cloud providers. For all the comparisons below, we’re using UK data centres, as that’s often a requirement of our work.</p><p>These days more and more companies are using multiple cloud vendors. We’re heading towards multi-cloud deployments, which means we’re more open to deploying on different Clouds. After all, one of the key benefits of Kubernetes is that you’re (mostly) Cloud-agnostic after the cluster has been deployed.</p><p>All major cloud providers provide managed Kubernetes services. Let’s have a look at Amazon Web Services, Microsoft Azure, Google Cloud Platform and IBM Cloud.</p><h4>Kubernetes Versions</h4><p>Since we’re considering the managed Kubernetes services, we are limited to the versions supported by the Cloud provider. The availability is shown in the table below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KW5i_WAgs-xzRqg9X-ZFlw.png" /><figcaption>Tick=available, cross=not available and construction sign=available as preview. Note that 1.15 became available on Amazon EKS on 10 March 2020 — <a href="https://aws.amazon.com/about-aws/whats-new/2020/03/amazon-eks-now-supports-kubernetes-version-1-15/">https://aws.amazon.com/about-aws/whats-new/2020/03/amazon-eks-now-supports-kubernetes-version-1-15/</a></figcaption></figure><p>Perhaps surprising to see, but IBM has the widest availability of newer Kubernetes versions! Amazon, Azure and Google have a very similar availability (as of the 10 March 2020) with Azure and Google allowing previews (presumably not for production use!) of the newer versions.</p><h4>Cluster Creation</h4><p>Each of the four cloud providers offers a command-line tool to provision managed Kubernetes clusters. As part of this study, we provisioned three nodes and the management plane (we tried, where possible to pick “similar” instance sizes on each of the Cloud Providers). We recorded the time taken until the cluster was ready to use with kubectl.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*EbcLUuGt0S3KhzoiKLWAzg.png" /><figcaption>Time to create a three-node managed Kubernetes cluster in seconds.</figcaption></figure><p>You can clearly see that Google Kubernetes Engine is the quickest to deploy a working cluster (in just under six minutes). Although Microsoft’s Azure is not far behind. The eksctl command took almost 15 minutes. Which feels like a long time in comparison, but it’s doing an awful lot of work. 15 minutes really isn’t that long to wait for a whole new environment.</p><p>After the conclusion of the article, you can see the commands we used in testing.</p><h4>Time to Provision an application</h4><p>To see how long it takes to provision a “normal” application we took the Helm Chart for <a href="https://prometheus.io/">Prometheus</a> (the monitoring tool) and deployed it three times on each Cloud provider and recorded the average time taken until we could reach the Prometheus home page. We changed the service to a LoadBalancer so we could track how long it takes to make the service external and add two (the default) persistent volumes. The configuration is:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b897c65f02ef0c6b5e57f59e27a6f4d8/href">https://medium.com/media/b897c65f02ef0c6b5e57f59e27a6f4d8/href</a></iframe><p>and we executed this command:</p><pre>helm install prometheus \<br>     -f prometheus.yml \<br>     stable/prometheus</pre><p>We recorded when the external service appeared and responded with the correct HTTP status code from the home page. The results, in seconds, where lower indicates a quicker deployment, are shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*_oQ6uMQ1yxTb87KK_vcPcQ.png" /><figcaption>Time to provision Prometheus (4 Deployments, 5 Services and 2 Persistent Volumes) in seconds. Google’s offering is nearly three times faster than Amazon’s offering. It’s amazingly fast!</figcaption></figure><p>What’s surprising here is the huge range in deployment time for two persistent volumes, load balancer and the various deployments. I expected all Cloud providers to take roughly the same amount of time but that is not the case. Google’s offering is nearly three times faster than Amazon’s, for example!</p><h4>Cost &amp; SLA</h4><p>Azure and IBM offer free control planes. For Amazon, you have to pay, but they recently <a href="https://aws.amazon.com/blogs/aws/eks-price-reduction/">cut the cost in half</a> to $0.10 an hour. It’s a 24x7 cost while the cluster is running though (you can scale you VMs to zero overnight). Google <a href="https://cloud.google.com/kubernetes-engine/pricing">will introduce a charge</a> of $0.10 an hour for the control plane starting 6 June 2020.</p><p>The cost estimate below includes load balancers, storage and compute.</p><ul><li><strong>AWS:</strong> <em>t3.large</em> 2 vCPU, 8 GiB</li><li><strong>Azure:</strong> <em>Standard_B2ms</em> 2 vCPU, 8 GiB</li><li><strong>Google:</strong> <em>n1-standard2</em> 2 vCPU, 7.5 GiB</li><li><strong>IBM Cloud:</strong> <em>u2c.2x4</em> 2 vCPUs 4 GiB (looks like u3c is the more modern variant now — 11 March 2020)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*0sZH91AAktleULhaUEc9nw.png" /><figcaption>Estimated monthly cost in dollars for a three-node cluster.</figcaption></figure><p>Perhaps unexpectedly, IBM Cloud is the cheapest. Of course, the cost depends on the Compute, Storage and Data transfers and this is only a simple estimate. There is probably a 20% difference in price, and what we really need to do is run a realistic workload on each to validate that we’ve picked compatible instance types.</p><p>Since AWS and Google are the only products with paid-for control planes, they are the only services to offer an <a href="https://aws.amazon.com/eks/sla/">SLA </a>on the control plane. If that’s something you need, then AWS is the one for you.</p><h4>Ease of use</h4><p>The command-line tool clients for all the services we tested are very easy to use in their default configuration. They were also all very similar in the way they were used to build a cluster (see the very bottom of this post). We have the most experience with AWS but managed to build all the clusters easily.</p><p>A special mention should go out to Google because of its tight integration. You can see details of the services and deployments within their Web console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iZnhoMjAPZiIDBha2F_T0Q.png" /><figcaption>Kubernetes Integration into Google Cloud Console. You can see Deployments, Services, Storage from within their main Cloud console.</figcaption></figure><p>One niggle we ran into is that on IBM Cloud we had to modify the default Helm configuration for Prometheus so that the persistent volumes were mounted correctly. We didn’t need to make any changes for the other Cloud providers. The changes are:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a70518fc84e486db1020aa8f2cb4d6fd/href">https://medium.com/media/a70518fc84e486db1020aa8f2cb4d6fd/href</a></iframe><h4>Conclusion</h4><p>First things first, if you’re happily using one of these already there is probably no reason to migrate all your stuff from one Cloud provider to another on the basis of this quick study.</p><p>If you want the fastest and most tightly integrated then Google Cloud is the one for you. But is the difference between waiting 15 minutes and waiting 6 minutes for a new environment that important to you? Is it something that you’ll need to do frequently and spend a lot of time on? Or is it a small part of the solution, and other places account for more time?</p><p>All four Cloud providers allowed provisioning of a Kubernetes cluster within twenty minutes and the costs were very similar. If you need an SLA on the control plane, then AWS (or Google) are the obvious choices.</p><p>If you’re already heavily invested in any of these Cloud providers, then you’ll be just fine. No obvious reasons to jump ship. But if your company is multi-Cloud then maybe you can pick the one that suits your needs best?</p><p>IBM Cloud is definitely the underdog here, and probably unfairly. Maybe it’s worth having a look at it?</p><p><em>The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.</em></p><h4>Appendix: Cluster Provisioning commands</h4><p>Amazon Elastic Kubernetes Service</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8cedf93a378c36be22dca2a198fff8e1/href">https://medium.com/media/8cedf93a378c36be22dca2a198fff8e1/href</a></iframe><p>Azure Kubernetes Service</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/05281665c2a4a2064096bbc3c78e3dd6/href">https://medium.com/media/05281665c2a4a2064096bbc3c78e3dd6/href</a></iframe><p>Google Kubernetes Engine</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d23daa5cfeb29185cc4325fa594e33f2/href">https://medium.com/media/d23daa5cfeb29185cc4325fa594e33f2/href</a></iframe><p>IBM Kubernetes Service</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b9880f10f6e0fad47a86e2a7b2fe7c11/href">https://medium.com/media/b9880f10f6e0fad47a86e2a7b2fe7c11/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p><strong>Follow us on </strong><a href="https://twitter.com/joinfaun"><strong>Twitter</strong></a><strong> </strong>🐦<strong> and </strong><a href="https://www.facebook.com/faun.dev/"><strong>Facebook</strong></a><strong> </strong>👥<strong> and </strong><a href="https://instagram.com/fauncommunity/"><strong>Instagram</strong></a><strong> </strong>📷 <strong>and join our </strong><a href="https://www.facebook.com/groups/364904580892967/"><strong>Facebook</strong></a><strong> and </strong><a href="https://www.linkedin.com/company/faundev"><strong>Linkedin</strong></a><strong> Groups </strong>💬<strong>.</strong></p><p><strong>To join our community Slack team chat </strong>🗣️ <strong>read our weekly Faun topics </strong>🗞️,<strong> and connect with the community </strong>📣<strong> click here⬇</strong></p><figure><a href="https://www.faun.dev/join/?utm_source=medium.com%2Ffaun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6P3WpLjGv5v1ucm5dgkucg.png" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7de56f468a27" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/which-cloud-provider-is-best-for-managed-kubernetes-7de56f468a27">Which Cloud Provider is best for Managed Kubernetes?</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shorting the feedback loop: Skaffold]]></title>
            <link>https://faun.pub/shorting-the-feedback-loop-skaffold-e573e385cee4?source=rss-841098de2fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e573e385cee4</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[ibm]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Simon Head]]></dc:creator>
            <pubDate>Thu, 27 Feb 2020 12:43:37 GMT</pubDate>
            <atom:updated>2020-02-27T17:54:44.202Z</atom:updated>
            <content:encoded><![CDATA[<h4>The faster we can try things out (and maybe decide they’re a bad idea) the faster we learn. Skaffold lets us try our code in a Kubernetes cluster and learn from it.</h4><p>We’ve been using Python Flask in our <a href="https://medium.com/faun/devops-culture-and-practice-5df063581c49">IBM DevOps Culture and Practice training</a>. We create a <em>very</em> simple application so that we can demonstrate creating a build pipeline for Docker images, automated testing, automated documentation creation and deployment to a Kubernetes cluster. You can read more about it in this Medium post:</p><p><a href="https://medium.com/faun/devops-culture-and-practice-5df063581c49">DevOps: Culture and Practice</a></p><p>It’s the final stage of our pipeline that deploys to the cluster. That’s not really a short feedback loop for a developer.</p><p>Enter <a href="https://github.com/GoogleContainerTools/skaffold">Skaffold</a>.</p><p>It monitors your code for changes, and when a file is saved it rebuilds your Docker images and redeploys the code to the cluster! It forwards the logs (and the web application via the port) to the developer’s local machine too! Pretty cool stuff.</p><p>Let’s look at a simple example.</p><p>Here’s the Flask application calledapp.py. It needs flask and flask-bootstrap4 installing via pip(env) or similar:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a25edb49390c24b03cce038b79011df/href">https://medium.com/media/8a25edb49390c24b03cce038b79011df/href</a></iframe><p>And here’s a (pretty standard) Dockerfile to put the thing in an image:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/81e9866e45f9e721e052ca998ac8fec8/href">https://medium.com/media/81e9866e45f9e721e052ca998ac8fec8/href</a></iframe><p>And here’s the Kubernetes manifest we use to deploy it. Just a Pod — let’s call it pod.yml. We don’t need any fancy stuff like a deployment— we just want to get the container running. Assuming our image will be called docap-test, then the manifest to apply it to our Kubernetes cluster to run it would look a little bit like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1ce75ea70ee0d75b2e84ac0663cc08b7/href">https://medium.com/media/1ce75ea70ee0d75b2e84ac0663cc08b7/href</a></iframe><p>So, if I wanted to deploy this to Kubernetes I’d have to build an image using Docker, and tag and push the image to a registry. Then I’d have to instruct Kubernetes to deploy that image by applying an updated manifest. That’s a bit tedious to do for every single change. Surely there is a way to automate it?</p><p>With Skaffold we first need to run skaffold init and answer yes to write the skaffold.yaml file.</p><p>Skaffold gets the logs from the remote application automagically, but I also want to forward the port (so I can view the web page on my local machine). To do that we have edited that file to add the portForward block (shown below).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2df4d488e72d266253dd6b6b2bcd30cc/href">https://medium.com/media/2df4d488e72d266253dd6b6b2bcd30cc/href</a></iframe><p>I’ve already got <a href="https://minikube.sigs.k8s.io/">Minikube</a> installed and running (Minikube got really really good!). I started it with minikube start. Pretty technical stuff! Anyway, now I just need to tell Skaffold to monitor my code for changes and automatically build and push new images to the cluster. That’s as easy as running:</p><pre>skaffold dev --port-forward</pre><p>Navigating to <a href="http://localhost:5000/Bob">http://localhost:5000/Bob</a> shows us the site running in our Kubernetes cluster and being forwarded to the local machine where we can play about with it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JV8bae-AEjT0bVAQhk6dhg.png" /><figcaption>The site running in our Kubernetes cluster — with the output forwarded to our local machine.</figcaption></figure><p>And… the logs are appearing in the local terminal window too. Magic!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KMAkRZOlWNOJp9pjpHQwww.png" /><figcaption>And the logs are sent back to our local machine too!</figcaption></figure><p>Now, if we change and save a file (while the application is running), we can watch Skaffold automagically rebuild our application. The updated site appears in a few seconds. That’s a really really short feedback loop to get something running in a “production-like” environment.</p><p>What about on Cloud provider “proper” (cough) Kubernetes clusters though? We’ve tried the same on Amazon’s EKS, Microsoft’s AKS and Google’s Kubernetes Engine. You’ll need to create some kind of image registry (or use a public one) and authenticate so you can push images and have the cluster pull them down. But the building and deploying are seamless.</p><p>Skaffold is a great tool. It’s not a replacement for automated tests or Continuous Integration. But it’s definitely a fast, easy tool to allow developers to quickly prototype and test out their code in a cluster. Definitely something we want to play with during future deliveries of the IBM DevOps course. And also something I want to use in my day job!</p><p><em>The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p><strong>Follow us on </strong><a href="https://twitter.com/joinfaun"><strong>Twitter</strong></a><strong> </strong>🐦<strong> and </strong><a href="https://www.facebook.com/faun.dev/"><strong>Facebook</strong></a><strong> </strong>👥<strong> and </strong><a href="https://instagram.com/fauncommunity/"><strong>Instagram</strong></a><strong> </strong>📷 <strong>and join our </strong><a href="https://www.facebook.com/groups/364904580892967/"><strong>Facebook</strong></a><strong> and </strong><a href="https://www.linkedin.com/company/faundev"><strong>Linkedin</strong></a><strong> Groups </strong>💬<strong>.</strong></p><p><strong>To join our community Slack team chat </strong>🗣️ <strong>read our weekly Faun topics </strong>🗞️,<strong> and connect with the community </strong>📣<strong> click here⬇</strong></p><figure><a href="https://www.faun.dev/join/?utm_source=medium.com%2Ffaun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6P3WpLjGv5v1ucm5dgkucg.png" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e573e385cee4" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/shorting-the-feedback-loop-skaffold-e573e385cee4">Shorting the feedback loop: Skaffold</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins on Kubernetes: Moving from Docker-in-Docker to Kaniko]]></title>
            <link>https://faun.pub/jenkins-on-kubernetes-moving-from-docker-in-docker-to-kaniko-b48d1a240349?source=rss-841098de2fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b48d1a240349</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[ibm]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Simon Head]]></dc:creator>
            <pubDate>Wed, 19 Feb 2020 14:49:22 GMT</pubDate>
            <atom:updated>2021-01-05T11:09:56.390Z</atom:updated>
            <content:encoded><![CDATA[<p>Moving to a better build step for images</p><p>In the <a href="https://medium.com/faun/devops-culture-and-practice-5df063581c49">IBM DevOps Culture and Practice training</a>, we currently use Docker-in-Docker within our Kubernetes cluster, initiated from a Jenkins pipeline. Each time we run the course we try to improve on a few aspects of the previous iteration.</p><p>It’s not perfect. For Docker-in-Docker we have to give the build container privileged access to the host. There’s a great summary <a href="https://medium.com/hootsuite-engineering/building-docker-images-inside-kubernetes-42c6af855f25">here</a> and <a href="https://medium.com/01001101/enhance-your-docker-image-build-pipeline-with-kaniko-567afb6cf97c">here</a>.</p><p>Interestingly, the Docker Desktop isn’t the only thing that can create Docker images. <a href="https://github.com/GoogleContainerTools/kaniko">Kaniko</a> is a tool to build container images from a Dockerfile, inside a container or Kubernetes cluster. It executes each command from a Dockerfile in userspace and doesn’t communicate with the Docker daemon. It’s from a <a href="https://www.google.com/">small company</a> that made a search engine a bit like Altavista.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_0m2UW1sLdcTA0lf.png" /><figcaption>The Kaniko logo from <a href="https://github.com/GoogleContainerTools/kaniko">https://github.com/GoogleContainerTools/kaniko</a></figcaption></figure><h4>Jenkins Pipeline</h4><p>In the DevOps course, we have a Jenkins pipeline that runs through a bunch of tasks sequentially. The first is to build a container image, and it’s this stage that currently uses Docker-in-Docker.</p><ul><li><strong>Build:</strong> Use Docker-in-Docker to build an image of a simple Flask Web App that’s developed in the course — move to Kaniko!</li><li><strong>Test:</strong> Lint (stating analysis), functional tests, and “Behaviour Driven Development” tests.</li><li><strong>SonarQube:</strong> More static analysis.</li><li><strong>Documentation:</strong> Generate documentation from the code.</li><li><strong>Deploy:</strong> Deploy the developed app to our environment.</li><li><strong>Performance Test:</strong> Use Gatling to “hammer” the application and measure its response under load.</li></ul><p>Anyway, I digress, it’s the <strong>Build</strong> step we’re talking about in this article.</p><h4>Jenkinsfile Build Step</h4><p>It uses a trigger that runs once a minute to check for changes in the Git repository. The `Build` stage is populated, but the other stages are waiting to be completed later in the course. Let’s take a look at the `Build` stage:</p><pre>pipeline {<br>  agent none</pre><pre>//check every minute for changes<br>  triggers {<br>    pollSCM(&#39;*/1 * * * *&#39;)<br>  }</pre><pre>  stages {<br>    //Build container image<br>    stage(&#39;Build&#39;) {<br>      agent {<br>        kubernetes {<br>          label &#39;jenkinsrun&#39;<br>          defaultContainer &#39;dind&#39;<br>          yaml &quot;&quot;&quot;<br>apiVersion: v1<br>kind: Pod<br>spec:<br>  containers:<br>  - name: dind<br>    image: docker:18.05-dind<br>    securityContext:<br>      privileged: true<br>    volumeMounts:<br>      - name: dind-storage<br>        mountPath: /var/lib/docker<br>  volumes:<br>    - name: dind-storage<br>      emptyDir: {}<br>&quot;&quot;&quot;<br>        }<br>      }<br>      steps {<br>        container(&#39;dind&#39;) {<br>          script {<br>            //we need some extra packages installing<br>            sh &#39;apk -Uuv add make groff less python py-pip&#39;</pre><pre>//we need the AWS command line tools<br>            sh &#39;pip install awscli&#39;</pre><pre>//we need to authenticate with AWS<br>            sh &#39;$(aws ecr get-login --no-include-email --region eu-west-1)&#39;</pre><pre>//tell jenkins where to save the image<br>            //notice this is https:// followed by the repositoryUri you created earlier<br>            docker.withRegistry(&#39;<a href="https://awsaccount.dkr.ecr.eu-west-1.amazonaws.com/app&#39;">https://AWSACCOUNT.dkr.ecr.eu-west-1.amazonaws.com/app&#39;</a>) {</pre><pre>//build the image<br>              def customImage = docker.build(&quot;app:${env.BUILD_ID}&quot;)</pre><pre>//upload it to the registry<br>              customImage.push()<br>            }<br>          } //script<br>        } //container<br>      } //steps<br>    } //stage(build)</pre><pre>    //Test goes here</pre><pre>    //SonarQube goes here</pre><pre>    //Documentation generation goes here</pre><pre>    //Deploy goes here</pre><pre>    //Performance testing goes here<br>  } //stages<br>} //pipeline</pre><p>It uses a Kubernetes agent to spin-up a Pod from the docker:18.05-dind image. It also installs the tooling we need to authenticate and push the built image to Amazon’s Elastic Container Registry. This tooling is downloaded and installed every time we run the pipeline, which is far from ideal. What happens if we try to swap to Kaniko?</p><h4>Kaniko</h4><p>Kaniko is a tool to build container images from a Dockerfile, inside a container or Kubernetes cluster. Kaniko doesn’t depend on a Docker daemon and executes each command within a Dockerfile completely in userspace. We’ve heard about the benefits of Kaniko, but how do we change the `Jenkinsfile` above to use it? Is it easy or hard?</p><p>We’re running on AWS, so we need to tell Kaniko how to authenticate with Amazon’s Elastic Container Registry. That’s easy enough to do by adding a new Config-Map to our cluster. We create a YAML file called `kaniko.yml` populated with:</p><pre>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: docker-config<br>data:<br>  config.json: |-<br>    {<br>       &quot;credsStore&quot;: &quot;ecr-login&quot;<br>    }</pre><p>and apply it to our Kubernetes cluster with `kubectl apply -f kaniko.yml`. That replaces all the tooling lines we used to need for the AWS CLI, since Kankio knows how to authenticate with ECR already. Then we just need to replace the Build step in our `Jenkinsfile` with:</p><pre>stage(&#39;Build&#39;) {<br>  agent {<br>    kubernetes {<br>      label &#39;jenkinsrun&#39;<br>      defaultContainer &#39;builder&#39;<br>      yaml &quot;&quot;&quot;<br>kind: Pod<br>metadata:<br>  name: kaniko<br>spec:<br>  containers:<br>  - name: builder<br>    image: gcr.io/kaniko-project/executor:debug<br>    imagePullPolicy: Always<br>    command:<br>    - /busybox/cat<br>    tty: true<br>    volumeMounts:<br>      - name: docker-config<br>        mountPath: /kaniko/.docker<br>  volumes:<br>    - name: docker-config<br>      configMap:<br>        name: docker-config<br>&quot;&quot;&quot;<br>    }<br>  }</pre><pre>steps {<br>      script {<br>        sh &quot;/kaniko/executor --dockerfile `pwd`/Dockerfile --context `pwd` --destination=AWSACCOUNT.dkr.ecr.eu-west-1.amazonaws.com/app:${env.BUILD_ID}&quot;<br>    } //container<br>  } //steps<br>} //stage(build)</pre><p>And we’re done! It mounts the ConfigMap and points to the Kaniko project’s executor. Pretty seamless to be honest, and much neater!</p><h4>Conclusion</h4><p>It’s a pretty easy change to our Pipeline and we implemented it into the IBM DevOps course. It shows how to build an image with something other than Docker since we no longer rely on the Docker Daemon. It integrates nicely with our pipeline, and with our Kubernetes cluster.</p><p>We’re about to test it out on the next DevOps course in February!</p><p><strong>update:</strong> We successfully tested this in our Leicester session with the IBM CIC.</p><p><em>The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p>👋 <a href="https://faun.dev/join"><strong>Join FAUN today and receive similar stories each week in your inbox!</strong></a><strong> </strong>️ <strong>Get your weekly dose of the must-read tech stories, news, and tutorials.</strong></p><p><strong>Follow us on </strong><a href="https://twitter.com/joinfaun"><strong>Twitter</strong></a><strong> </strong>🐦<strong> and </strong><a href="https://www.facebook.com/faun.dev/"><strong>Facebook</strong></a><strong> </strong>👥<strong> and </strong><a href="https://instagram.com/fauncommunity/"><strong>Instagram</strong></a><strong> </strong>📷 <strong>and join our </strong><a href="https://www.facebook.com/groups/364904580892967/"><strong>Facebook</strong></a><strong> and </strong><a href="https://www.linkedin.com/company/faundev"><strong>Linkedin</strong></a><strong> Groups </strong>💬</p><figure><a href="https://www.faun.dev/join?utm_source=medium.com/faun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_cT0_laE4iPcqW1qrbstAg.gif" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b48d1a240349" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/jenkins-on-kubernetes-moving-from-docker-in-docker-to-kaniko-b48d1a240349">Jenkins on Kubernetes: Moving from Docker-in-Docker to Kaniko</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a DevOps Teaching Classroom environment for IBM – Part II]]></title>
            <link>https://faun.pub/building-a-devops-teaching-classroom-environment-for-ibm-part-ii-bcb1c823284?source=rss-841098de2fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/bcb1c823284</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ibm]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Simon Head]]></dc:creator>
            <pubDate>Tue, 28 Jan 2020 09:52:40 GMT</pubDate>
            <atom:updated>2020-01-29T20:28:46.233Z</atom:updated>
            <content:encoded><![CDATA[<h4>A (continued) discussion of some of the technologies we’ve picked for our DevOps teaching environment.</h4><p>This article follows on from <a href="https://medium.com/@simon.j.head/building-a-devops-teaching-classroom-environment-for-ibm-part-i-78104c564250">Part I</a> and discusses the technology choices we made for the <a href="https://medium.com/faun/devops-culture-and-practice-5df063581c49">DevOps Culture and Practice Workshop</a> and some discussion of where we will take the course looking forward.</p><p>In the previous article, we looked at why we’re using Virtual Machines on the course and the possible technologies we could use to replace them in the future. In this article, we’ll look at</p><ul><li>the use of Kubernetes, Docker, and Helm,</li><li>the Cloud provider,</li><li>Programming Language,</li><li>Jenkins,</li><li>GitHub</li></ul><p>and finally anything else we can think of.</p><h4>Kubernetes, Docker &amp; Helm</h4><p>We use containers heavily within the course. They’re easier to deploy and maintain and get started with than installing all the software ourselves on the course (remember, we have a mix of skill levels).</p><p><a href="https://kubernetes.io/">Kubernetes</a> is the market-leading container-orchestration system for automating application deployment, scaling, and management. There are alternatives, like Amazon’s <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html">Elastic Container Service</a> but Kubernetes works on any Cloud provider and allows us to migrate the course away from AWS, or let us use a mix of Cloud providers as many of our clients do. For now Kubernetes seems to be the logical choice, and that doesn’t show any sign of changing soon.</p><p>We use Helm for installing software such as <a href="https://prometheus.io/">Prometheus</a>, <a href="https://grafana.com/">Grafana</a> &amp; <a href="https://jenkins.io/">Jenkins</a>. In December 2019 we migrated from Helm 2 to Helm 3. This was great (and easy!), it means we don’t need to create a service account and we don’t need Tiller, the server-side component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EpGJz1C3MihP7VTPtI0j7Q.png" /><figcaption>Using Helm and the Helm Hub for installing third party software like Prometheus, Grafana and Jenkins.</figcaption></figure><p>For the container engine, we’re currently using Docker, but <a href="http://crunchtools.com/why-no-docker/">discussions</a> over its big fat daemon mean that we might move to <a href="https://podman.io/">Podman</a> (and <a href="https://github.com/containers/skopeo">skopeo</a>) in the future. After all, it’s what RedHat have access to in <a href="https://www.redhat.com/en/blog/red-hat-enterprise-linux-8-beta-new-set-container-tools">RedHat 8</a>. So if we move to that Operating System, then it would be a logical choice.</p><p>Related to the use of Docker, earlier this month we have moved away from using Docker-in-Docker for building our images and instead are using <a href="https://github.com/GoogleContainerTools/kaniko">Kaniko</a>. There’s a nice comparison of build technologies by <a href="https://medium.com/u/a659cf7628b8">Nico Meisenzahl</a> <a href="https://medium.com/01001101/enhance-your-docker-image-build-pipeline-with-kaniko-567afb6cf97c">here</a>. The reason for the move is simple, Kaniko doesn’t depend on a Docker daemon and executes each command within a Dockerfile completely in userspace so we can reduce the complexity (and increase the security) in our build pipeline. It plays a bit more nicely when running from within our Kubernetes cluster.</p><h4>Amazon Web Services</h4><p>Do we even need to use the Cloud at all? Until the end of 2018, the entire course ran within a single Ubuntu Virtual Machine on each participant’s laptop. This included the Jenkins build and deployment steps, but before the course was redeveloped to include Kubernetes. The Cloud has become such an essential force, that every project I’ve worked on over the last five years has used it.</p><blockquote>Skills in Cloud technologies and mindests are vital to the success of our clients and our business, I don’t think I’d want to remove it. The cost isn’t prohibitive compared with our time as consulatants! In fact, it comes to tens of dollars per day per participant. Not a huge expense.</blockquote><p>That said, one comment we often (as in pretty much <em>always</em>) receive is that the participants have nothing to “take-home”. They keep their code (on an Enterprise GitHub server), and the course booklet with all the steps in (printed and on-line formats) but the infrastructure is only funded during the three days of the course. Having a process or script that copies the work-in-progress into a local Kubernetes cluster would be cool, wouldn’t it? We could then provide instructions/scripts for moving everything they’ve done to a <a href="https://kubernetes.io/docs/setup/learning-environment/minikube/">Minikube</a> or <a href="https://microk8s.io/">Micro8ks</a> (or other) Kubernetes cluster.</p><p>Now that we’ve decided to keep the Cloud aspect. Why <a href="https://aws.amazon.com/">Amazon Web Services</a>, why not <a href="https://azure.microsoft.com/en-gb/">Microsoft Azure</a>, or <a href="https://cloud.google.com/">Google Cloud Platform</a> or even (the elephant in the room for an IBM course) <a href="https://www.ibm.com/uk-en/cloud">IBM Cloud</a>? They all offer managed Kubernetes cluster tools, so how do we pick one? We basically rely on the Cloud provider for three things:</p><ul><li>Identity management and access permissions for the participants</li><li>A container registry (though <a href="https://medium.com/u/e2f62e03fa67">Roy Mitchley</a> has been working on updating the course to build our own Nexus repository within the cluster — so potentially we don’t <em>need</em> this anymore)</li><li>Provisioning of a managed Kubernetes service</li></ul><p>This is such a big and interesting topic, we’ll probably come back to it in the future. Cost, speed and ease-of-use should all factor-in. For now, we’re using AWS, essentially for historical reasons and because often we work with clients who have data that must be stored within the UK. However, all the providers above have London data centers. We could potentially use Google, Azure, AWS or IBM Cloud or all four!</p><p>If we’re worried about cost, then interestingly, AWS is the only one charging a fee for the control plane. Earlier this month (Jan 2020) Amazon reduced the hourly cost from $0.20 to $0.10 (<a href="https://aws.amazon.com/about-aws/whats-new/2020/01/amazon-eks-announces-price-reduction/">https://aws.amazon.com/about-aws/whats-new/2020/01/amazon-eks-announces-price-reduction/</a>). For our three day course though, that’s an always-on expense (the Virtual Machines themselves are small and we _could_ auto-scale them down to zero out-of-hours.</p><p>For provisioning the cluster within AWS, we’ve been through a few iterations of the course using <a href="https://github.com/kubernetes/kops">Kops</a>, and then <a href="https://aws.amazon.com/eks/">EKS</a>. Originally this was via the Cloud Formations templates on Amazon’s website but now we’re using <a href="https://eksctl.io/">eksctl</a> which is definitely the quickest way we’ve been able to give people access to their own Kubernetes cluster in Amazon Web Services. It’s just a shame it takes about 15 minutes to run through. To be fair it does a lot, but that’s still a long time when we only have a few days.</p><p>Since we normally have 25 participants in about five groups we could even imagine using a few Cloud providers. At the moment we’re cloud-agnostic with the exception of the container registry we use. So once the cluster is provisioned we’re golden. Something for the future perhaps? A different Cloud provider per table?</p><h4>Python &amp; Flask</h4><p>Python sits firmly in top place in the newest annual ranking of popular programming languages by IEEE Spectrum. <a href="https://www.zdnet.com/article/programming-language-popularity-python-tightens-its-grip-at-the-top/">https://www.zdnet.com/article/programming-language-popularity-python-tightens-its-grip-at-the-top/</a></p><p>We’re currently building two things within our very simple Python application:</p><ol><li>A very simple API that returns some text when called with the user’s name</li><li>The same as above, but a webpage that’s built using <a href="https://getbootstrap.com/">bootstrap</a>.</li></ol><p>Here’s what we currently do with app.py:</p><pre>from flask import Flask, render_template, jsonify<br>from flask_bootstrap import Bootstrap</pre><pre>app = Flask(__name__)</pre><pre>Bootstrap(app)</pre><pre># The website version<br>@app.route(&#39;/&#39;)<br>@app.route(&#39;/&lt;username&gt;&#39;)<br>def home_page(username=&#39;World!&#39;):<br>    return render_template(&#39;home.html&#39;, username=username)</pre><pre># The json microservice version<br>@app.route(&#39;/api/hello/&#39;)<br>@app.route(&#39;/api/hello/&lt;username&gt;&#39;)<br>def api(username=&#39;World!&#39;):<br>    return jsonify({&#39;Hello&#39;: username})</pre><p>We use pipenv to install the dependencies:</p><pre>pipenv install flask Flask-Bootstrap4</pre><p>and run the app locally (after setting up our pipenv shell) with (note that you’ll need a simple HTML template intemplates/home.html file for the code above to work for you):</p><pre>FLASK_APP=app.py flask run</pre><p>After that, navigating to <a href="http://localhost:5000/api/hello/user">http://localhost:5000/api/hello/user</a> in a web browser presents the user with their little application (hint: Firefox has a really cool JSON viewer).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hi87E4ejKCbHz0N1lkFAtA.png" /><figcaption>Firefox viewing our little JSON interface</figcaption></figure><p>The next section of the course puts this inside a Docker container, but that’s enough to give them a taste of developing!</p><p>Now I know what you’re thinking, and I agree, it’s a bit weird to have both in the same tiny application, but it acts as an example. Most of the people who come on the course aren’t developers (we have a high number of more traditional project managers who want to see what this “Agile” thing is all about. So it has to be simple enough that people without a programming background can get stuck in to. Remember, building a web app is the first thing we do after setting up a Virtual Machine. We don’t want to scare them off!</p><p>For the future, I’ve been thinking that we could reduce the scope of this to just the API and remove the webpage from <em>this</em> app. We could then use the excellent <a href="https://fastapi.tiangolo.com/">FastAPI</a> framework and its fancy built-in <a href="https://swagger.io/">swagger</a>? Let’s look at the example from the FastAPI documentation (called main.py):</p><pre>from fastapi import FastAPI<br><br>app = FastAPI()<br><br><br>@app.get(&quot;/&quot;)<br>def read_root():<br>    return {&quot;Hello&quot;: &quot;World&quot;}<br><br><br>@app.get(&quot;/items/{item_id}&quot;)<br>def read_item(item_id: int, q: str = None):<br>    return {&quot;item_id&quot;: item_id, &quot;q&quot;: q}</pre><p>We need to install the dependencies with:</p><pre>pipenv install fastapi uvicorn</pre><p>Then we can start the interface running (from within our pipenv shell):</p><pre>uvicorn main:app --reload</pre><p>Benefits? Well, we would get interactive API docs (on the /docs endpoint) and type checks (!!) and automagic reloads while we edit the code without having to do anything.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4BSeosuH63jPv46KwK2l-w.png" /><figcaption>Automatic swagger documentation from our code using FastAPI.</figcaption></figure><p>Or maybe we want to move to <a href="https://golang.org/">Go</a>? It seems remarkably simple to set up a web server (without any dependencies needed at all) with that. For example, if we have a file called app.go with this in it:</p><pre>package main</pre><pre>import &quot;net/http&quot;</pre><pre>func landingPage(w http.ResponseWriter, r *http.Request) {<br>    w.Write([]byte(&quot;Hello World&quot;))<br>}</pre><pre>func main() {<br>    http.HandleFunc(&quot;/&quot;, landingPage)<br>    http.ListenAndServe(&quot;:8080&quot;, nil)<br>}</pre><p>Then you run it with:</p><pre>go run app.go</pre><p>And if you navigate in a web browser to http://localhost:8080/ you’ll see “Hello World” printed to the screen! Not bad!</p><p>In summary, I’d like to transition us to FastAPI from Flask and remove the confusing web app and JSON API from the same codebase. I’d probably also like to see them do something a bit more real-world! Longer-term I’d really like the course to use something like the <a href="https://github.com/dockersamples/example-voting-app">Docker Voting App</a>. Several distinct microservices that work together. And that might help us decide between Python and Go, or maybe even better we could use a mixture of both!</p><h4>Jenkins</h4><p>Jenkins takes center stage in the course. After provisioning our cluster, we then use Helm to install Jenkins along with the <a href="https://jenkins.io/projects/blueocean/">Blue Ocean plugin</a>. Why Blue Ocean? This is used to build-out the pipeline of our Python application, performing the testing then deploy the finished product and expose it to the world. It’s a really lovely graphical representation of the build. It links nicely to tests and reports and can easily be understood by the less technical people in the room. Jenkinsfiles are used and stored in Git.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*orH5O1FoCOHfa9SbFi8mtQ.png" /><figcaption>Jenkins Blue Ocean pipeline from a Jenkinsfile. Really nice visualization of the pipeline, access to the logs, access to the test results and any build artifacts.</figcaption></figure><p>We could use <a href="https://about.gitlab.com/blog/2019/07/12/guide-to-ci-cd-pipelines/">GitLab CI pipelines</a>, but that would mean setting up Gitlab — which is another step that isn’t deploying our application. It’s not a lot of work, and there is a Helm chart. But it is another step.</p><h4>GitHub</h4><p>We use an IBM Enterprise GitHub. Git is an obvious choice, though other version control systems exist. We mostly use <a href="https://about.gitlab.com/">Gitlab</a> on client sites (the client likes to store their own files). But IBM provides a centrally managed GitHub for all employees. Everyone gets an account by default, so it’s easy to get access. As per the above, we could provide our own Gitlab. But that’s not part of the main course. It’s probably worth us having a list of how to install some standard and useful applications though — let’s put that in an appendix.</p><h4>Grafana, Prometheus &amp; Gatling</h4><p>We use <a href="https://prometheus.io/">Prometheus</a> (installed via the Helm chart) for our monitoring. We’ve used it on a lot of client projects. It’s extremely good at infrastructure and application monitoring. When coupled with <a href="https://grafana.com/">Grafana</a> you get some beautiful and easy to maintain and build dashboards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7RJlRUwOGoWX-tdcZE4ZQA.png" /><figcaption>Setting up Grafana as a dashboard in our little project</figcaption></figure><h4>What else?</h4><p>There are a number of other topics that I’d like to incorporate into the course. Of course, we need to maintain a balance between keeping it simple and easy to get started with, and introducing new and cool stuff! Let’s quickly chat about some of the things that might make it into future versions of the course:</p><p><strong>Micro Services: </strong>I’ve mentioned above that I don’t like having a web page and JSON API within the same code base. It’d be really cool if we could introduce the class to a more microservice style architecture. Maybe something akin to the <a href="https://github.com/dockersamples/example-voting-app">Docker Voting App</a> (i.e. something like a frontend, queue, worker, database)? We could even encourage collaboration by having each table (about five people) design, develop, test one component and then attempt to integrate them together.</p><p><strong>Service Mesh:</strong> <a href="https://istio.io/">Istio</a> is cool and let us try some of the amazing things like canary deployments and encryption in transit. It has a bit of a learning curve on top of Kubernetes. But maybe we could put an advanced section in? I’d love to show it sending certain user names or a percentage of users to the “new” version of the site. Also, our clients are hearing “service mesh” and “sidecar” a lot more. It’d be good to be able to show these in action!</p><p><strong>GraphQL: </strong>A possible alternative to our JSON API? <a href="https://graphql.org/">GraphQL</a> allows you to be more efficient with your API calls.</p><p><strong>OpenShift:</strong> This is a big one! <a href="https://www.openshift.com/">OpenShift</a> is a family of containerization software developed by Red Hat. It’s a layer on top of Kubernetes. I recently became a <a href="https://www.redhat.com/rhtapps/services/verify/?certId=190-324-053">Red Hat Certified Specialist in OpenShift Application Development</a>. It’s a fantastic product, and we definitely need to incorporate it into the course. I’d love for all the participants to also get hands-on with the product, but to get us started I think we need a couple of hours session showing it in use! After that, we can decide if we need to incorporate it into the course from the beginning — which is probably a lot of work to restructure!</p><h4>Summary</h4><p>I think that’s helped to organize my thoughts, here’s the direction I’d like to take the course in:</p><ul><li>Do a trial run with Amazon Workspace instead of local Virtual Machines</li><li>Move us to microservices — like the Docker Voting App — maybe a mini-project per table on one of the days and then an integration bit. Do we need a 4th day for the course?</li><li>Separate the web from the API and use FastAPI</li><li>Develop procedures or tooling to migrate (at the end of the course) to a local MiniKube cluster</li><li>Investigate using alternative Cloud Providers, cost and ease-of-use</li><li>Add a two-hour session on OpenShift</li></ul><p>I hope you found that interesting!</p><p><em>The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p><strong>Follow us on </strong><a href="https://twitter.com/joinfaun"><strong>Twitter</strong></a><strong> </strong>🐦<strong> and </strong><a href="https://www.facebook.com/faun.dev/"><strong>Facebook</strong></a><strong> </strong>👥<strong> and </strong><a href="https://instagram.com/fauncommunity/"><strong>Instagram</strong></a><strong> </strong>📷 <strong>and join our </strong><a href="https://www.facebook.com/groups/364904580892967/"><strong>Facebook</strong></a><strong> and </strong><a href="https://www.linkedin.com/company/faundev"><strong>Linkedin</strong></a><strong> Groups </strong>💬<strong>.</strong></p><p><strong>To join our community Slack team chat </strong>🗣️ <strong>read our weekly Faun topics </strong>🗞️,<strong> and connect with the community </strong>📣<strong> click here⬇</strong></p><figure><a href="https://www.faun.dev/join/?utm_source=medium.com%2Ffaun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6P3WpLjGv5v1ucm5dgkucg.png" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bcb1c823284" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/building-a-devops-teaching-classroom-environment-for-ibm-part-ii-bcb1c823284">Building a DevOps Teaching Classroom environment for IBM – Part II</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a DevOps Teaching Classroom environment for IBM – Part I]]></title>
            <link>https://faun.pub/building-a-devops-teaching-classroom-environment-for-ibm-part-i-78104c564250?source=rss-841098de2fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/78104c564250</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[vm]]></category>
            <category><![CDATA[ibm]]></category>
            <dc:creator><![CDATA[Simon Head]]></dc:creator>
            <pubDate>Mon, 20 Jan 2020 16:22:43 GMT</pubDate>
            <atom:updated>2020-01-28T22:43:27.935Z</atom:updated>
            <content:encoded><![CDATA[<h4>A discussion of some of the technologies we’ve picked for our DevOps teaching environment.</h4><p>We need to establish a homogenous development (teaching) environment when we run the course. Here are some of the technologies we’ve decided on and why, and our plans for the future.</p><p>At IBM we run a <a href="https://medium.com/faun/devops-culture-and-practice-5df063581c49">DevOps: Culture and Practice</a> course once a quarter. You can see some details on the tools, techniques, and topics that we cover by following that link. The focus is on instilling the culture, but also on giving hands-on experience with <em>some </em>modern DevOps<em> </em>tools over three days. It’s aimed at a mix of people from Business Analysts to Project Managers to Developers (with varying levels of experience too, from Apprentices to Executive Architects). With that in mind we’ve had to make some choices about technologies:</p><ul><li>that the participants may come across in their day jobs, i.e. people actually use them in the real world.</li><li>have a shallow learning curve, i.e. are easy to get going with during the hands-on sessions.</li></ul><p>We’ll go into a bit more detail about the choices we made, why we made them and possible things we’d like to improve and change in the future. With only three days to run the course, we don’t have time to get into too much detail but we want to give a taste of the full Develop, Build &amp; Test (and iterate) lifecycle the current iteration of the course uses the following technologies:</p><ul><li>Oracle VirtualBox &amp; Ubuntu Virtual Machines</li><li>Amazon Web Services (EKS, eksctl and ECR)</li><li>Python &amp; Flask (and pytest, Sphinx, and behave)</li><li>Kubernetes, Docker &amp; Helm</li><li>Jenkins</li><li>GitHub</li><li>Grafana, Prometheus &amp; Gatling</li></ul><p>We’ll start the discussion in this post, and continue over the next few weeks.</p><h4>Oracle VirtualBox &amp; Ubuntu Virtual Machines</h4><p>One thing that’s super useful for the course is a “common” environment that we can help troubleshoot live in the class. We can install the command line tools, <a href="https://www.python.org/">Python</a> and all the dependencies that we need onto a clean machine. Which greatly helps us when we need to debug any issues.</p><p>IBM consultants use a mixture of Thinkpads (Windows 7, 10 and RedHat Enterprise Linux) and Apple Mac hardware (anywhere from a MacBook Air to a 15&quot; MacBook Pro — hopefully I’ll see a 16&quot; MacBook Pro in the wild soon) so we need an environment where everything is the “same”. But also one where the performance isn’t terrible. A bit like you would for developers in a team if we were running a real software project.</p><p>Currently, we send round instructions the week before the course asking each participant to download and install <a href="https://www.virtualbox.org/">Oracle VirtualBox</a>.</p><p>What about the Virtual Machine itself? We currently have a <a href="https://lubuntu.net/">Lubuntu</a> VM We used Ubuntu since the start of the course but Lubuntu seems to perform a bit better and has a smaller standard installation. We’ve created an image with a standard user and password and installed the VirtualBox guest additions so that everything works nicely. About twice a year we update the image to the latest version of the Operating System.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WVjMIZv8GmGLp46Aeu3f6w.png" /></figure><p>The tools used by the course are actually installed by an <a href="https://www.ansible.com/">Ansible</a> role (stored on the internal IBM Enterprise GitHub), so we can maintain that separately to the Virtual Machine image. Running it to install the prerequisite software is the first task the participants do after downloading the Virtual Machine and importing it into VirtualBox.</p><p>What’s wrong with our current Image? It’s a large multi-gigabyte file and most participants have a perfectly good operating system already. We also only really use the text editor (<a href="https://code.visualstudio.com/">Visual Studio Code</a>) and a terminal (to run the command-line tools such as <a href="https://eksctl.io/">eksctl</a> and <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/">kubectl</a>). We also tend to have a bit of “interference” between the corporate VPN and the Virtual Machine.</p><p>So what alternatives are we considering?</p><ul><li><strong>Native Operating System</strong> – We’d have to support Windows 10, macOS and Linux (RedHat, Ubuntu). This would make debugging potentially more work for the demonstrators (e.g. Python versions, Docker versions, web browsers, and versions). But it’s not impossible. It would be better to make each participant&#39;s development environment uniform though. Otherwise, who knows the type of bizarre environment-related issues we would come across. I think it’s fair to say that I’m not a fan of this option. There’s just too much potential for user/environment issues that aren’t part of the core course.</li><li><strong>Slimmer Ubuntu VM</strong> – Again we need to install a virtualization software like VirtualBox, but we could probably remove a load of things from the VM image to reduce the download size. Is it that important? So long as we get everyone to download the course VM before the course starts (it’s given as part of the homework) then probably not. Given the <a href="https://www.redhat.com/en/ibm">situation</a> between IBM and RedHat, we should probably move to RedHat Enterprise Linux or CentOS though…</li><li><strong>Multipass</strong> – I recently came across <a href="https://multipass.run/">multipass</a> and it’s a really neat way to spin-up a command-line Ubuntu box very very easily. All you need to do is install the tool (in a similar way to how we currently install VirtualBox). Of course, this means sticking with Ubuntu and it means we’d have to install the code editor natively. But it does have support for mounting drives, so maybe the course participants could mount a drive to the main Operating System and run the editor there and run all the other commands in our multipass Virtual Machine? The Ansible role to install the tooling already works with Ubuntu, so this should be minimal changes to the course and might help with performance issues as we don’t have the Graphical Interface running in the Virtual Machine.</li><li><strong>Containers</strong> – We could have the developer tools in a container and mount a shared directory and the user could have a local IDE installed like Visual Studio Code. If the users installed docker, could we put the tools into a container a bit like IBM do with their <a href="https://cloud.ibm.com/docs/cli?topic=cloud-cli-using-idt-from-docker&amp;locale=en-us">IBM cloud tooling container</a>? This would be similar to the multipass solution, but would probably need some work on Windows? Some of the tasks in the workshop involving building Docker containers locally, so this solution might not work so easily for us.</li><li><strong>Amazon Workspaces</strong> – <a href="https://aws.amazon.com/workspaces/">Amazon Workspaces</a> is a managed Virtual desktop solution. You can access them via the web or through a client. We’ve used them on projects in the past and they work remarkably well. It’s possible to set up an Amazon Linux instance very easily, and we’ve already modified our Ansible scripts to run on this. We’ve tried it once for the course when one participant couldn’t get the Virtual Machine working. I have two main concerns about this though. The first is network bandwidth. We typically run the course from either an IBM location (with excellent Internet connectivity) or a hotel (with somewhat variables results). Having 25 people stream a desktop over the WiFi might not be such a good idea (at the moment we access websites and start containers running only, via the internet). The second concern is that the participants don’t have anything to take home. With the current VM, they keep their working software and bash history! The only way we can combat these is to try it out I think!</li></ul><p>For the course in 2019 we used VirtualBox and a vanilla Lubuntu Virtual Machine. We installed the tooling via Ansible. We’ve noticed that the Virtual Machine can be sluggish on certain laptops, and can interfere with some of the standard IBM corporate tooling. Since we build containers within the Virtual Machine, I think I’d like to stick with that rather than the “<strong>Containers</strong>” solution above. I’d really like to move us on to Virtual Desktops (at least one of the other courses has done this) but this may lock-us-in to Amazon. That said, AWS is still a major player and our clients use it. I also have some concerns over the network bandwidth, but this varies hotel-to-hotel. So maybe for the next iteration of the course, we’ll try Amazon Workspaces, with the Virtual Machine as a fall-back option. Until that’s been tested, I don’t think we need to “slim-down” the Virtual Machine image. If that works out then great! If not, then we may try to move to multipass instead of VirtualBox for ease of use!</p><p>Part II will follow soon and will cover some more of the topics from:</p><ul><li>Amazon Web Services (EKS, eksctl and ECR)</li><li>Python &amp; Flask (and pytest, Sphinx, and behave)</li><li>Kubernetes, Docker &amp; Helm</li><li>Jenkins</li><li>GitHub</li><li>Grafana, Prometheus &amp; Gatling</li></ul><p>You can find <a href="https://medium.com/@simon.j.head/building-a-devops-teaching-classroom-environment-for-ibm-part-ii-bcb1c823284">Part II here.</a></p><p><em>The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p><strong>Follow us on </strong><a href="https://twitter.com/joinfaun"><strong>Twitter</strong></a><strong> </strong>🐦<strong> and </strong><a href="https://www.facebook.com/faun.dev/"><strong>Facebook</strong></a><strong> </strong>👥<strong> and </strong><a href="https://instagram.com/fauncommunity/"><strong>Instagram</strong></a><strong> </strong>📷 <strong>and join our </strong><a href="https://www.facebook.com/groups/364904580892967/"><strong>Facebook</strong></a><strong> and </strong><a href="https://www.linkedin.com/company/faundev"><strong>Linkedin</strong></a><strong> Groups </strong>💬<strong>.</strong></p><p><strong>To join our community Slack team chat </strong>🗣️ <strong>read our weekly Faun topics </strong>🗞️,<strong> and connect with the community </strong>📣<strong> click here⬇</strong></p><figure><a href="https://www.faun.dev/join/?utm_source=medium.com%2Ffaun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6P3WpLjGv5v1ucm5dgkucg.png" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78104c564250" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/building-a-devops-teaching-classroom-environment-for-ibm-part-i-78104c564250">Building a DevOps Teaching Classroom environment for IBM – Part I</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps: Culture and Practice]]></title>
            <link>https://faun.pub/devops-culture-and-practice-5df063581c49?source=rss-841098de2fd6------2</link>
            <guid isPermaLink="false">https://medium.com/p/5df063581c49</guid>
            <category><![CDATA[ibm]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Simon Head]]></dc:creator>
            <pubDate>Mon, 02 Dec 2019 12:05:29 GMT</pubDate>
            <atom:updated>2019-12-09T18:02:04.646Z</atom:updated>
            <content:encoded><![CDATA[<p>Once a quarter a group of roughly 25 IBMers from developers, to project managers, take part in the “<strong>DevOps: Culture and Practice</strong>” training.</p><p>The participants came from all over Europe, and include three Instructors (<a href="https://medium.com/u/e2f62e03fa67">Roy Mitchley</a>, <a href="https://medium.com/u/639f9f2f38f7">Eddie Hartman</a> &amp; <a href="https://medium.com/u/841098de2fd6">Simon Head</a>) and this time an official observer in <a href="https://medium.com/u/54ba9edcac21">Thoralf J. Klatt</a>. Version three of the course came into being in early 2019 after being modernised. We moved the focus more to native Cloud and container development. This delivery of the course was version 3.4 and each time it’s different! We met in Greenwich, but don’t mention the timezone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cdc2FidkV81sgLcGpDGsXQ.jpeg" /><figcaption>Working in small, self-organising teams and presenting back to the room.</figcaption></figure><p>We do a whistle-stop tour of the tooling but the real value in the course is bringing people together. <a href="https://www.post-it.com/3M/en_US/post-it/">Post-it</a> notes are, of course, lavishly applied all over the walls of the hotel!</p><p>So what do we cover? We set up our development environments using <a href="https://www.ansible.com/">Ansible</a>. This ensures that everyone in the room starts from the same software stack. We move from building a small <a href="https://www.python.org/">Python</a> Web application using <a href="https://flask.palletsprojects.com/en/1.1.x/">Flask</a> and <a href="https://getbootstrap.com/">Bootstrap</a> to packaging and running it inside a <a href="https://www.docker.com/">Docker</a> container. Of course, we store all the code on <a href="https://github.com/">GitHub</a>, including that used to build the <a href="https://en.wikipedia.org/wiki/Infrastructure_as_code">infrastructure</a>! We each build a <a href="https://kubernetes.io/">Kubernetes</a> Cluster using <a href="https://aws.amazon.com/eks/">Amazon’s EKS</a> (using <a href="https://eksctl.io/">eksctl</a>), and then use <a href="https://helm.sh/">Helm</a> to deploy <a href="https://jenkins.io/">Jenkins</a>. We use the <a href="https://jenkins.io/doc/book/blueocean/">Blue Ocean</a> Jenkins plugin to start building a <a href="https://jenkins.io/doc/book/pipeline/">pipeline</a> that we use for the rest of the course.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BVcBbaqV4Q17lC-BBi2tDw.png" /><figcaption>The build pipeline that we’ve developed over the three days. The build stage creates a Docker image, the Test stages run our static analysis, functional and BDD tests. We then generate some documentation from the code comments and finally deploy the application into our Kubernetes cluster.</figcaption></figure><p>By the end of the three-day course, each participant has put together a Jenkins pipeline that bundles our application into a container, performs <a href="https://www.pylint.org/">static analysis</a>, performs automated testing using both functional testing and <a href="https://en.wikipedia.org/wiki/Behavior-driven_development">Behaviour Driven Development</a> (BDD) testing, and a quick check using <a href="https://www.sonarqube.org/">Sonarqube</a>. After that, the pipeline automatically generates documentation from the code comments using <a href="http://www.sphinx-doc.org/en/master/">Sphinx</a>, and deploys the code into our Kubernetes Cluster along with a load balancer to allow access for the world. We add both cluster and application monitoring using <a href="https://prometheus.io/">Prometheus</a> and <a href="https://grafana.com/">Grafana</a>. Finally, we do a quick load test of the system using <a href="https://gatling.io/">Gatling</a>.</p><p>What about the culture side though? The whole course is managed on a <a href="https://en.wikipedia.org/wiki/Kanban_(development)">Kanban</a> board — showing what we’ve achieved, what we’re currently doing and what’s left to do, even the dinner and beer sessions!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mF4pzs_A3pj5vVBzRFbDFA.jpeg" /><figcaption><a href="https://medium.com/u/e2f62e03fa67">Roy Mitchley</a> busy at work moving things from “todo” to “doing” to “done”.</figcaption></figure><p>We introduce topics such as <a href="https://www.atlassian.com/continuous-delivery/principles/value-stream-mapping">value stream mapping</a>, <a href="https://en.wikipedia.org/wiki/Test-driven_development">Test Driven Development</a>, <a href="https://12factor.net/">12-factor applications</a>, <a href="https://en.wikipedia.org/wiki/Extreme_programming">Extreme Programming</a>, <a href="https://en.wikipedia.org/wiki/Pair_programming">pair programming</a>, <a href="https://en.wikipedia.org/wiki/Mob_programming">mob programming</a>, <a href="https://en.wikipedia.org/wiki/Agile_software_development">Agile</a>, <a href="https://www.scrum.org/resources/what-is-scrum">Scrum</a>, <a href="https://www.scaledagile.com/enterprise-solutions/what-is-safe/">SAFE</a> and always show the awesome “<a href="https://www.youtube.com/watch?v=502ILHjX9EE">Agile Product Ownership in a Nutshell</a>” video from <a href="https://medium.com/u/3ccad081c81a">Henrik Kniberg</a>. The idea is to introduce the topics so the students know they exist and can research them after the course. We don’t have enough time to go into them in too much detail, no matter how much we’d love to!</p><p>We use <a href="https://slack.com/intl/en-gb/">Slack</a> to communicate and the lab sessions are accompanied by a soundtrack that’s crowd-sourced (within the room) via <a href="https://outloud.dj/">Outloud</a>. The participants up-vote (or more likely down-vote) <a href="https://www.kylie.com/">my song selections</a>. Meanwhile, Eddie documents everything we’ve done on “The Big Picture” a dynamic board that grows as we cover topics and tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*404dfDT6UO-jvLnciAh6NQ.jpeg" /><figcaption>The Big Picture: What we’ve covered so far in the three-day course beautifully illustrated by <a href="https://medium.com/u/639f9f2f38f7">Eddie Hartman</a>. This grows and grows until it encompasses the whole wall!</figcaption></figure><p>To end the three-day workshop the participants take part in a quiz using <a href="https://kahoot.com/">Kahoot</a>! We call it the certification at the end of the course. It covers the serious aspects of the course, but we inject a few questions specific to that delivery. For example what time was dinner booked for, and what time did we manage to eat. Just to see if everyone was paying attention…</p><p>We encourage anonymous feedback on how the course is going every day. Our retrospective happens as the participants head to dinner, we collect Post-it notes to learn what we did well and what we could do better and continually adapt. Even the text for the printed course booklet is stored on GitHub and we encourage corrections and clarifications. We typically see ten a day during the three days.</p><p>I hope that was a useful look at how some of the IBM training is run; how we try to instill a culture during the workshop and how the participants. Even those self-proclaimed “not technical” ones get stuck in, build and deploy an application and implement automated tests. The course is so much more than the tech stack. After all, it’s about <strong>DevOps: Culture and Practice</strong>.</p><p><em>The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p><strong>Follow us on </strong><a href="https://twitter.com/joinfaun"><strong>Twitter</strong></a><strong> </strong>🐦<strong> and </strong><a href="https://www.facebook.com/faun.dev/"><strong>Facebook</strong></a><strong> </strong>👥<strong> and join our </strong><a href="https://www.facebook.com/groups/364904580892967/"><strong>Facebook Group</strong></a><strong> </strong>💬<strong>.</strong></p><p><strong>To join our community Slack </strong>🗣️ <strong>and read our weekly Faun topics </strong>🗞️,<strong> click here⬇</strong></p><figure><a href="https://www.faun.dev/join/?utm_source=medium.com%2Ffaun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oSdFkACJxs5iy1oR" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5df063581c49" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/devops-culture-and-practice-5df063581c49">DevOps: Culture and Practice</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>