diff --git a/examples/deployment/kubernetes/provision_tree.sh b/examples/deployment/kubernetes/provision_tree.sh index 4f4c804fe9..3083a61bd6 100755 --- a/examples/deployment/kubernetes/provision_tree.sh +++ b/examples/deployment/kubernetes/provision_tree.sh @@ -14,29 +14,18 @@ fi # Set up tunnel: PORT=35791 -export LOG_URL="http://127.0.0.1:${PORT}" +export LOG_RPC="http://127.0.0.1:${PORT}" -echo kubectl port-forward service/trillian-log-service ${PORT}:8091 -kubectl port-forward service/trillian-log-service ${PORT}:8091 & +echo kubectl port-forward service/trillian-log-service ${PORT}:8090 +kubectl port-forward service/trillian-log-service ${PORT}:8090 & trap "kill %1" 0 1 2 3 4 6 9 15 sleep 3 echo "Creating tree..." -# TODO(al): use cmd/createtree instead. -TREE=$(curl -sb -X POST ${LOG_URL}/v1beta1/trees -d '{ "tree":{ "tree_state":"ACTIVE", "tree_type":"LOG", "hash_strategy":"RFC6962_SHA256", "signature_algorithm":"ECDSA", "max_root_duration":"0", "hash_algorithm":"SHA256" }, "key_spec":{ "ecdsa_params":{ "curve":"P256" } } }') - -echo $TREE - -TREEID=$(echo ${TREE} | jq -r .tree_id) +TREEID=$(go run github.com/google/trillian/cmd/createtree --admin_server=${LOG_RPC}) echo "Created tree ${TREEID}:" -echo ${TREE} | jq - -echo "Initialising tree ${TREEID}:" -STH=$(curl -s -X POST ${LOG_URL}/v1beta1/logs/${TREEID}:init) -echo "Created STH:" -echo ${STH} | jq # stop port-forwarding kill %1