Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update links and format #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,38 @@ use in CircleCI Server installs.
This is support tooling that is only useful if you are setting up or managing a
CircleCI Server 3 install, and shouldn't be used as the basis for new projects.

## Usage:
## Usage

`server-keysets <command> <command-arguments>`

Commands:

* `generate` - generate a new keyset.
Arguments:
* `encryption` - generate a keyset for encryption.
* `signing` - generate a keyset for signing/signature verification.
* `encryption` - generate a keyset for encryption.
* `signing` - generate a keyset for signing/signature verification.

Examples:
* `server-keysets generate encryption`
* `server-keysets generate signing`

* `server-keysets generate encryption`
* `server-keysets generate signing`

## Building

This CLI tool is built using [GraalVM's](https://www.graalvm.org/) `native-image` compiler.

### Prerequisites
* [Install GraalVM](https://www.graalvm.org/getting-started/). There is a

* [Install GraalVM](https://www.graalvm.org/docs/getting-started/). There is a
non-official [Homebrew cask](https://github.com/DeLaGuardo/homebrew-graalvm)
available for macOS (at the time of writing this cask was confirmed to be a
graalvm installer by inspection, it is worth confirming before installing).
* Install the [native-image](https://www.graalvm.org/getting-started/#native-images) plugin
* Install the [native-image](https://www.graalvm.org/docs/getting-started/#native-images) plugin
* You will also need a compiler toolchain if you do not have one already
installed. XCode for macOS should be sufficient, similary `gcc` for Linux.

### Compiling the binary

1. `lein clean`
1. `lein uberjar`
1. `lein generate-assisted-configuration` - due to the highly dynamic nature of
Expand All @@ -43,8 +48,10 @@ This CLI tool is built using [GraalVM's](https://www.graalvm.org/) `native-image
1. `lein native` - invokes `native-image` to build the binary

### Using the docker container

`circleci/server-keysets` is a docker image with the generated binary already installed.

Usage is the same as above, for example:
* `docker run circleci/server-keysets generate encryption`
* `docker run circleci/server-keysets generate signing`

* `docker run circleci/server-keysets generate encryption`
* `docker run circleci/server-keysets generate signing`