Skip to content

Instantly share code, notes, and snippets.

@rajaskakodkar
Last active April 27, 2022 17:37
Show Gist options
  • Save rajaskakodkar/ff00d68d10ceeada674cad785ed400e7 to your computer and use it in GitHub Desktop.
Save rajaskakodkar/ff00d68d10ceeada674cad785ed400e7 to your computer and use it in GitHub Desktop.
Deploy Prow on Tanzu Community Edition on AWS
#!/bin/sh
# Prerequisites:
# ~/env.sh exists with aws
export CLUSTER_NAME=mc-test
tanzu management-cluster create -f community-edition/test/aws/cluster-config.yaml
kubectl config use-context mc-test-admin@mc-test
tanzu cluster create test -f ~/community-edition/test/aws/cluster-config.yaml
tanzu cluster kubeconfig get test --admin
kubectl config use-context test-admin@test
tanzu package repository add tce-repo --url projects.registry.vmware.com/tce/main:0.9.1
sleep 60s
tanzu package install cert-manager --package-name cert-manager.community.tanzu.vmware.com --version 1.5.3
tanzu package install contour --package-name contour.community.tanzu.vmware.com --version 1.18.1 -f contour-values.yaml
kubectl create clusterrolebinding cluster-admin-binding-"${USER}" \
--clusterrole=cluster-admin --user="${USER}"
kubectl create ns prow
kubectl create ns test-pods
kubectl create secret -n prow generic hmac-token --from-file=hmac=/home/ubuntu/prow/hook-secret
kubectl create secret -n prow generic github-token --from-file=cert=/home/ubuntu/prow/vagator.pem --from-literal=appid="153819"
kubectl create secret generic github-oauth-config --from-file=secret=github-oauth-config.yaml -n prow
kubectl create secret -n prow generic cookie --from-file=secret=cookie.txt
kubectl apply --server-side=true -f src/k8s.io/test-infra/config/prow/cluster/prowjob_customresourcedefinition.yaml
kubectl -n prow create secret generic gcs-credentials --from-file=/home/ubuntu/service-account.json
kubectl -n test-pods create secret generic gcs-credentials --from-file=/home/ubuntu/service-account.json
kubectl create configmap plugins --from-file=plugins.yaml=plugins.yaml --dry-run=client -oyaml | kubectl apply -f - -n prow
kubectl create configmap config --from-file=config.yaml=config.yaml --dry-run=client -oyaml | kubectl apply -f - -n prow
kubectl create configmap job-config --from-file=src/vagator/test-infra/config/jobs/test-prow/test.yaml --dry-run=client -oyaml | kubectl apply -f - -n prow
kubectl apply -f starter.yaml
kubectl get ingress -n prow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment