<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Patterns on JayeX - Cloud Native CI/CD Built On Kubernetes</title>
		<link>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/</link>
		<description>Recent content in Patterns on JayeX - Cloud Native CI/CD Built On Kubernetes</description>
		<generator>Hugo</generator>
		<language>en</language>
		
		
		
		
			<atom:link href="https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Version Everything</title>
				<link>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/version_everything/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/version_everything/</guid>
				<description>&lt;p&gt;Always version everything explicitly in git and never use &lt;code&gt;latest&lt;/code&gt; or &lt;code&gt;SNAPSHOT&lt;/code&gt; images or artifacts!&lt;/p&gt;&#xA;&lt;p&gt;The reason is you never know when a &lt;code&gt;latest&lt;/code&gt; or &lt;code&gt;SNAPSHOT&lt;/code&gt; image or artifact will upgrade in any container/pod/process/step in any environment. Its basically random. So not versioning things means random failures.&lt;/p&gt;&#xA;&lt;p&gt;If you explicitly version things in all repositories things are stable and repeatable.&lt;/p&gt;&#xA;&lt;p&gt;If you are worried about upgrading versions of things over time then look at either tools like &lt;a href=&#34;https://dependabot.com/&#34;&gt;dependabot&lt;/a&gt; or the &lt;a href=&#34;https://github.com/jenkins-x-plugins/jx-updatebot&#34;&gt;updatebot plugin&lt;/a&gt; which we use extensively throughout JayeX to upgrade versions of libraries, images, binaries etc.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Pull Dependent Versions</title>
				<link>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/pull_dependent_versions/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/pull_dependent_versions/</guid>
				<description>&lt;p&gt;When you &lt;a href=&#34;https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/version_everything/&#34;&gt;Version Everything&lt;/a&gt; you need a way to pull dependent versions into your git repositories.&lt;/p&gt;&#xA;&lt;p&gt;Using the &lt;strong&gt;pull&lt;/strong&gt; model means that you periodically create Pull Requests on your git repositories to upgrade dependencies.&lt;/p&gt;&#xA;&lt;p&gt;One solution is to use a tool tool like &lt;a href=&#34;https://dependabot.com/&#34;&gt;dependabot&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Or you can run periodic jobs via the &lt;a href=&#34;https://github.com/jenkins-x-plugins/jx-updatebot&#34;&gt;updatebot plugin&lt;/a&gt; to create pull requests.&lt;/p&gt;&#xA;&lt;p&gt;e.g. we automatically pull upgrades of chart versions into our Version Stream via &lt;a href=&#34;https://github.com/jenkins-x/jx3-versions/blob/master/.github/workflows/update-charts.yml&#34;&gt;this github action&lt;/a&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Push Version Changes</title>
				<link>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/push_version_changes/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/push_version_changes/</guid>
				<description>&lt;p&gt;When you &lt;a href=&#34;https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/version_everything/&#34;&gt;Version Everything&lt;/a&gt; you need a way to pull dependent versions into your git repositories.&lt;/p&gt;&#xA;&lt;p&gt;Using the &lt;strong&gt;push&lt;/strong&gt; model means that as you create a new versioned release of an artifact (library, binary, image, chart or whatever) you generate the necessary Pull Requests in your downstream repositories to upgrade to use this version.&lt;/p&gt;&#xA;&lt;p&gt;We do this in JayeX using the &lt;a href=&#34;https://github.com/jenkins-x-plugins/jx-updatebot&#34;&gt;updatebot plugin&lt;/a&gt; as part of a release pipeline. The &lt;a href=&#34;https://github.com/jenkins-x/jx3-pipeline-catalog/blob/master/packs/go-plugin/.lighthouse/jenkins-x/release.yaml#L38&#34;&gt;go-plugin release pipelines&lt;/a&gt; pipelines have a &lt;code&gt;promote-release&lt;/code&gt; which uses the updatebot plugin to promote the new version to other git repositories. Here are some examples:&lt;/p&gt;</description>
			</item>
			<item>
				<title>GitOps</title>
				<link>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/gitops/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/gitops/</guid>
				<description>&lt;p&gt;The &lt;code&gt;GitOps&lt;/code&gt; pattern means you use source code and git repositories for both your applications, your infrastructure and environments too.&lt;/p&gt;&#xA;&lt;p&gt;In the DevOps space we have been using git to version infrastructure configuration with many tools like &lt;a href=&#34;https://www.terraform.io/&#34;&gt;terraform&lt;/a&gt; and before that tools like &lt;a href=&#34;https://www.ansible.com/&#34;&gt;Ansible&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;With &lt;a href=&#34;https://kubernetes.io/&#34;&gt;kubernetes&lt;/a&gt; you can connect to a cluster and modify it via &lt;code&gt;kubectl apply&lt;/code&gt; or helm install`.&lt;/p&gt;&#xA;&lt;p&gt;However with the &lt;code&gt;GitOps&lt;/code&gt; pattern developers don&amp;rsquo;t modify kubernetes directly; instead they propose changes to a git repository via a Pull Request which when it gets approved and merged causes the kubernetes cluster to be modified via some kind of operator such as the &lt;a href=&#34;https://github.com/jenkins-x/jx-git-operator&#34;&gt;JayeX git operator&lt;/a&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Pipelines As Code</title>
				<link>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/pipeline_as_code/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/pipeline_as_code/</guid>
				<description>&lt;p&gt;Define your Continuous Integration and Continuous Delivery Pipelines as code and keep them in git with your application code.&lt;/p&gt;&#xA;&lt;p&gt;In JayeX you can see the &lt;a href=&#34;https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/develop/pipelines/editing/#source-layout&#34;&gt;Source Layout&lt;/a&gt; for more detail using standard &lt;a href=&#34;https://github.com/tektoncd/pipeline&#34;&gt;Tekton Pipelines&lt;/a&gt; YAML for defining pipelines in a cloud native self-contained way.&lt;/p&gt;&#xA;&lt;p&gt;One downside with Pipelines As Code is that you can end up copy/pasting lots of YAML into lots of repositories which can become tricky to both maintain and to keep on recent images and configurations.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Trunk Based Development</title>
				<link>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/trunk_based_development/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/trunk_based_development/</guid>
				<description>&lt;p&gt;This approach is essentially:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;use a single branch for releases&lt;/li&gt;&#xA;&lt;li&gt;work in small batches&lt;/li&gt;&#xA;&lt;li&gt;use Continuous Integration to frequently merge changes to the main branch&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;It is described in the &lt;a href=&#34;https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/accelerate/&#34;&gt;Accelerate book&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The idea is to avoid long term feature branches which have a cost in terms of maintenance and being the opposite of Continuous Integration.&lt;/p&gt;&#xA;&lt;p&gt;For more background see the &lt;a href=&#34;https://trunkbaseddevelopment.com/&#34;&gt;Trunk Based Development site&lt;/a&gt; which has lots of examples and approaches.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Automate Continuous Delivery</title>
				<link>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/automate_continuous_delivery/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/automate_continuous_delivery/</guid>
				<description>&lt;p&gt;As described in the &lt;a href=&#34;https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/accelerate/&#34;&gt;Accelerate book&lt;/a&gt;, high performing teams automate their Continuous Delivery.&lt;/p&gt;&#xA;&lt;p&gt;This lets your team focus on delivering business value for your customers rather than writing pipelines by hand.&lt;/p&gt;&#xA;&lt;p&gt;If you use JayeX for your environments and to &lt;a href=&#34;https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/develop/create-project/&#34;&gt;create projects&lt;/a&gt; you will have completely automated Continuous Delivery using &lt;a href=&#34;https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/pipeline_as_code/&#34;&gt;Pipelines As Code&lt;/a&gt;, &lt;a href=&#34;https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/preview_environments/&#34;&gt;Preview Environments&lt;/a&gt; and &lt;a href=&#34;https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/trunk_based_development/&#34;&gt;Trunk Based Development&lt;/a&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Preview Environments</title>
				<link>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/preview_environments/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/preview_environments/</guid>
				<description>&lt;p&gt;If you are using &lt;a href=&#34;https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/trunk_based_development/&#34;&gt;Trunk Based Development&lt;/a&gt; you want to keep the main branch clean and ready to release at all times so you can quickly get important bug fixes out.&lt;/p&gt;&#xA;&lt;p&gt;But how can you shift left and do more testing on changes before you are ready to merge to the main branch?&lt;/p&gt;&#xA;&lt;p&gt;The idea of a &lt;code&gt;Preview Environment&lt;/code&gt; is to spin up a temporary environment to deploy the code from a Pull Request before the change is merged to get fast feedback from your team on the change and to shift left and get more testing done before you agree to merge the change.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Prefer Cloud Over Kubernetes</title>
				<link>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/prefer_cloud_over_kube/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/prefer_cloud_over_kube/</guid>
				<description>&lt;p&gt;You can deploy a database via a helm chart in your kubernetes cluster. Or you can configure your cloud provider to create a managed database offering.&lt;/p&gt;&#xA;&lt;p&gt;You can deploy, say, &lt;a href=&#34;https://www.vaultproject.io/&#34;&gt;vault&lt;/a&gt; as helm charts inside your kubernetes cluster. Or you can use your cloud providers secret store solution such as:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Alibaba Cloud KMS Secret Manager&lt;/li&gt;&#xA;&lt;li&gt;Amazon Secret Manager&lt;/li&gt;&#xA;&lt;li&gt;Azure Key Vault&lt;/li&gt;&#xA;&lt;li&gt;GCP Secret Manager&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;However installing a chart in kubernetes is a very different thing to having a fully managed service which considers things like:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Map Cloud IAM to Kubernetes Service Accounts</title>
				<link>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/map-sa-to-cloud-iam/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://jx-docs-jx-jayex-io-jx-docs-pr-19.infra.jenkins-x.rocks/v3/devops/patterns/map-sa-to-cloud-iam/</guid>
				<description>&lt;p&gt;Cloud providers make it relatively easy to map kubernetes &lt;code&gt;Service Account&lt;/code&gt; resources to cloud IAM roles and accounts which avoids having to expose secrets to access cloud resources which simplifies things and makes your applications more secure.&lt;/p&gt;&#xA;&lt;p&gt;On AWS use &lt;a href=&#34;https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html&#34;&gt;IAM roles for service accounts&lt;/a&gt; (IRSA)&lt;/p&gt;&#xA;&lt;p&gt;On GCP use &lt;a href=&#34;https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity&#34;&gt;Workload Identity&lt;/a&gt; (WLI)&lt;/p&gt;&#xA;&lt;p&gt;In both cases this maps cloud IAM roles to kubernetes &lt;code&gt;ServiceAccount&lt;/code&gt; resources using annotations.&lt;/p&gt;&#xA;&lt;p&gt;This means that you don&amp;rsquo;t have to populate your kubernetes cluster with cluster-admin style cloud IAM secrets - which makes your system more secure and reduces the possibility of accidentally exposing a secret.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
