diff --git a/Dockerfile b/Dockerfile index 8173e64fe6ed358b7131a6472bd5010927514782..d5edb6c60044307a90ccbb44015043be31739fd6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM golang:1.6 ADD . /go/src/github.com/nsheridan/cashier +ONBUILD COPY . /go/src/github.com/nsheridan/cashier WORKDIR /go/src/github.com/nsheridan/cashier +RUN go install github.com/nsheridan/cashier/cmd/cashierd -RUN go install -v - -ENTRYPOINT /go/bin/cashier +ENTRYPOINT /go/bin/cashierd diff --git a/README.md b/README.md index 90d09a1e0dd02243b4766fbebb7af70474e9888d..512e2987990f05de392526ecdab2c0fe600afef6 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ The command on the user's machine receives the certificate and loads it and the The user can now ssh to the production machine, and continue to ssh to any machine that trusts the CA signing key until the certificate is revoked or expires or is removed from the agent. # Usage -Cashier comes in two parts, a [client](client) and a [server](server). +Cashier comes in two parts, a [cli](cmd/cashier) and a [server](cmd/cashierd). The client is configured using command-line flags. The server is configured using a JSON configuration file - [example](exampleconfig.json). @@ -44,6 +44,14 @@ For the server you need the following: - A new ssh private key. Generate one in the usual way using `ssh-keygen -f ssh_ca` - this is your CA signing key. At this time Cashier supports RSA, ECDSA and Ed25519 keys. *Important* This key should be kept safe - *ANY* ssh key signed with this key will be able to access your machines. - Google OAuth credentials which you can generate at the [Google Developers Console](https://console.developers.google.com). You also need to set the callback URL here. +# Quick start +## Installation using Go tools +1. Use the Go tools to install cashier. The binaries `cashierd` and `cashier` will be installed in your $GOPATH. +``` +go get github.com/cashier/cmd/... +``` +2. Create a signing key with `ssh-keygen` and a [config.json](exampleconfig.json) +3. Run the cashier server with `cashierd` and the cli with `cashier`. # Configuration Configuration is divided into three sections: `server`, `auth`, and `ssh`. diff --git a/client/client_test.go b/cmd/cashier/client_test.go similarity index 100% rename from client/client_test.go rename to cmd/cashier/client_test.go diff --git a/client/keys.go b/cmd/cashier/keys.go similarity index 100% rename from client/keys.go rename to cmd/cashier/keys.go diff --git a/client/main.go b/cmd/cashier/main.go similarity index 100% rename from client/main.go rename to cmd/cashier/main.go diff --git a/server.go b/cmd/cashierd/main.go similarity index 100% rename from server.go rename to cmd/cashierd/main.go