This document guides you through the process of spinning up an example Trillian deployment on Google Cloud using Kubernetes and Cloud Spanner.
- You should have this repo checked out :)
- A recent Debian based distribution (other platforms may work, but YMMV)
- You must have the
jq
binary installed (for command-line manipulation of JSON) - You have
gcloud
/kubectl
/go
/Docker
etc. installed (See Cloud quickstart docs) - You have a Google account with billing configured
- You may need to request additional Quota for Compute Engine "in-use IP addresses" (need >= 11) link
- Go to Google Cloud Console
- Create a new project
- Edit the example-config.sh file, set
PROJECT_ID
to the ID of your project - Run:
./create.sh example-config.sh
. This script will create the Kubernetes cluster, node pools, and Spanner database, service account and etcd cluster. It should take about 5 to 10 minutes to finish and must complete without error. - Now you can deploy the Trillian services.
Run:
./deploy.sh example-config.sh
This will build the Trillian Docker images, tag them, and create/update the Kubernetes deployment. - To update a running deployment, simply re-run
./deploy.sh example-config.sh
at any time.
You should now have a working Trillian Log deployment in Kubernetes.
NOTE: none of the Trillian APIs are exposed to the internet with this config, this is intentional since the only access to Trillian should be via a personality layer.
To do something useful with the deployment, you'll need provision one or more trees into the Trillian log, and run a "personality" layer.
To provision a tree into Trillian, use the provision_tree.sh
script (which
uses kubectl
to forward requests to the Trillian Log's admin API):
./provision_tree.sh example-config.sh
Make a note of the tree ID for the new tree.
Next, you may wish to deploy the Certificate Transparency personality. The CT repo includes Kubernetes instructions and deployment configurations.
- This deployment is quite tightly coupled to Google Cloud Kubernetes
- Only CloudSpanner is supported currently
- There is no Trillian Map support currently (because there is no map support in the current CloudSpanner storage implementation).