forked from google/keytransparency
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose_test.sh
More file actions
executable file
·37 lines (33 loc) · 1.32 KB
/
docker-compose_test.sh
File metadata and controls
executable file
·37 lines (33 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
set -ex
set -o pipefail
if [ ! -f genfiles/key.pem ]; then
./scripts/gen_monitor_keys.sh -f
cd genfiles
go run "$(go env GOROOT)/src/crypto/tls/generate_cert.go" --host localhost,127.0.0.1,::
cd -
fi
export TRAVIS_COMMIT=$(git rev-parse HEAD)
docker-compose build --parallel
# Assumes there is a docker swarm already configured.
# docker swarm init
docker stack deploy -c docker-compose.yml -c docker-compose.prod.yml kt
trap "docker stack rm kt" INT EXIT
./scripts/docker-stack-wait.sh -t 180 -n sequencer kt
docker run -t --network kt_attachable gcr.io/key-transparency/init:${TRAVIS_COMMIT} sequencer:8080 -- curl -k -X POST https://sequencer:8080/v1/directories -d'{"directory_id":"default","min_interval":"1s","max_interval":"60s"}'
./scripts/docker-stack-wait.sh -t 180 kt
wget -T 60 --spider --retry-connrefused --waitretry=1 http://localhost:8081/readyz
wget -T 60 -O /dev/null --no-check-certificate \
--retry-connrefused --waitretry=1 \
--retry-on-http-error=405,404,503 \
https://localhost/v1/directories/default
PASSWORD="foobar"
go run ./cmd/keytransparency-client authorized-keys create-keyset --password=${PASSWORD}
go run ./cmd/keytransparency-client post foo@bar.com \
--insecure \
--data='dGVzdA==' \
--password=${PASSWORD} \
--kt-url=localhost:443 \
--verbose \
--timeout=2m \
--logtostderr