diff --git a/README.md b/README.md index eea82ba72a..1a610413c2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -**N.B. The project is a work in progress and is not ready for production.** +# ALPHA: The project is a work in progress and is not ready for production. # Notary diff --git a/cmd/notary-server/README.md b/cmd/notary-server/README.md index e23220dcd9..4f4ceff375 100644 --- a/cmd/notary-server/README.md +++ b/cmd/notary-server/README.md @@ -1 +1,63 @@ # Notary Server + +Notary Server manages TUF data. It may be configured to use either JWT +or HTTP Basic Auth for authentication. Currently it only supports MySQL +for store of the TUF data, we intend to expand this to other storage +options. + +## Setup for Development + +The notary repository comes with Dockerfiles and a docker-compose file +to faciliate development. Simply run the following commands to start +a notary server with a temporary MySQL database in containers: + +``` +$ docker-compose build +$ docker-compose up +``` + +If you are on Mac OSX with boot2docker or kitematic, you'll need to +update your hosts file such that the name `notary` is associated with +the IP address of your VM (for boot2docker, this can be determined +by running `boot2docker ip`, with kitematic, `echo $DOCKER_HOST` should +show the IP of the VM). If you are using the default Linux setup, +you need to add `127.0.0.1 notary` to your hosts file. + +## Compiling Notary Server + +From the root of this git repository, run `make binaries`. This will +compile the notary and notary-server applications and place them in +a `bin` directory at the root of the git repository (the `bin` directory +is ignored by the .gitignore file). + +## Running Notary Server + +The `notary-server` application has the following usage: + +``` +$ bin/notary-server --help +usage: bin/notary-serve + -config="": Path to configuration file + -debug=false: Enable the debugging server on localhost:8080 +``` + +## Configuring Notary Server + +The configuration file must be a json file with the following format: + +```json +{ + "server": { + "addr": ":4443", + "tls_cert_file": "./fixtures/notary.pem", + "tls_key_file": "./fixtures/notary.key" + } + "logging": { + "level": 5 + } +} +``` + +The pem and key provided in fixtures are purely for local development and +testing. For production, you must create your own keypair and certificate, +either via the CA of your choice, or a self signed certificate. diff --git a/cmd/notary-server/main.go b/cmd/notary-server/main.go index 72f4a6acda..d8ebb9653e 100644 --- a/cmd/notary-server/main.go +++ b/cmd/notary-server/main.go @@ -109,7 +109,7 @@ func main() { } func usage() { - fmt.Println("usage:", os.Args[0], "") + fmt.Println("usage:", os.Args[0]) flag.PrintDefaults() }