A simple example to setup a tekton pipeline on Google Cloud Platform and deploy a webapp on Heroku.
For this demo, I have setup a free GCP Cluster. To setup, follow the process -
-
Setup gcloud on your system - https://cloud.google.com/sdk/docs/install
-
To get your project name, or create a new project - go to the following https://console.cloud.google.com/ and there you will see the relevant details.
-
Run the following commands -
gcloud auth login --no-launch-browser
gcloud config set project <PROJECT_NAME>
gcloud config set compute/zone us-west1-a
gcloud container clusters create test-cluster --num-nodes=1
gcloud container clusters get-credentials test-cluster --zone us-west1-a --project <PROJECT_NAME>
- Deleting a cluster
gcloud container clusters delete test-cluster
- Run the following commands to install Tekton pipeline and Dashboard -
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml
kubectl apply --filename https://storage.googleapis.com/tekton-releases/dashboard/latest/tekton-dashboard-release.yaml
To run the dashboard -
kubectl proxy
The dashboard will be available at http://localhost:8001/api/v1/namespaces/tekton-pipelines/services/tekton-dashboard:http/proxy/
To install resources in the pipeline - run script.sh after logging on to the cluster
sh script.sh