Internal development platform binary launcher.
WORK IN PROGRESS: This tool is in a pre-release stage and is under active development.
Spin up a complete internal developer platform using industry standard technologies like Kubernetes, Argo, and backstage with only Docker required as a dependency.
This can be useful in several ways:
- Create a single binary which can demonstrate an IDP reference implementation.
- Use within CI to perform integration testing.
- Use as a local development environment for IDP engineers.
make
./idpbuilder create --buildName localdev
Kubernetes: kubectl get pods
Argo: https://argocd.cnoe.localtest.me:8443/
Backstage: https://backstage.cnoe.localtest.me:8443/
The IDP builder binary is primarily composed of a wrapper around a Kubebuilder based operator and associated type called localbuild. See: api/v1alpha1/localbuild_types.go and pkg/controllers/localbuild/controller.go
However it starts out by creating a Kind cluster to register the CRD and controller for localbuild and to host the resources created by it which in turn create the basis for our IDP. You can see the steps taken to install the dependencies and stand up the localbuild controller in the CLI codebase here: pkg/build/build.go
The Kind cluster is created using the Kind library and only requires Docker be installed on the host. See: ReconcileKindCluster
Localbuild's reconciler steps through a number of subreconcilers to create all of the IDP components. See: Subreconcilers
The subreconcilers currently include:
- ReconcileProjectNamespace: Creates a namespace for the Localbuild objects
- ReconcileArgo: Installs ArgoCD
- ReconcileEmbeddedGitServer: Installs a "gitserver" which is another Kubebuilder Operate in this project See: api/v1alpha1/gitserver_types.go
- ReconcileArgoApps Steps through all the "Embedded" Argo Apps and installs them. See: Embedded Apps
Gitserver is essentially a fileserver for the Argo apps that are packaged within this IDP builder. As you might expect, it serves the files used by the ArgoCD apps using the git protocol. You can see the container image that contains these files get built here in the GitServer Reconciler
The embedded Argo apps are created by the Localbuild reconciler See: Argo Apps Then they are picked up by the ArgoCD operator which in turn connects to the GitServer to perform their gitops deployment.
The resources served by the GitServer are contained within this binary here: pkg/apps/srv
They include:
- ArgoCD Ingress: which makes the ArgoCD interface available.
- Backstage: which intalls the Backstage Resources.
- Crossplane: which uses the Crossplane Helm chart to install Crossplane.
- Nginx Ingress Controller: which makes nginx ingresses available on the cluster.
As you can imagine each of these apps are are deployed by ArgoCD to the Kind cluster created by CLI. The Argo apps can be inspected with kubectl in the argocd
namespace and the resources they create can be seen in their corresponding namespaces (backstage
and crossplane
)
If you want to contribute and extend the existing project, make sure that you have installed go (>= 1.20) and cloned this project.
Next, you can build it make
or launch the main.go
within your IDE or locally ./idpbuilder
.
You can override the kind configuration generated by the idpbuilder. For that purpose, look to the console to grab the config and save it in a file:
########################### Our kind config ############################
# Kind kubernetes release images https://github.com/kubernetes-sigs/kind/releases
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
...
######################### config end ############################
Next, import it ./idpbuilder create --kindConfig <path to the config file>
In the future we hope to allow for a pluggable interface to allow for extending the IDP builder with additional argo apps. For now you simply need to add additional apps in the Embedded Apps and also add the resources they will deploy in the srv
folder: pkg/apps/srv