Skip to content

Instantly share code, notes, and snippets.

@cdelashmutt-pivotal
Last active June 18, 2024 21:22
Show Gist options
  • Save cdelashmutt-pivotal/b86136446a455b086c2e8eafc314c34c to your computer and use it in GitHub Desktop.
Save cdelashmutt-pivotal/b86136446a455b086c2e8eafc314c34c to your computer and use it in GitHub Desktop.
App Engine Commands to Remember
# Set config up for `tanzu build`
#
# The <your-container-registry-host-and-path> is the registry and sub-path you want to use to store built container images
# for your demos. This registry host needs to be accessible from your demo workstation and from the cluster you are trying
# to deploy to. If you can use one of the public registries (DockerHub, GCR, Azure Container Registry, etc) that are
# already trusted and also set them to allow anyone to pull from them, your life will be easier for demos.
tanzu build config --build-plan-source-type=ucp --containerapp-registry <your-container-registry-host-and-path>/{name}
# Clean up deployed demo app in a space (needed until we have `tanzu app delete`)
KUBECONFIG=$HOME/.config/tanzu/kube/config kapp delete -a applyapp --dangerous-ignore-failing-api-services
# Trust private space CA on your Mac.
# The namespace that contains the CA if you are using the "multicloud-cert-manager" trait in your target cluster
# will be <space name>-<longerGeneratedText>-<shortGeneratedText>
kubectl get secret -n <your-space-namespace-in-k8s-cluster> root-secret -o jsonpath="{.data.tls\.crt}" | base64 -d > $HOME/ca.crt ; sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain $HOME/ca.crt ; rm $HOME/ca.crt
# Delete that private space CA
# You will need to change "ca.company.biz" to match the "Self Signed CommonName" setting for the "multicloud-cert-manager" trait if you
# changed it from defaults
sudo security delete-certificate -c ca.company.biz -t /Library/Keychains/System.keychain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment