Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Instructions to run KT server locally might be incorrect. #1581

@gmichelo

Description

@gmichelo

I tried to follow the instructions to run the Transparency server locally through Docker Compose. However, I suspect that procedure is not really up-to-date.

Here are the Docker and Docker Compose versions of my local machine:

$ docker-compose --version
docker-compose version 1.25.5, build 8a1c60f6
$ docker version -f '{{.Server.APIVersion}}'
1.40

The docker-compose command listed in the readme is not working.

$ docker-compose -f docker-compose.yml docker-compose.prod.yml up -d

No such command: docker_compose.prod.yml

I believe the right command is the following one, which succeeds for me. The diff is the extra -f between docker-compose.yml and docker-compose.prod.yml.

$ docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

Then, I go for the last command reported in the readme.

$ 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"}'

docker: Error response from daemon: Could not attach to network kt_attachable: rpc error: code = NotFound desc = network kt_attachable not found.

It seems to be missing the step where the Docker's network gets created. I tried to create the network manually through:

$ docker network create --attachable kt_attachable

This seems to solve the first issue, but then another one arises:

$ 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"}'

nc: bad address 'sequencer'
nc: bad address 'sequencer'
nc: bad address 'sequencer'
nc: bad address 'sequencer'
nc: bad address 'sequencer'
nc: bad address 'sequencer'
nc: bad address 'sequencer'
nc: bad address 'sequencer'
nc: bad address 'sequencer'
nc: bad address 'sequencer'
nc: bad address 'sequencer'
nc: bad address 'sequencer'
nc: bad address 'sequencer'
nc: bad address 'sequencer'
nc: bad address 'sequencer'
Operation timed out

I am not sure if I missed some steps. But I believe that the instructions might not be correct in first place.

At this point I tried to follow the commands listed in docker-compose_test.sh, which worked fine and I was able to start a local instance of the KT server.

Should we update the readme with the same set of instructions from docker-compose_test.sh? Or even better, perhaps we might provide a different script to deploy the server locally.

This can be fixed alongside #1580.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions