diff --git a/docs/01-getting-started.md b/docs/01-getting-started.md index f8549914ef..18f649d903 100644 --- a/docs/01-getting-started.md +++ b/docs/01-getting-started.md @@ -17,20 +17,26 @@ The Sleeper CLI has the following dependencies: ### Installation The Sleeper CLI contains Docker images with the necessary dependencies and scripts to work with Sleeper. Run the -following commands to install the latest nightly build of the CLI. +following commands to install the latest development version of the CLI. ```bash -curl "https://raw.githubusercontent.com/gchq/sleeper/main/scripts/cli/install.sh" -o ./sleeper-install.sh +curl "https://raw.githubusercontent.com/gchq/sleeper/develop/scripts/cli/install.sh" -o ./sleeper-install.sh chmod +x ./sleeper-install.sh -./sleeper-install.sh +./sleeper-install.sh develop ``` -You can also specify a version to install. This can be `main` for the latest nightly build, or a release in the -format `v0.20.0`. These correspond to a branch or tag in the GitHub repository. You can find a list of released -versions [here](https://github.com/gchq/sleeper/tags), and the change log [here](../CHANGELOG.md). +This will install the latest development version. This will not have been as fully tested as released versions and may +not work as expected. Most users should use the latest released version. You can find a list +of released versions [here](https://github.com/gchq/sleeper/tags), and the change log [here](../CHANGELOG.md). -If you're a developer you can get the latest development version as `develop`. This is an untested version and may not -work. When all the tests pass this is published to `main` as a nightly build. +**Due to a bug in GitHub, it is not currently possible to install released versions this way.** See the following +issue: https://github.com/gchq/sleeper/issues/2494 + +To use a released version, please follow the [developer guide](11-dev-guide.md) to build the CLI from source. + +If the bug is fixed, you can replace `develop` with `main` for the latest release, or a release in the format `v0.20.0`. +These correspond to a branch or tag in the GitHub repository. If you do not specify a version on the command line, it +will default to the latest release. ```bash curl "https://raw.githubusercontent.com/gchq/sleeper/[version]/scripts/cli/install.sh" -o ./sleeper-install.sh diff --git a/docs/02-deployment-guide.md b/docs/02-deployment-guide.md index dff5915e17..c4b4df5c72 100644 --- a/docs/02-deployment-guide.md +++ b/docs/02-deployment-guide.md @@ -7,7 +7,7 @@ This contains instructions on how to deploy Sleeper. You will need to get your environment set up correctly so that you can deploy a Sleeper instance to AWS and then interact with it. See [getting started](01-getting-started.md) for how to install the Sleeper CLI. The information -below provides more detail. +below provides more detail on how to use it. ### Configure AWS diff --git a/docs/11-dev-guide.md b/docs/11-dev-guide.md index 2f54617037..b281642122 100644 --- a/docs/11-dev-guide.md +++ b/docs/11-dev-guide.md @@ -6,8 +6,8 @@ This is a brief guide to developing Sleeper. ## Get your environment setup Before you do any dev work on Sleeper it is worth reading the "Get your environment setup" section in -the [deployment guide](02-deployment-guide.md) as exactly the same will apply here, especially for running the system -tests. +the [deployment guide](02-deployment-guide.md). Once you've built the system, exactly the same will apply here with a +copy that you built yourself. ### Install Prerequisite Software @@ -27,8 +27,16 @@ Git repository. This will start a shell with all the Sleeper dependencies instal system. If you run your IDE from that shell, the dependencies will be available in your IDE. You can run `nix-shell` again whenever you want to work with Sleeper. -You can also download [shell.nix](/shell.nix) directly and run `nix-shell shell.nix` if you'd like to get a shell -without running Git. You can then `git clone` the repository from there. +You can also download [shell.nix](/shell.nix) directly if you'd like to avoid installing Git. You can then `git clone` +the repository from the Nix shell. Here's an example to get the latest release: + +```bash +curl "https://raw.githubusercontent.com/gchq/sleeper/main/shell.nix" -o ./shell.nix +nix-shell ./shell.nix +git clone https://github.com/gchq/sleeper.git +cd sleeper +git checkout --track origin/main +``` If you're working with the Sleeper CLI, you can use `sleeper builder` to get a shell inside a Docker container with the dependencies pre-installed. You'll need to clone the Git repository, and this will be persisted between executions @@ -49,14 +57,33 @@ into the scripts directory so that the scripts work. ./scripts/build/buildForTest.sh ``` -Maven (removing the '-Pquick' option will cause the unit and integration tests -to run): +### Sleeper CLI + +To build the Sleeper CLI, you can run this instead: + +```bash +./scripts/cli/buildAll.sh +``` + +Use `./scripts/cli/runInDocker.sh` to run the built CLI. This will act the same as running the `sleeper` +command after installing the CLI. You can manually install it if you copy that script somewhere, rename it to `sleeper`, +and put it on the system path. Then `sleeper ...` commands will work as though you'd installed it normally. + +If you have the CLI installed already it will be replaced with the version that is built. If the `runInDocker.sh` script +is different in the version you installed before, it will not be replaced. You can find it +at `$HOME/.local/bin/sleeper`, and manually overwrite it with the contents of `./scripts/cli/runInDocker.sh`. + +### Java + +To build the Java code only, without installing it for the scripts: ```bash cd java mvn clean install -Pquick ``` +Removing the '-Pquick' option will cause the unit and integration tests to run. + ## Using the codebase The codebase is structured around the components explained in the [design document](12-design.md). The elements of the