<?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 James Rawlings on Medium]]></title>
        <description><![CDATA[Stories by James Rawlings on Medium]]></description>
        <link>https://medium.com/@jdrawlings?source=rss-113317aefb11------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*0ThW7BEulCAa_a-D.jpeg</url>
            <title>Stories by James Rawlings on Medium</title>
            <link>https://medium.com/@jdrawlings?source=rss-113317aefb11------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 17:29:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jdrawlings/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[Kubernetes controller for Google Secrets Manager]]></title>
            <link>https://medium.com/jenkins-x/kubernetes-controller-for-google-secrets-manager-6ecfd40ac11f?source=rss-113317aefb11------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ecfd40ac11f</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[James Rawlings]]></dc:creator>
            <pubDate>Thu, 05 Mar 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-03-05T20:51:45.077Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zAYxyb8RsOMJReVMOuP4cA.png" /></figure><p>In Jenkins X Labs we have been working with <a href="https://cloud.google.com/secret-manager/docs">Google Secrets Manager</a> (which is currently in Beta so may still change). It is an extremely nice experience and if you also use Google Container Engine (GKE), Google’s managed Kubernetes service then we can make use of another cool feature, <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity">Workload Identity</a> to automatically access secrets in their hosted service using a Kubernetes service account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/140/1*t8v9dPLlG5Vsd8KmxMf8KQ.png" /></figure><p>One of the initial challenges we had was we didn’t see an obvious way to automatically create Kubernetes secrets that include the data stored from Secrets Manager. So we created a little standalone controller that runs in a Kubernetes cluster and watches for Kubernetes secrets. When one is added or updated with a particular annotation the controller will access the secret using its ID in Secrets Manager and update the Kubernetes secret with the value.</p><p>Full docs and code can be found here:</p><p><a href="https://github.com/jenkins-x-labs/gsm-controller/blob/master/README.md">https://github.com/jenkins-x-labs/gsm-controller/blob/master/README.md</a></p><h3>TL;DR</h3><p>Create an empty secret</p><pre>kubectl create secret generic my-secret</pre><p>Add the magic annotation that the controller uses to lookup the correct secret in Googles Secret Manager</p><pre>kubectl annotate secret my-secret jenkins-x.io/gsm-secret-id=foo</pre><p>Optionally if you want the Kubernetes secret to use a specific key for the data you can add another annotation</p><pre>kubectl annotate secret my-secret jenkins-x.io/gsm-kubernetes-secret-key=credentials.json</pre><h3>Demo</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FwLHgkhzeNe8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DwLHgkhzeNe8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FwLHgkhzeNe8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cdab7c9e41f29bb390092f6e753db093/href">https://medium.com/media/cdab7c9e41f29bb390092f6e753db093/href</a></iframe><p>This is still early days and we’d love folks to try it and provide feedback ( <a href="https://jenkins-x.io/community/#slack">slack</a> or the new <a href="https://github.com/jenkins-x-labs/issues/issues">labs issues</a>) on whether it is useful to others and how we can improve it together.</p><p>On Jenkins X we make use of Hashicorp’s Vault which is great although it is another service users have to run, manage and upgrade. Wherever possible Jenkins X aims to use the Cloud well, so when users are installing Jenkins X onto a Cloud Provider we would like to leverage their other managed services, reducing the deployments we need to run in users clusters for Jenkins X.</p><p><em>Originally published at </em><a href="https://jenkins-x.io/blog/2020/03/05/gsm-controller/"><em>https://jenkins-x.io</em></a><em> on March 5, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ecfd40ac11f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/jenkins-x/kubernetes-controller-for-google-secrets-manager-6ecfd40ac11f">Kubernetes controller for Google Secrets Manager</a> was originally published in <a href="https://medium.com/jenkins-x">Jenkins X</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins X Labs]]></title>
            <link>https://medium.com/jenkins-x/jenkins-x-labs-20d9b8eb859d?source=rss-113317aefb11------2</link>
            <guid isPermaLink="false">https://medium.com/p/20d9b8eb859d</guid>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[jenkins-x]]></category>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[developer]]></category>
            <dc:creator><![CDATA[James Rawlings]]></dc:creator>
            <pubDate>Fri, 28 Feb 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-02-28T11:41:12.641Z</atom:updated>
            <content:encoded><![CDATA[<p>Jenkins X Labs February update</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*ZxPJCbaTbBWkz0dm.png" /></figure><p>Jenkins X has entered it’s third year and as always we are looking for big ways things can be improved. Briefly reflecting on the last two years:</p><ul><li>first was about initial adoption and finding out what developers were both looking for and needed when moving to Kubernetes. We started off using a Static Jenkins server for example to orchestrate builds and other open source projects that folks would be familiar with, to aid their journey to the cloud. We quickly realised that the Jenkins X community wanted to leverage more of their cloud capabilities and so we began to swap in cloud native implementations like Tekton and Prow, as well as better integration with managed cloud services like storage, dns, IAM etc.</li><li>second year was about improving that developer experience and making the architectural approaches we settled on a reliable experience. This has been a lot of work and there’s still a lot more to do, in fact we know this will always be an ongoing effort. Some of the recent highlights of this effort can start to be seen with more details on this <a href="https://jenkins-x.io/blog/2020/02/26/cjxd-feb-20/">blog</a></li><li>now that we have started our third year we look at how we can effectively innovate in Jenkins X, grow collaborations with other open source projects and communities and of course build up the Jenkins X community itself. All the time we need to do this with the second years efforts in mind and not lose sight that we need to evolve as a mature project that people and teams can rely on.</li></ul><p>We’ve started by introducing the idea of an enhancement process. The aim here is to raise ideas and larger problems that folks would like to collaborate on earlier than when a Pull Request is created. Sometimes issues are a bit low level and for bigger efforts we’d like to raise the profile, potentially discuss in office hours, getting as much early feedback as possible and hope to attract folks looking to be involved. This is aimed to be a lightweight process and be used to help get things right earlier. It is not meant to stifle progress, rather enhance it. Not all changes to Jenkins X should have an enhancement proposal, we still want to attract contributions but for larger efforts this will hopefully help.</p><p>Enhancement proposals are currently raised as a pull request to this repository <a href="https://github.com/jenkins-x/enhancements">https://github.com/jenkins-x/enhancements</a>. Jenkins X creates a lot of GitHub notifications with all the releases and bot updates but this repo would be useful to ‘watch’ and see new proposals + discussions as they happen. Please if you have any views we’d absolutely love to hear them and every comment will be treated respectfully and in a safe healthy environment. We’ve already had <strong>GREAT</strong> input from <a href="https://github.com/polothy">polothy</a>, <a href="https://github.com/salaboy">salaboy</a> and a bunch of core maintainers as well as PMs and engineering managers. We’d like to encourage involvement from any background that would like to help Jenkins X and be part of something that we can all be proud of.</p><p>The second part of this blog wants to take your attention to an enhancement proposal which is currently up for review <a href="https://github.com/jenkins-x/enhancements/pull/15">https://github.com/jenkins-x/enhancements/pull/15</a>. This aims to tackle the challenge outlined above, of how do we enable rapid innovation, increase contributions and collaborations while keeping Jenkins X stable. Please take a look and feed any comments on, it is high level for a reason as we are still learning the right balance.</p><p>TL;DR of the above proposal suggests we build out an incubation hub of sorts where we can create new features which we don’t know how they might be received, gather feedback and other metrics to decide whether the feature is good to mature into the main Jenkins X org. The idea is to use an approach where features are ready for alpha, beta and GA.</p><p>We have already started piloting this effort in the <a href="https://github.com/jenkins-x-labs">Jenkins X Labs</a> GitHub org where a small team has been proving out a feature to handle Jenkins X deploying to different clusters including different cloud providers. The feature is known as multi cluster but we will be documenting, demoing and asking people to help be involved either in development or trials.</p><p>We will be putting together a roadmap, starting off small but would love suggestions <a href="https://github.com/jenkins-x-labs/issues">https://github.com/jenkins-x-labs/issues</a> It is important to stress that work which happens in the Jenkins X Labs GitHub organisation may or may not mature into the Jenkins X org. We will work hard to prove out any ideas and and gather as much feedback as we can and improve. We would be looking to make it clear users opt into using alpha or beta features so we maintain a solid base.</p><p>We are super excited by this proposal, the rate of innovation it will unlock and the level of OSS collaboration possible all the time having another focus on stability and reliability.</p><p><em>Originally published at </em><a href="https://jenkins-x.io/blog/2020/02/28/jxl-feb-20/"><em>https://jenkins-x.io</em></a><em> on February 28, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20d9b8eb859d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/jenkins-x/jenkins-x-labs-20d9b8eb859d">Jenkins X Labs</a> was originally published in <a href="https://medium.com/jenkins-x">Jenkins X</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Serverless Jenkins with Jenkins X]]></title>
            <link>https://medium.com/@jdrawlings/serverless-jenkins-with-jenkins-x-9134cbfe6870?source=rss-113317aefb11------2</link>
            <guid isPermaLink="false">https://medium.com/p/9134cbfe6870</guid>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[James Rawlings]]></dc:creator>
            <pubDate>Fri, 19 Oct 2018 15:50:12 GMT</pubDate>
            <atom:updated>2018-10-19T21:18:25.618Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*tzepvBFT0jslRKg63OgBPg.png" /></figure><p>Jenkins server was originally created in 2004 in the form of Hudson. Jenkins has become a household name for so many of us in software development and delivery and is the leader in CI + CD tooling. To date there are over 20.5 million Jenkins jobs and close to 200,000 Jenkins servers running. These are amazing numbers!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*VbB-DHL4O7XgfghaXC3wsg.png" /><figcaption>source: <a href="https://stats.jenkins.io/">https://stats.jenkins.io/</a></figcaption></figure><p>During that growth there has been significant advancements in technology, such as the Cloud and containerisation, which means some of the responsibilities of Jenkins now have better implementations that we should look to leverage. These days most companies have Cloud initiatives and we want Jenkins to evolve with the times and take it’s own Cloud Native journey. Jenkins should continue to grow and provide the automation, reliability and developer experience that is relied upon by so many.</p><p>The tremendous success of Jenkins has also come with pain points. Let’s quickly recap on some of the biggest issues we hear about:</p><ul><li>The Jenkins server is a Single Point of Failure, in particular git webhook events are missed during any maintenance downtime</li><li>Jenkins servers frequently run out of disk space and require scripting and/or manual cleanups by people to keep the lights on</li><li>Plugin version mismatches can cause conflicts during upgrades</li><li>GitHub rate limiting, caused by multibranch plugin scans</li><li>Large JVM requiring high memory even when no builds are running result in unwanted costs when using usage based pricing</li></ul><p>What if:</p><ul><li>We could reduce our cloud bills by only running Jenkins to process our pipelines when a build is required</li><li>Run an ephemeral pipeline engine which is discarded after a build is finished which avoids the filesystem filling up and eventually running out of disk space</li><li>Have continuous integration to validate installing new Jenkins plugins or plugin version upgrades</li><li>Provide high availability and a scalable webhook handler to address the SPOF</li><li>Avoid GitHub API scans reducing risk of being rate limited</li><li>Provide disaster recovery strategy where all job configuration is stored in git</li></ul><p>The Jenkins X project was announced earlier this year to provide automated CI + CD for Kubernetes with Preview Environments for Pull Requests and automatic GitOps promotion through your environments (Testing -&gt; Staging -&gt; Production). Jenkins X also extends Kubernetes using CRDs (<a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/">custom resource definitions</a>) and orchestrates your Jenkins servers and pipelines.</p><p>The Jenkins X and Jenkins projects are now thrilled to announce Serverless Jenkins!! Jenkins X can now orchestrate either Serverless Jenkins, a static Jenkins master or Knative builds per team; so it’s now your open source Jenkins cloud with full Knative build support!</p><p>Serverless Jenkins uses successful and innovative open source projects to address the issues identified above with static Jenkins masters. Kubernetes is now the de facto Cloud implementation so let’s focus on the lesser known projects that also make Serverless Jenkins possible: Prow and Knative build.</p><p>At the bottom of this blog is a link to an unedited youtube recording that demonstrates this is action.</p><h3>What is Prow?</h3><p>Prow comes from the Kubernetes ecosystem and was created by the fine folks at Google when they began to struggle with using Jenkins across the Kubernetes GitHub repos. Kubernetes is one of the largest and most successful open source projects on GitHub, and Prow is used by all their 140 repos as well as for <a href="https://github.com/istio">Istio</a> and <a href="https://github.com/jetstack/">Jetstack</a>. It is an event based solution which is made up from a number of microservices each having distinct responsibilities — providing a loosely coupled architecture ideal for a cloud native architecture. It gives powerful controls over our merges to master (both before, and after the pull request build runs) and uses ChatOps to interact with a build system.</p><p>Prow includes a scalable and highly available webhook event handler that writes ProwJob CRDs to Kubernetes based on git events, so that other microservices (kubernetes controllers that ‘watch’ for these ProwJob events) can react and perform operations such as running continuous integration or delivery pipelines. These git events can be triggered by new PRs and issues, comments, merges, pushes etc so we can react to a wide set of triggers.</p><p>It also includes the ability to automatically merge pull requests given a certain set of configurable rules based on labels.</p><p>For a list of Prow components and description take a look at the repo <a href="https://github.com/kubernetes/test-infra/tree/master/prow">https://github.com/kubernetes/test-infra/tree/master/prow</a></p><p>Prow also stores its job configuration in Git. This means in a disaster recovery situation all CI and CD jobs can be restored. To see an example of this the Jenkins X project as always has adopted this first to ensure we dogfood and validate before rolling it out to users. You can see the Jenkins X projects own Prow configuration for every repo we have that requires CI/CD <a href="https://github.com/jenkins-x/prow-config">here</a>.</p><h3>Knative Build</h3><p><a href="https://github.com/knative/build">Knative Build</a> is another cloud native solution that extends Kubernetes with CRDs and provides users ways to build applications from source. One of the great features of Knative Build is that you can string together simple steps that run sequentially in the same Kubernetes pod, using different containers where you can share state between each step. This approach uses <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/">Kubernetes init containers</a>.</p><p><a href="https://github.com/knative/build-templates">Build Templates</a> are a way to reference the type of Kubernetes pod that’s created to run your builds. They allow you to specify which docker image to execute your build in, what environment variables should exists at build time and what service accounts, secrets and volumes should be mounted. Build templates are Kubernetes CRDs and are automatically upgraded with each Jenkins X release. The Prow configuration that’s generated by Jenkins X when creating or importing applications references a Build Template. An example on the Jenkins X project is the <a href="https://github.com/jenkins-x/prow-config/blob/7dcda43/prow/config.yaml#L138-L139">prow config pointing</a> at a <a href="https://github.com/jenkins-x-charts/jx-build-templates/blob/81fd333/jx-build-templates/templates/jenkins-go-buildtemplate.yaml#L4">BuildTemplate</a>.</p><h3>What is Serverless Jenkins?</h3><p>Now that we understand the background and context of what we are doing here, now we can look at what Serverless Jenkins is. It’s part of the Cloud Native Jenkins effort to help developers, teams and organisations move to the Cloud and ensure that Jenkins is not only relevant for the Cloud and allows us to leverage what both the Cloud AND Jenkins do best.</p><h3>The details:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/0*KDvdOHH0uTGLyTMg" /><figcaption><em>Credit: thanks to Gareth Evans for the diagram</em></figcaption></figure><p>Using Jenkins X on Kubernetes will automatically install and configure Prow and Knative for you so that you are ready to go from the install. The jx CLI generates all the configuration needed and updates git repo webhook endpoints when creating or importing projects.</p><p>Now each pull request or merge to master triggers spinning up an ephemeral Jenkins in Kubernetes using Knative, checkouts the git revision, configures required credentials and runs the applications build pipeline using its <em>Jenkinsfile</em>. It will then discard the Jenkinsfile runner pod once the build is finished.</p><p>Thanks to the <a href="https://github.com/jenkinsci/custom-war-packager">Custom War Packager</a> (CWP) the Jenkins X release process builds different flavours of Jenkins servers that contains the necessary build tools . Language detection ensures that the right flavour is used. We also use the <a href="https://github.com/jenkinsci/configuration-as-code-plugin">Configuration as Code plugin</a> (CasC) to add the necessary Jenkins config at build time. One awesome feature of CWP is it extracts the Jenkins plugins during the build of serverless Jenkins (and not when serverless Jenkins starts), so the container and JVM start time for a Jenkins X based Jenkins image is sub 5 seconds — in comparison, it can take several minutes to start a Jenkins server on Kubernetes.</p><p>We have a <a href="https://github.com/jenkins-x/jenkins-x-serverless">monorepo</a> which is used to automatically build and release these language specific Jenkins images whenever we release Jenkins X.</p><p>This also means that because our plugins are defined in <a href="https://github.com/jenkins-x/jenkins-x-serverless/blob/master/packager-config.yml#L29-L170">yaml</a> and stored in git we can have CI and CD for our CI and CD tooling. When we want to upgrade a plugin we make a pull request which triggers CI and builds a preview Jenkins image, ensuring there is no plugin conflicts and we can even run mock jobs as automated testing (although we have not done this part yet). And everyone can take the exact same approach and build custom Serverless Jenkins images to use in their pipelines in the same way.</p><p>One thing to highlight is that when you switch to Serverless Jenkins there’s no state stored between builds (meaning that the build number for each job would always be 1). In Jenkins X we create a CRD for the <em>PipelineActivity</em> so we can generate the next build number and also store information about the build which allows us to visualise previous builds pipelines after the single shot Jenkins build has completed.</p><p>When Prow receives a webhook event it will create a Knative build resource in Kubernetes. Next the Knative build controller that’s watching for builds will create a Kubernetes pod and automatically add a init container that clones the PR or release branch source code. Next, leveraging the <a href="https://github.com/jenkinsci/jenkinsfile-runner">Jenkinsfile runner</a>, a single shot Jenkins is started in a separate step which can access the source code cloned by Knative and process the application’s Jenkinsfile.</p><h3>How to try this out?</h3><p>Today Jenkins X includes Prow out of the box when creating clusters on GKE with terraform via</p><pre>jx create terraform</pre><p>Or when using the feature flag on other create cluster or install commands, i.e.</p><pre>jx create cluster gke --prow</pre><pre>jx install — prow</pre><h3>FAQs</h3><ul><li><strong><em>So if there’s no static Jenkins server running how do I access the UI?</em></strong></li></ul><p>There is no open source Jenkins UI for Serverless Jenkins. This is pretty significant so let’s try and explain. Jenkins X has <a href="https://jenkins-x.io/developing/ide/">IDE</a> and <a href="https://jenkins-x.io/commands/jx/">CLI</a> tooling that makes working with Jenkins X developer friendly however the UI has gone. Prow has an open source UI called Deck which Jenkins X installs OOTB. CloudBees will likely also be offering a <a href="https://www.cloudbees.com/blog/want-help-build-cloudbees-kubernetes-jenkins-x">freemium UI</a> soon but more details on that to follow.</p><ul><li><strong><em>Where do I get build logs?</em></strong></li></ul><p>A better solution will be worked on, but for now Jenkinsfile runner sends builds log to standard out allowing us to leverage the Kubernetes clusters centralised logging solution such as Stackdriver, CloudWatch. We also provide `jx logs -k` (available whilst the build runs) and `jx get build log` (available for a few hours)</p><ul><li><strong><em>Do I need to change my Jenkinsfiles that rely on specific Jenkins multibranch plugin environment variables like `$JOB_NAME`?</em></strong></li></ul><p>No we have tried to ensure all MBP related env vars are still added in the same format. If we have missed any the let us know.</p><h3>How do I migrate my own Jenkinsfiles to use serverless Jenkins?</h3><p>The Jenkins X project itself has already migrated from using a static (always on) Jenkins server to Serveless Jenkins. Yes that’s right, we have scaled down our Jenkins server to 0 and moved all our Git repos to Prow and Serverless Jenkins. You can look at any pull request on the <a href="https://github.com/jenkins-x/">https://github.com/jenkins-x/</a> org to see it in action. We were using a <a href="https://github.com/jenkins-x/draft-packs/blob/prow/packs/javascript/Jenkinsfile">declarative style Jenkinsfile</a> (which is what we add when you import a new project into Jenkins X) which means migrating to Serverless Jenkins took only a couple of tweaks to the Jenkinsfile:</p><ol><li>Change the agent type to ‘any’ so that the pipeline is executed on the ephemeral one shot Jenkins</li><li>Remove all Jenkinsfile container blocks as right now it’s assumed all steps are executed in the one shot Jenkins pipeline engine.</li><li>For any release branch pipelines that tag (they all should create a git tag!) then we have to switch from checkout scmto git ‘github/foo.git’ as there’s a problem with reusing the cloned repo from Knative and the Jenkinsfile runner as there seems to be a symlink used when adding the repo to the Jenkins workspace. We hope to fix this.</li></ol><p>An example of the above changes can be seen <a href="https://github.com/jenkins-x/jenkins-x-platform/commit/ca9e0a58a76519193a2c7a0d8cf277dfc11babe4">here</a>. To enable prow’s ChatOps /approve comment then you also need a similar OWNERS file to that link that uses approver GitHub ID’s.</p><h3>Current restrictions:</h3><ul><li>Currently GitHub only, we will be contributing support for multiple git providers</li><li>Jenkins X uses a fork however this will be switched back in the next few weeks to use the upstream prow repo</li><li>Jenkins X by default creates a declarative pipeline Jenkinsfiles, this has not been tested on scripted and shared library Jenkinsfile pipelines but we are keen for feedback if this works as expected.</li><li>Kubernetes Plugin PodTemplates are not supported yet. We’re not sure if it’s a good idea to or not yet. It means that if you are migrating existing Jenkinsfiles that have multiple different container {…} blocks you need to add each container’s build tools into the single one shot Jenkins created by CWP above.</li></ul><p>There’s still work to do, so if you’d like to get involved come and say hi in the <a href="https://jenkins-x.io/community/">Jenkins X Kubernetes slack rooms</a>, help on an issue, or to start with give it a try and let us know how you get on.</p><p>It’s not too late to come and join us next week at <a href="https://www.cloudbees.com/devops-world/nice">Jenkins World Nice</a> where we’ll be showing this off in a live demo along with other great talks!</p><h3>Conclusion</h3><p>Jenkins X is a one stop stop shop for teams orchestrating their static, serverless or Knative build jobs using Prow ChatOps, with automated CI/CD included for Kubernetes workloads and more automation to come.</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DDmhDvr8fExA&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FDmhDvr8fExA&amp;type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/62eb0757066587082b25e1849e5c2740/href">https://medium.com/media/62eb0757066587082b25e1849e5c2740/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9134cbfe6870" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins X]]></title>
            <link>https://medium.com/@jdrawlings/jenkins-x-f69b275a3cc5?source=rss-113317aefb11------2</link>
            <guid isPermaLink="false">https://medium.com/p/f69b275a3cc5</guid>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[James Rawlings]]></dc:creator>
            <pubDate>Mon, 19 Mar 2018 21:23:29 GMT</pubDate>
            <atom:updated>2018-03-28T10:57:16.099Z</atom:updated>
            <content:encoded><![CDATA[<p>Two and a half months ago myself, <a href="https://medium.com/u/49b3565698ce">Rob Davies</a> and <a href="https://medium.com/u/604a0e049393">James Strachan</a> joined CloudBees. <a href="https://jenkins.io/blog/2018/03/19/introducing-jenkins-x/">Today we announced</a> a new OSS project called <strong>Jenkins X, </strong>a<strong> </strong>next gen CI/CD solution for Kubernetes. I couldn’t be happier to finally start talking about this as it truly is the most exciting project I’ve had the pleasure to be apart of. With the backing of CloudBees to help us turn our vision of automation and CI/CD in the cloud a reality, it just gets more exciting. I believe Jenkins X will help developers and teams adopt these new exciting technologies as well as enabling us all to continually improve together on <strong>our</strong> cloud native journey.</p><p>I’ll let the blog James wrote in the link above introduce Jenkins X. We will all be contributing to the <a href="https://jenkins.io/node/">Jenkins.io</a> site but I’ll aim to keep blogging here about current stuff and demos that I’m work on day to day, which I hope will interest folks.</p><p>If you’re short on time and want a quick look at what we’ve done so far you could take a look at one of these two demos:</p><p>The first is a 5 min recording that shows how to create a cluster on GKE with Jenkins X installed, wired together and ready to provide a platform for developing and running apps on the cloud.</p><pre>jx create cluster</pre><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fr8-J9Qg-p9U%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dr8-J9Qg-p9U&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fr8-J9Qg-p9U%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2235935219e85e6f1ef8edbb6f69436/href">https://medium.com/media/f2235935219e85e6f1ef8edbb6f69436/href</a></iframe><p>The second shows how to create a new SpringBoot application on Jenkins X and get OOTB pipelines, environments, webhooks, preview environments, helm charts, releases and general awesomeness in one command:</p><pre>jx create spring</pre><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FkPes3rvT1UM%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkPes3rvT1UM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FkPes3rvT1UM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba9b2d476c121187fde4ae0ce0e7f59d/href">https://medium.com/media/ba9b2d476c121187fde4ae0ce0e7f59d/href</a></iframe><p>For more on Jenkins X take a look at the website <a href="http://jenkins-x.io/">http://jenkins-x.io/</a> or find us in the Kubernetes Slack team <a href="http://jenkins-x.io/community/">http://jenkins-x.io/community/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f69b275a3cc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[See ya Red Hat]]></title>
            <link>https://medium.com/@jdrawlings/see-ya-red-hat-3d6fc39ac74f?source=rss-113317aefb11------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d6fc39ac74f</guid>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[James Rawlings]]></dc:creator>
            <pubDate>Fri, 22 Dec 2017 08:04:52 GMT</pubDate>
            <atom:updated>2017-12-22T08:04:52.373Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s been a great 4 years which started as an integration consultant travelling all over EMEA, working with superb customers and gaining an understanding of the real world challenges organisations face when developing software in this crazy paced world. It ends after 3 years working in Engineering and putting my heart n soul into the open source community project fabric8, which aims to help solve many of those real world issues. I’ve been lucky enough to work with some extremely talented people so thanks to you Red Hat for the opportunity.</p><p>Suffice to say my focus and passion for working with truly exciting technologies and people, to help building better software faster, is only growing at an exponential rate. So watch this space and find out what new exciting things we’re moving on to in the new year, the journey is just beginning!</p><p>Happy Christmas and see ya in 2018!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d6fc39ac74f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running fabric8 4.x]]></title>
            <link>https://medium.com/fabric8-io/running-fabric8-4-x-locally-9a5ab81a7bfa?source=rss-113317aefb11------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a5ab81a7bfa</guid>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[James Rawlings]]></dc:creator>
            <pubDate>Wed, 13 Sep 2017 14:04:36 GMT</pubDate>
            <atom:updated>2018-05-23T11:15:26.111Z</atom:updated>
            <content:encoded><![CDATA[<h3>Running fabric8 4.x locally — NOTE fabric8 is sandboxed and this blog is no longer relevant. The original fabric8 authors have created a new OSS project for CI/CD on Kubernetes <a href="https://jenkins-x.io/">https://jenkins-x.io/</a></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*kVC6MDNQVjWXC_MJ8CH2nw.jpeg" /></figure><p>With the upcoming major release of fabric8 4.x we thought we’d show you a quick video (link at the bottom) that enables anyone to install and run the developer platform locally using minikube or minishift.</p><p>fabric8 4.x comes with some great new features including Single Sign On with Keycloak, hosted IDE from Eclipse Che, a Work Item Tracker and a shiny new developer focused UI. All this in addition to the existing integrated CI CD solution for Kubernetes leveraging Jenkins Pipelines.</p><p>This is a recording that starts from zero and ending with the developer platform running locally having generated, built and deployed a new application via Pipelines all in just a few commands!</p><p>The demo is a bit crude, expect more in depth demos coming over the next few weeks showing fabric8 4.x running on Kubernetes + OpenShift clusters as well as better explanations of the great new features.</p><p>As this is early access please give it a go yourself and let us know how you get on. You can find us in these chat rooms and we LOVE feedback!</p><ul><li>IRC: irc.freenode.net #fabric8</li><li>Mattermost: <a href="https://chat.openshift.io/developers/channels/fabric8">https://chat.openshift.io/developers/channels/fabric8</a></li><li>Slack: <a href="https://fabric8.slack.com/">https://fabric8.slack.com</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FmnedVZ29Mlw%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DmnedVZ29Mlw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FmnedVZ29Mlw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7fd4bdfeb638d8524803531a8f9eea38/href">https://medium.com/media/7fd4bdfeb638d8524803531a8f9eea38/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a5ab81a7bfa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fabric8-io/running-fabric8-4-x-locally-9a5ab81a7bfa">Running fabric8 4.x</a> was originally published in <a href="https://medium.com/fabric8-io">fabric8 io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Accessing your applications on Kubernetes or OpenShift]]></title>
            <link>https://medium.com/fabric8-io/accessing-your-applications-on-kubernetes-or-openshift-3e69be0ad3bc?source=rss-113317aefb11------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e69be0ad3bc</guid>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[fabric8]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[openshift]]></category>
            <dc:creator><![CDATA[James Rawlings]]></dc:creator>
            <pubDate>Fri, 19 Aug 2016 22:27:02 GMT</pubDate>
            <atom:updated>2016-08-22T08:06:57.881Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*kY-QILsDU3oWc_nuxnNfmw.png" /><figcaption><a href="https://fabric8.io/">https://fabric8.io/</a></figcaption></figure><p>Working with multiple Kubernetes flavoured implementations either locally or private / public cloud and managing the different ways to access our apps can become a bit tedious; enter <a href="https://github.com/fabric8io/exposecontroller"><strong>exposecontroller</strong></a>.</p><p>The available ways to access your applications today are:</p><ul><li><a href="http://kubernetes.io/docs/user-guide/ingress/">Ingress</a> — Kubernetes Ingress</li><li><a href="https://docs.openshift.com/enterprise/3.2/install_config/install/deploy_router.html">Route</a>s — OpenShift Route</li><li><a href="http://kubernetes.io/docs/user-guide/services/#type-nodeport">NodePort</a> — Recommended for local development</li><li><a href="http://kubernetes.io/docs/user-guide/services/#type-loadbalancer">LoadBalancer</a> — Cloud provider external loadbalancer</li></ul><p>The <a href="https://github.com/fabric8io/exposecontroller"><strong>exposecontroller</strong></a> will automatically create and delete Ingress rules or OpenShift Routes. It is a golang microservice which runs in a pod within the cluster and watches the Kubernetes API server for new, removed or changed services, acting when it sees them added, deleted or modified.</p><p>What’s more is if you’re developing locally with either <a href="https://github.com/kubernetes/minikube">minikube</a> or <a href="https://github.com/jimmidyson/minishift">minishift</a> you probably don’t want take up extra resources running an <a href="https://github.com/nginxinc/kubernetes-ingress">NGINX Ingress Controller</a> or OpenShift Router, instead <a href="https://github.com/fabric8io/exposecontroller"><strong>exposecontroller</strong></a> will modify your running services to use NodePort which means services are accessible from your host machine without the need for a router or reverse proxy.</p><p><strong>exposecontroller</strong> also offers a way to override services with the LoadBalancer type if needed and you’re running on a compliant cloud provider. <strong><em>NOTE</em></strong> this incurs AWS costs and is easy to exceed quotas on GKE. This will give you an external IP or address that you can access your applications on.</p><p>If you’re working on a cloud then you’ll probably be using the OpenShift Router or Kubernetes Ingress Controller, these use DNS wildcards to route traffic to your Kubernetes services. Once they’re running they use Routes or Rules (for OpenShift and Kubernetes respectfully) which define the hostname including your domain name which map to your services. If you’re looking for a DNS provider then we use <a href="https://www.cloudflare.com/">cloudflare</a> which works great.</p><p>Once set up, the domain name can be passed as a flag when running <a href="https://github.com/fabric8io/gofabric8">gofabric8</a></p><pre>gofabric8 deploy --domain replace.me.io</pre><p>or if you’re not using <a href="https://github.com/fabric8io/gofabric8">gofabric8</a> you can create the config map which is otherwise generated</p><pre>cat &lt;&lt;EOF | kubectl create -f -<br>apiVersion: &quot;v1&quot;<br>data:<br> expose-rule: &quot;ingress&quot;<br> domain: &quot;replace.me.io&quot;<br> watch-rate-milliseconds: &quot;5000&quot;<br>kind: &quot;ConfigMap&quot;<br>metadata:<br> name: &quot;exposecontroller&quot;<br>EOF</pre><p><strong>exposecontroller</strong> will then automatically create a new Route or Rule for any service that has a label of</p><pre>expose=true </pre><p>You can then access your service using the pattern</p><pre> {servicename}.{namespace}.{domain}</pre><p><em>for example</em></p><pre>http://fabric8.default.replace.me.io</pre><p>You can add / delete services and new routes or rules will be created / deleted. Additionally you can simply add and remove labels</p><pre>kubectl label svc gogs expose=true</pre><h3>Setup</h3><p>If you use <a href="https://fabric8.io/">fabric8</a> then you get all of this working OOTB, just edit the configmap if you want to change anything.</p><p>If you’re not using fabric8 take a look at the <a href="https://github.com/fabric8io/exposecontroller/blob/master/README.md">README.md</a> for the latest steps, it’s extremely straight forward and we’re also working on adding the ability to install via Helm. Until then deploying to Kubernetes for example is this one liner after creating the config map above.</p><pre>kc create -f http://central.maven.org/maven2/io/fabric8/devops/apps/exposecontroller/2.2.236/exposecontroller-2.2.236-kubernetes.yml</pre><h3>Feedback</h3><p>Let us know what you think via the <a href="https://github.com/fabric8io/exposecontroller/issues">issue tracker</a> or <a href="https://twitter.com/fabric8io?lang=en-gb">Twitter</a>, if you find it useful and how we can improve it. We hope this helps folks not worry about managing the way you access your apps running on different Kubernetes implementations.</p><p><a href="https://github.com/fabric8io/exposecontroller">fabric8io/exposecontroller</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e69be0ad3bc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fabric8-io/accessing-your-applications-on-kubernetes-or-openshift-3e69be0ad3bc">Accessing your applications on Kubernetes or OpenShift</a> was originally published in <a href="https://medium.com/fabric8-io">fabric8 io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[fabric8 on Google Container Engine]]></title>
            <link>https://medium.com/fabric8-io/fabric8-on-google-container-engine-cbb1bdc9f6f4?source=rss-113317aefb11------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbb1bdc9f6f4</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[continuous-delivery]]></category>
            <dc:creator><![CDATA[James Rawlings]]></dc:creator>
            <pubDate>Mon, 04 Jul 2016 15:15:46 GMT</pubDate>
            <atom:updated>2016-07-04T18:29:39.134Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RtV-zVvqT32LXlUA6wbt8g.png" /></figure><p>Most of our demos to date have been run on OpenShift v3. The Kubernetes open source ecosystem and community is huge so we wanted to show how developers can work with any Kubernetes environment to run the fabric8 developer centric console and features used to build, manage and continually improve better software.</p><p>Here is a demo going from zero to full CD pipelines including centralised logs and metrics using our great efforts around automation, all on Google Container Engine which gives us Kubernetes out of the box in just a few clicks.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F173353537&amp;url=https%3A%2F%2Fvimeo.com%2F173353537&amp;image=http%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F579624304_640.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=vimeo" width="640" height="360" frameborder="0" scrolling="no"><a href="https://medium.com/media/069e28a14d3c491ef5daeff774b39e93/href">https://medium.com/media/069e28a14d3c491ef5daeff774b39e93/href</a></iframe><p>Try it out yourself</p><p><a href="http://fabric8.io/guide/getStarted/gke.html">Fabric8 Documentation</a></p><p>If you like this and want us to demo more fabric8 features running on GKE then please let us know. We love feedback too!</p><p><a href="http://fabric8.io/community/index.html">join the fabric8 community!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cbb1bdc9f6f4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fabric8-io/fabric8-on-google-container-engine-cbb1bdc9f6f4">fabric8 on Google Container Engine</a> was originally published in <a href="https://medium.com/fabric8-io">fabric8 io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[dog fooding fabric8 with Continuous Delivery]]></title>
            <link>https://medium.com/fabric8-io/dog-fooding-fabric8-with-continuous-delivery-3778ced5e2c?source=rss-113317aefb11------2</link>
            <guid isPermaLink="false">https://medium.com/p/3778ced5e2c</guid>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[James Rawlings]]></dc:creator>
            <pubDate>Tue, 07 Jun 2016 12:43:42 GMT</pubDate>
            <atom:updated>2016-06-07T12:43:42.642Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4-sXI_Sv57oaT9zOP2jktA.png" /></figure><p>In the fabric8 github organisation we have had commits to 46 different repos in the last 20 days. In the last 3 days alone we’ve performed 26 releases of various Java, Golang, Node.js projects. We are able to iterate faster than ever before. As a team we have the best and most productive innovators I have ever worked with. Now that releasing isn’t much more than a simple copy &amp; paste of a Jenkinsfile we can go from idea to a released project or feature in an unbelievably short amount of time. This helps gain that all important feedback to figure out what ideas work and which need more attention, TL;DR we can innovate at an extreme rate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*-3FdKp3mNmR-5Urpv5ndKw.png" /></figure><p>fabric8 is an open source Microservices platform consisting of many projects written in different languages. It brings developer centric features on top of the incredibly powerful and exciting container orchestration platform, Kubernetes. It aims to help teams deliver value faster whilst also making them happier. Included in fabric8’s features is an OOTB CD solution aimed to help teams automate the build, test, promote and improvement of their software. In order to gain a better real world understanding of CD and of course benefit from the speed, agility and quality it enables we have automated as many of the development steps and stages as we can and continue to do so, i.e. using fabric8 + Kubernetes + Docker + Jenkins to build and release fabric8.</p><p>This blog will explain our setup and processes in the same open nature as fabric8’s own source code, the intention is the same, for others to gain an understanding, collaborate and contribute. Our mission with fabric8 is to help teams deliver value faster, so we started with ourself.</p><h3>Culture</h3><p>fabric8 is an upstream project which relies heavily on its community, we use established feedback loops to gain an understanding of what needs improving and what gaps there are as well as seeking out new opportunities. The core team itself is self sufficient as in we look after our own infrastructure and each take ownership of problems. We all create our own CD pipelines reusing the templates discussed below and are also each responsible for releasing, testing, approving and maintaining projects. There is ZERO blame and a true willingness to help each other, understanding each others strengths. This is important to note as I feel without it we would never be able to achieve the levels of automation that we have today and aim for the future.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*iknfIIgJZWFA5S5ZHwxqPg.gif" /></figure><h3>Toolset</h3><ol><li><a href="https://www.docker.com/">Docker</a></li><li><a href="http://kubernetes.io/">Kubernetes</a></li><li><a href="https://jenkins.io/2.0/">Jenkins 2.0</a> and <a href="https://github.com/jenkinsci/pipeline-plugin">Jenkins Pipeline</a></li><li><a href="http://fabric8.io/">fabric8</a></li><li><a href="https://www.openstack.org/">OpenStack</a></li><li>Github</li><li><a href="http://www.sonatype.org/nexus/">Nexus</a></li><li><a href="https://hub.docker.com/_/registry/">Docker registry</a></li><li>Docker Hub</li><li><a href="http://www.thucydides.info/#/">Serenity BDD</a></li><li><a href="https://www.elastic.co/">ElasticSearch</a></li><li><a href="https://www.elastic.co/products/kibana">Kibana</a></li><li><a href="https://hubot.github.com/">Hubot</a></li><li><a href="https://slack.com/">Slack</a></li></ol><h3>Setup</h3><p>We have a five node Kubernetes cluster which was provisioned on OpenStack using <a href="https://docs.kubespray.io/">KubeSpray’s Kargo</a> which in turn uses Ansible under the hood (we really like Ansible!), after trying a few options this was the simplest way and only automated way I could find that worked — thanks <a href="https://twitter.com/kubespray">@kubespray</a>!</p><p>Next we deploy fabric8 on top of Kubernetes using <a href="https://github.com/fabric8io/gofabric8">gofabric8</a></p><pre>gofabric8 deploy --api-server <a href="https://kubernetes.fabric8.io/">https://kubernetes.fabric8.io:443</a></pre><p>fabric8 provides us with one-click installation of the hosted toolset list above. It will also wire together configuration and generate default secrets that we use for the CD features we offer, but for the fabric8 release itself we don’t want to use the default secrets, instead we import them before we start running the Jenkins and Nexus apps.</p><p>The secrets we use include GPG signing certs, Maven settings.xml, GitHub auth tokens for interacting with its API, SSH keys and docker config.json for when we promote images to Docker Hub.</p><pre>kubectl create secret generic jenkins-docker-cfg --from-file <br>kubectl create secret generic jenkins-git-ssh --from-file<br>kubectl create secret generic jenkins-hub-api-token --from-file<br>kubectl create secret generic jenkins-maven-settings --from-file<br>kubectl create secret generic jenkins-release-gpg --from-file <br>kubectl create secret generic jenkins-ssh-config --from-file<br>kubectl create secret generic gerrit-users-ssh-keys --from-file <br>kubectl create secret generic gerrit-admin-ssh --from-file<br>kubectl create secret generic jenkins-master-ssh --from-file</pre><p>Once these are created we can go ahead and run the apps that we use from the one click menu using the fabric8 console. fabric8 comes with all the apps integrated in easy to run packages; you access the Run… page from the Runtime section of a namespace; then you can run any app by just clicking on its icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zwo4fEksZebSE2GRTL_Ncg.png" /></figure><p>We start by running the Logging app which schedules a fluentd <a href="http://kubernetes.io/docs/admin/daemons/">daemonset</a> on each node and consumes the docker container logs sending them to ElasticSearch. This is also deployed as well as Kibana so that we can see our centralised logs and works with our OOTB pipeline events that we’ll see later.</p><p>We run a Nexus to cache Java dependencies we use to speed up build times and avoid downloading the internet each time a release job is triggered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IHSUyu2A1WRsywHV62SRvA.png" /></figure><p>Hubot with slack integration for pipeline notifications, approvals and general ChatOps interactions with the platform is installed as well as a private docker registry, where we stage built docker images so Kubernetes pods can pull images during acceptance testing before images are promoted to Docker Hub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5E-UzpUAozomGswDUJNoGg.png" /></figure><p>Finally we run a Jenkins instance and enter a GitHub repo containing Jenkins job config.xml which is cloned and used to initialise Jenkins with all the fabric8 release jobs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*ZQTcnzi0HnxM343m8q4a0Q.png" /></figure><p>These job config.xml files are quite basic as typically they only refer to the SCM repo and branch to tell Jenkins where to find the Jenkinsfile. For folks new to a Jenkinsfile then there’s some great <a href="https://jenkins.io/solutions/pipeline/">documentation</a> explaining the effort behind Jenkins 2 (pipeline as code). In short a Jenkinsfile contains the description and instructions of how to build, test and release it’s project, the Jenkinsfile lives with the source code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xw7a7uVvxWj_f45VR7CNXA.png" /></figure><p>There’s a <a href="https://wiki.jenkins-ci.org/display/JENKINS/CloudBees+GitHub+Branch+Source+Plugin">GitHub branch plugin</a> that will scan a GitHub organisation and automatically create Jenkins jobs for any Jenkinsfile that it finds, this is pretty handy however for our needs it was simpler to just start Jenkins with the job configs using a <a href="http://kubernetes.io/docs/user-guide/container-environment/">Kubernetes postStart lifecycle</a> script. We also use this postStart script to initialise the internal <a href="https://github.com/jenkinsci/workflow-cps-global-lib-plugin#pipeline-global-library">Jenkins Global Pipeline Library</a> with a collection of reusable Groovy scripts that we’ve created to automate many parts of our pipelines. We have started documenting these functions and hope that others can reuse, extend and contribute their own.</p><p><a href="https://github.com/fabric8io/jenkins-pipeline-library">fabric8io/jenkins-pipeline-library</a></p><p>Once Jenkins is started we can use these functions within our pipelines. For example to halt the pipeline and have it wait for a GitHub pull request to be merged we can just use this function:</p><pre>waitUntilPullRequestMerged{<br>  name = &#39;fabric8io/ipaas-quickstarts&#39;<br>  prId = &#39;1234&#39;<br>}</pre><h3>Single vs Multi projects</h3><p>Typically each project / git repo will contains it’s own Jenkinsfile and is responsible for it’s own release pipeline. When multiple projects have dependencies on each other, they are required to be staged, tested and released together so we will want another Jenkinsfile to orchestrate this too.</p><p>Most of the fabric8 projects are released independently from each other such as <a href="https://github.com/fabric8io/kubeflix">Kubeflix</a>, <a href="https://github.com/fabric8io/funktion">funktion</a>, <a href="https://github.com/fabric8io/gitcontroller">gitcontroller</a> etc, but we do also have a multi-project case where we would stage 4–5 projects together, test and only then when we see them playing nice together we promote.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l_jFsOFDyz8TWou2CPRfew.png" /></figure><p>So that we can handle both the single and multi project release usecase using Jenkins Pipeline we have decoupled the ‘pipeline orchestration’ and ‘how to’ logic of a Jenkinsfile. This means we can still have a Jenkinsfile living with the source code which handles the single project usecase and calls functions within a new release.groovy file, this contains how the project should be built, tested and released. Now for the multi-project usecase where the pipeline orchestration involves staging multiple projects we can clone the repo of each project and reuse the build functions from the release.groovy.</p><p>So in short:</p><ul><li>single project <a href="https://github.com/fabric8io/fabric8-forge/blob/master/Jenkinsfile"><strong>Jenkinsfile</strong></a> that lives with the source code, used to orchestrate the pipeline by calling functions in release.groovy</li><li>multi project <a href="https://github.com/fabric8io/fabric8-release-pipelines/blob/master/multi-fabric8%2Bipaas%2Bdevops%2Bquickstarts%2Bforge/Jenkinsfile"><strong>Jenkinsfile</strong></a> that lives in an <a href="https://github.com/fabric8io/fabric8-release-pipelines">external repo</a>, used to orchestrate multiple projects from different SCMs but still uses the functions from the release.groovy of each repo, able to stage and release the multiple projects together</li><li><a href="https://github.com/fabric8io/fabric8-forge/blob/master/release.groovy"><strong>release.groovy</strong></a> reusable functions that live with the source code which describe how to build, stage, test, approve and promote, used by both single and multi project Jenkinsfiles. These in turn call resuable functions in the Jenkins Global Pipeline Library</li></ul><p>This is a bit complicated to explain so maybe it’s time to look at one of the projects and step through.</p><p>fabric8-forge can be released on its own using this <a href="https://github.com/fabric8io/fabric8-forge/blob/master/Jenkinsfile">Jenkinsfile</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N58iUHTyRRyO9Dvr1-sKug.png" /></figure><p>Now if we take a quick look at each step</p><ul><li><strong>node</strong> will use OOTB Jenkins <a href="https://wiki.jenkins-ci.org/display/JENKINS/Kubernetes+Plugin">kubernetes-plugin</a> configuration that will dynamically request a Jenkins JNLP agent pod be scheduled by the Kubernetes master in the same namespace as the Jenkins master.</li><li><strong>ws</strong> will ensure we use a unique workspace so we can run multiple pipelines jobs in parallel.</li><li><strong>checkout scm</strong> will use the <a href="https://github.com/fabric8io/fabric8-workflow-jobs-release/blob/master/Single-fabric8-forge/config.xml#L12">SCM URL</a> from the Jenkins job config to perform a git clone on <a href="https://github.com/fabric8io/fabric8-forge">https://github.com/fabric8io/fabric8-forge</a></li><li><strong>git remote set-url </strong>means we can clone from github with https and without using credentials, then update the git origin URL so that we can push git tags using SSH keys. The advantage here is, rather than storing credentials in Jenkins we can use a consistent approach on the platform by using Kubernetes secrets. These secrets are mounted into the build pod which we will explain later.</li><li><strong>load ‘release.groovy’</strong> will load a reference to the release.groovy that was just checked out so that we can call the pipeline functions</li><li><strong>stage</strong> is a Jenkins pipeline DSL that helps us split up our pipelines stages and visualise them</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VyaBaLCsTV1ahAaEkrRkDA.png" /></figure><ul><li><strong>pipeline.updateDependencies </strong>will check for any updated versions of Maven dependencies in Maven central, if a new version is found the Maven pom is updated and a GitHub pull request is created. In a single project pipeline it will wait for CI jobs to merge the PR before continuing. It’s worth noting that at the moment our CI infrastructure is different from the CD. If there’s a CI failure, a notification is sent to slack to inform the team that the PR needs manual attention. Whilst this happens the pipeline happily waits until the PR is fixed and merged.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RUbaJUEaWfIYRPB6shAbLw.png" /></figure><p>If the pipeline is a multi project pipeline then the dependencies update PR is not merged until everything has been tested and the pipeline is approved.</p><ul><li><strong>pipeline.stage{}</strong> will perform a Maven build, deploy artifacts to OSS Sonartype staging repo using the <a href="https://github.com/fabric8io/jenkins-pipeline-library/blob/master/src/io/fabric8/Fabric8Commands.groovy#L174">nexus-staging-maven-plugin</a>, build any docker images using the <a href="https://github.com/fabric8io/docker-maven-plugin">docker-maven-plugin</a> and stage these images in the private fabric8 docker registry. In order to do this we created a new Jenkins plugin called <a href="https://github.com/fabric8io/kubernetes-pipeline">kubernetes-pipeline</a> (soon to be moved to the Jenkins GitHub org). This plugin contains a number of useful steps that we can use in our pipelines, specifically one that will launch a build pod that contains a docker image of our choice in this case it has inside maven, git, helm and other tools. This means we can run shell commands in our Jenkinsfile using ‘git’ and ‘mvn’. It also allows us to mount the necessary SSH keys as secrets and mount the docker daemon socket for when we build images. This function lives in the Jenkins Global Pipeline Library so you wont typically see it however it’s where most of the stage step work is..</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9XVWnpkij9jeLGYI348qAg.png" /></figure><ul><li><strong>pipeline.release{}</strong> means we’ve not done any deployments to test environments or requested approval. This is certainly our weak area and currently we only perform automated deployments during a multi project pipeline which we’ll look at a bit. The release function will tell OSS Sonartype to release the staging repo so that artifacts are sync’d with Maven central. The pipeline will also promote docker images from our internal registry up to Docker Hub using the Maven release version as the docker image tag. Finally the release stage will wait until the artifacts are available in Maven central before continuing.</li><li><strong>pipeline.mergePullRequest{}</strong> if there were project dependency version updates earlier in the pipeline then the associate pull request will be updated with a [merge] comment to instruct CI to merge the pull request. Note there are NO direct merges into master, everything goes through CI.</li></ul><p>If we now take a brief look at a multi project pipeline you’ll seen the main difference is we stage multiple projects together, tear down and create new environments (Kubernetes namespaces) then deploy them to both OpenShift AND Kubernetes clusters for testing and request pipeline approval. The Jenkinsfile will be tidied up as there’s a bit of duplication but the technique we tend to use is write steps in a Jenkinsfile then refactor out common functions over time. Taken from a multi project example..</p><p><a href="https://github.com/fabric8io/fabric8-release-pipelines/blob/master/multi-fabric8+ipaas+devops+quickstarts+forge/Jenkinsfile">fabric8io/fabric8-release-pipelines</a></p><p>Deploy to remote Kubernetes and OpenShift clusters (both clusters need to have the insecure flag set to allow pulling from the private fabric8 docker registry where images are staged)…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MdOU2NRHvigS5W7l_AdcnQ.png" /><figcaption>deploy to remote OpenShift and Kubernetes clusters</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e1IuM2FshrD5jybQaL_9Ow.png" /><figcaption>approve</figcaption></figure><p>Next, approve which if aborted will drop the staging repos in OSS Sonartype. An approval notification is also sent to the team Slack channel. We also send OOTB events to ElasticSearch so we know how long per project we are waiting for pipeline approval. This can help identify where we can improve automated testing or even the approval process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SI4_h0d6PCOIsb3uY7ZBJw.png" /><figcaption>promote</figcaption></figure><p>Promote is interesting as now we show one of the simple and powerful combinations of Jenkins and Kubernetes.. the FAN OUT pattern. By using node{} inside a parallel step we can schedule multiple Jenkins agents across our Kubernetes cluster to carry out the longer process of doing a docker pull, docker tag and docker push of our 20+ images, this significantly reduces our pipeline times.</p><p>Lastly we will be notified in slack once the release has finished</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*_oIiX1j68muzr6GWd46WMA.png" /></figure><p>This is a screen shot of the Jenkins Stage View plugin that allows us to visualise our Pipeline. In the interest of screen real estate I’ve picked a multi project pipeline test which is discussed below as it only involves two projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*Z9KKIQAdx-5erNPVlwERGw.png" /><figcaption>Stage View</figcaption></figure><h3>Continuous Improvement</h3><p>One of fabric8’s focuses is enabling teams to improve their software and processes. By no means is fabric8’s CD process the best it can be and we are continually improving by streamlining not only software but also team processes. To help understand where we need to improve we use the OOTB pipeline events that come as part of using the fabric8 <a href="https://github.com/fabric8io/kubernetes-pipeline">kubernetes-pipeline</a> plugin. Here we can visualise pipeline approval wait times per app as well as the success / fail / aborted status per project. This is where we need to focus and improve the success rate as well as generate more charts to help.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CIV9y7eeTfvbmoZLVbJKQg.png" /></figure><h3>Testing our CD</h3><p>So that we can make changes to our global pipeline library and also test changes to our pipelines we have multi repo test projects that simulate a real fabric8 multi project release.</p><p>This is a quick demo (it’s a bit rough) showing a <a href="https://github.com/fabric8io/pipeline-test-project-dependency">Java dependency</a> that returns a welcome string used by a a <a href="https://github.com/fabric8io/pipeline-test-project">simple spring boot app</a> that when built and run on Kubernetes displays a web page showing the welcome message from its Java dependency. These are staged in OSS Sonartype repos and the private docker registry, deployed and promoted so that we completely test our end to end reusable pipeline functions. Ideally we’ll pull this into the pipeline of the fabric8 pipeline library so that we are effectively CI / CD’ing our CD ;)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F169568495&amp;url=https%3A%2F%2Fvimeo.com%2F169568495&amp;image=http%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F574331755_1280.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=vimeo" width="3840" height="2160" frameborder="0" scrolling="no"><a href="https://medium.com/media/41057488ab2e1910f9ff09e3552e9ca8/href">https://medium.com/media/41057488ab2e1910f9ff09e3552e9ca8/href</a></iframe><h3>Next steps</h3><p><strong>Automated tests</strong> I’m a bit ashamed to admit this but in the interest of being open and honest if you’ve got this far you may have noticed a serious lack of automated testing. It’s true, at the moment we rely too much on individual CI, unit testing and manual testing in our staging environment. With this in mind our focus is now looking toward automated acceptance testing using Serenity BDD and Selenium <a href="https://github.com/fabric8io/fabric8-acceptance-tests#fabric8-acceptance-tests">here’s a basic start</a>. We have a way to go here but we recognise the importance. Now that we have the automated pipelines and automated deployments to multiple flavours of Kubernetes based clusters we can now focus on automated testing.</p><p><strong>Push approach to dependency updates</strong> currently our pipelines check to see if there’s a newer version available and then updates the pom version by submitting a GitHub Pull Request, this is a <em>pull</em> approach. Ideally we also want to support <em>push</em> which means when we release an artifact we can automatically perform Pull Requests on downstream projects, optionally releasing them too. More details in <a href="https://github.com/fabric8io/fabric8/issues/6057">this issue</a>.</p><p><strong>Pre commit</strong> right now we rely too much on our testing and staging when performing a potential release. With the possibilities that Kubernetes now brings us we want to perform a selection of automated integration testing during a Pull Request. I’ve used Gerrit in the past and really like the collaboration, automated code quality tools and testing which can be tied into the merge voting process. Hopefully we can do something similar which gives developers earlier indication that a change might affect another project.</p><p><strong>Persistence</strong> our Jenkins image is currently not persistent, we’re not too worried about loosing job history as we continue to capture the information we’re interested in ElasticSearch were we can carry out much more detailed anaysis using Kibana. By adding persistence however we’ll be able to take advantage of the Jenkins Pipeline restart feature if our Jenkins master pod is recreated during a pipeline.</p><h3>Useful Links</h3><ul><li><a href="https://continuousdelivery.com/2016/04/the-flaw-at-the-heart-of-bimodal-it/">Continuous Delivery</a></li><li><a href="https://github.com/jenkinsci/pipeline-plugin">jenkinsci/pipeline-plugin</a></li><li><a href="http://kubernetes.io/">Kubernetes</a></li><li><a href="https://github.com/fabric8io/jenkins-pipeline-library">fabric8io/jenkins-pipeline-library</a></li><li><a href="https://github.com/fabric8io/kubernetes-pipeline">fabric8io/kubernetes-pipeline</a></li><li><a href="https://github.com/fabric8io/fabric8-release-pipelines">fabric8io/fabric8-release-pipelines</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3778ced5e2c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fabric8-io/dog-fooding-fabric8-with-continuous-delivery-3778ced5e2c">dog fooding fabric8 with Continuous Delivery</a> was originally published in <a href="https://medium.com/fabric8-io">fabric8 io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[fabric8 pipeline charts demo]]></title>
            <link>https://medium.com/fabric8-io/fabric8-pipeline-charts-demo-44c6ce80384a?source=rss-113317aefb11------2</link>
            <guid isPermaLink="false">https://medium.com/p/44c6ce80384a</guid>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[continuous-improvement]]></category>
            <dc:creator><![CDATA[James Rawlings]]></dc:creator>
            <pubDate>Mon, 11 Apr 2016 08:15:05 GMT</pubDate>
            <atom:updated>2016-04-11T08:15:05.582Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*66-iDcQP02E16_JlCyO4mA.png" /></figure><p>As a followup to a recent blog on <a href="https://blog.fabric8.io/fabric8-awesome-project-pipeline-charts-21a9a1230b17#.3dwz4os64">fabric8’s project and pipelines charts</a> here’s a demo showing..</p><ul><li>one-click setup of logging and CD features</li><li>nodejs, java, swift, golang project wizard creation</li><li>canary release, stage approve and promote</li><li>pipeline visualisation</li><li>pipeline charts in Kibana</li><li>application level metrics in Grafana</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FJWb4iPsds1E%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJWb4iPsds1E&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJWb4iPsds1E%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/876f6e0125bfa457e0b690558f0bb033/href">https://medium.com/media/876f6e0125bfa457e0b690558f0bb033/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44c6ce80384a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fabric8-io/fabric8-pipeline-charts-demo-44c6ce80384a">fabric8 pipeline charts demo</a> was originally published in <a href="https://medium.com/fabric8-io">fabric8 io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>