The project aims to demonstrate auxiliary staging mechanism for CloudFoundry applications using Tekton and Cloud Native Buildpacks(CNB).
- k8s cluster(v1.15+)
- Install tekton on your k8s cluster by following instructions here.
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml
-
In order to access tekton Dashboard run the following command and access it on http://localhost:9097:
kubectl --namespace tekton-pipelines port-forward svc/tekton-dashboard 9097:9097
Clone the repo and install the tekton task which builds the app image using CNB:
kubectl create namespace build
kubectl apply -f task/buildpacks-v3.yaml
- Create a secret and a service account which will store your docker registry credentials:
kubectl apply -f auth/secret.yaml
kubectl apply -f auth/serviceaccount.yaml
- Replace the appropriate values for
serviceAccountName
, git repo of your app, andoutputs.resources.image.url
to be built intaskruns/build-run.yaml
and run following command to build and push app image to the specificed docker registry.
kubectl apply -f taskruns/build-run.yaml
-
In order to deploy the app container image you need to have a running CF deployment like kubecf.
-
Install the tekton task to deploy app on CF:
kubectl create namespace deploy
kubectl apply -f tasks/deploy.yaml
- Substibute the appropriate param values in
taskruns/deploy-run.yaml
and deploy the app container image by using following command:
kubectl apply -f taskruns/deploy-run.yaml