Miscellaneous

One Line Developer Experience – Terraform, ArgoCD, Crossplane, and Shipa

As we kick off the new year and our release of Shipa 1.5.0, dabbling in the art of the possible, what if it was possible to provide your developers with a single line of configuration to get their ideas into production. Shipa is an application and policy abstraction layer which easily integrates with your DevOps toolchains. In this example, we will show what platform engineering or DevOps teams can create to allow for development teams to only have to make a change to a singular line of YAML to get their ideas into production. 

The Logical Setup

Shipa integrates with several Infrastructure-as-Code [IaC] providers. Depending on your organization, you can use one or multiple IaC’s with Shipa.  The goal is that developers will not have a high burden leveraging the Shipa abstractions. 

ArgoCD and Shipa

ArgoCD is a popular GitOps Engine. ArgoCD can be used to watch Kubernetes Manifests and apply them when there is a change in a git repository or re-apply them when there is a change in the Kubernetes cluster state.  Shipa has multiple abstractions but one abstraction to expose to a developer can be the Shipa deployment object. Shipa’s deployment object can be managed with Crossplane e.g creating a Kubernetes Manifest for Shipa’s object which ArgoCD can watch and act upon. 

From a platform engineering/DevOps perspective, Shipa itself can be automated by leveraging the same Iac e.g Crossplane or if you/your team is more comfortable with Terraform can manage the Shipa specific pieces. 

Terraform and Shipa

Finally once ArgoCD is wired to watch for the specific Crossplane Shipa deployment object, all your engineering resource has to do is make a change to the manifest and ArgoCD and Shipa are off to the races. 

One line YAML Change

Putting this together is straightforward and certainly will supercharge your developer experience [DX].

Putting This Example Together 

Potentially you can run all of this in one Kubernetes cluster as an example. Though to mimic a more operational example, you can leverage one Kubernetes cluster as a control plane e.g with ArgoCD, Shipa Controller, and Crossplane running, and then one Kubernetes cluster designated for your workload. This example also works fine with Shipa Cloud.

Shipa

The first item you will need is Shipa. You can sign up for Shipa Cloud or if you want to install Shipa yourself can leverage the self-hosted installation. Shipa has a few objects e.g a Framework, Cluster, and Application that are needed but can break those into the IaCs. 

ArgoCD

The instructions to install ArgoCD are available in their documentation. Once installed, will need to create a Project with the proper permissions which are listed in the Shipa Documentation for ArgoCD. 

Terraform

We have a pretty detailed blog on setting up Shipa and Terraform for the first time. That is a great piece to go through. You can remove the “tf-app-deploy” Terraform Resource as this will be fronted by Crossplane. 

Remove

TF Resource to Remove

At this point, you will also wire the workload cluster to Shipa e.g where you are deploying your application to. The Terraform Blog walks you through how to generate the needed items. There is an automated auto-wire framework for Terraform if looking to automate the TF steps. 

Crossplane

We also have a pretty detailed blog on installing and leveraging Shipa and Crossplane together. When following the blog, will need to install Crossplane then the Crossplane Provider for Shipa and necessary secrets. The one item to hold off on will be the Application Deployment Object which can be committed to git and then point ArgoCD to that single object. 

Manifests to Install in the Control Plane K8s Cluster:

kubectl apply -f crossplane-provider-shipa.yaml
kubectl apply -f crossplane-secret.yaml
kubectl apply -f crossplane-shipa-config.yaml

Now you are ready to run the example.

Running the Example

Putting it all together with all of the Shipa Objects out of the way, ArgoCD will need to just point to the Crossplane Deployment Manifest. For example, you can create a repository in your GitHub account and have a singular YAML file like this one. You can change the image name to something else like “docker.io/wordpress”.

The Shipa Documentation has the ArgoCD Project and ArgoCD Application permissions needed. 

Once wired, all you have to do is click Synch on the Project and you are off to the races. 

ArgoCD and Shipa Synch

You can navigate back to Shipa, then Applications, then the Application you created in Terraform, then Application Details. 

Shipa Application

Click on the Endpoint link and can check out your running application!

Shipa Deployed App

Now you are well on your way to supercharging your developer experience. 

It’s All About DX

One of the bigger trends in DevOps in 2022 is Developer Experience. There is so much burden shifting left towards the development teams that disseminating expertise and accomplishing goals can take time. Providing development teams with a convention-based abstraction to production will make a lasting impact on DX. 

Cheers,

-Ravi