From 9f9744a77f5d08bfa5aafb7a31611c61692402a9 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Mon, 25 Oct 2021 14:49:22 +0200 Subject: [PATCH 1/4] Docs: Update docker Upgrading section --- docs/content/setup/docker.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/content/setup/docker.md b/docs/content/setup/docker.md index f195caf34..92f076655 100644 --- a/docs/content/setup/docker.md +++ b/docs/content/setup/docker.md @@ -63,16 +63,16 @@ been signed by a private certificate authority. ### 3b. Start Monkey Island with user-provided certificate -1. Create a directory named `monkey_island_data`. This will serve as the - location where Infection Monkey stores its configuration and runtime - artifacts. +1. Create a directory named `monkey_island_data`. If you already have it, + **make sure it's empty**. This will serve as the location where Infection + Monkey stores its configuration and runtime artifacts. ```bash mkdir ./monkey_island_data chmod 700 ./monkey_island_data ``` -1. Run Monkey Island with the `--setup-only` flag to populate the `./monkey_island_data` directory with a default `server_config.json` file. +2. Run Monkey Island with the `--setup-only` flag to populate the `./monkey_island_data` directory with a default `server_config.json` file. ```bash sudo docker run \ @@ -84,16 +84,16 @@ been signed by a private certificate authority. guardicore/monkey-island:VERSION --setup-only ``` -1. Move your `.crt` and `.key` files to `./monkey_island_data`. +3. Move your `.crt` and `.key` files to `./monkey_island_data`. -1. Make sure that your `.crt` and `.key` files are readable and writeable only by you. +4. Make sure that your `.crt` and `.key` files are readable and writeable only by you. ```bash chmod 600 ./monkey_island_data/ chmod 600 ./monkey_island_data/ ``` -1. Edit `./monkey_island_data/server_config.json` to configure Monkey Island +5. Edit `./monkey_island_data/server_config.json` to configure Monkey Island to use your certificate. Your config should look something like this: ```json {linenos=inline,hl_lines=["11-14"]} @@ -114,7 +114,7 @@ been signed by a private certificate authority. } ``` -1. Start the Monkey Island server: +6. Start the Monkey Island server: ```bash sudo docker run \ @@ -135,6 +135,10 @@ Currently, there's no "upgrade-in-place" option when a new version is released. To get an updated version, download it, stop the current container and run the installation commands again with the new file. +When running an updated version using a volume make sure that you have empty +volume for the Island. Also make sure that you don't have an old mongodb +volume. + If you'd like to keep your existing configuration, you can export it to a file using the *Export config* button and then import it to the new Monkey Island. From a399e8a0ea3decbb7e907d5ce416e7330c467dc9 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Mon, 25 Oct 2021 17:30:25 +0300 Subject: [PATCH 2/4] Docs: reverted the numbering to use 1. instead of manual numeration in docker.md --- docs/content/setup/docker.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/content/setup/docker.md b/docs/content/setup/docker.md index 92f076655..774813530 100644 --- a/docs/content/setup/docker.md +++ b/docs/content/setup/docker.md @@ -72,7 +72,7 @@ been signed by a private certificate authority. chmod 700 ./monkey_island_data ``` -2. Run Monkey Island with the `--setup-only` flag to populate the `./monkey_island_data` directory with a default `server_config.json` file. +1. Run Monkey Island with the `--setup-only` flag to populate the `./monkey_island_data` directory with a default `server_config.json` file. ```bash sudo docker run \ @@ -84,16 +84,16 @@ been signed by a private certificate authority. guardicore/monkey-island:VERSION --setup-only ``` -3. Move your `.crt` and `.key` files to `./monkey_island_data`. +1. Move your `.crt` and `.key` files to `./monkey_island_data`. -4. Make sure that your `.crt` and `.key` files are readable and writeable only by you. +1. Make sure that your `.crt` and `.key` files are readable and writeable only by you. ```bash chmod 600 ./monkey_island_data/ chmod 600 ./monkey_island_data/ ``` -5. Edit `./monkey_island_data/server_config.json` to configure Monkey Island +1. Edit `./monkey_island_data/server_config.json` to configure Monkey Island to use your certificate. Your config should look something like this: ```json {linenos=inline,hl_lines=["11-14"]} @@ -114,7 +114,7 @@ been signed by a private certificate authority. } ``` -6. Start the Monkey Island server: +1. Start the Monkey Island server: ```bash sudo docker run \ From d14e4dee3198e65cef10a86df953c1452ce6d2b1 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Mon, 25 Oct 2021 18:54:28 +0200 Subject: [PATCH 3/4] Docs: Reword Docker upgrading section --- docs/content/setup/docker.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/content/setup/docker.md b/docs/content/setup/docker.md index 774813530..64f436335 100644 --- a/docs/content/setup/docker.md +++ b/docs/content/setup/docker.md @@ -135,9 +135,10 @@ Currently, there's no "upgrade-in-place" option when a new version is released. To get an updated version, download it, stop the current container and run the installation commands again with the new file. -When running an updated version using a volume make sure that you have empty -volume for the Island. Also make sure that you don't have an old mongodb -volume. +If you've configured Monkey Island to use a docker volume to store runtime data, +make sure that it is empty before upgrading the Infection Monkey. Also make sure +that you use a clean volume for MongoDB, as database schemas may not be compatible +between different versions of the Infection Monkey. If you'd like to keep your existing configuration, you can export it to a file using the *Export config* button and then import it to the new Monkey Island. From c91d922277aa88d94156e6db0cb831b8ad7a2ed1 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 25 Oct 2021 12:57:40 -0400 Subject: [PATCH 4/4] Docs: Clarify "upgrade proceedure" for docker --- docs/content/setup/docker.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/content/setup/docker.md b/docs/content/setup/docker.md index 64f436335..b38a27ee9 100644 --- a/docs/content/setup/docker.md +++ b/docs/content/setup/docker.md @@ -33,6 +33,10 @@ The Infection Monkey Docker container works on Linux only. It is not compatible ``` ### 2. Start MongoDB +{{% notice info %}} +If you are upgrading the Infection Monkey to a new version, be sure to remove +any MongoDB containers or volumes associated with the previous version. +{{% /notice %}} 1. Start a MongoDB Docker container: @@ -62,6 +66,10 @@ been signed by a private certificate authority. ``` ### 3b. Start Monkey Island with user-provided certificate +{{% notice info %}} +If you are upgrading the Infection Monkey to a new version, be sure to remove +any volumes associated with the previous version. +{{% /notice %}} 1. Create a directory named `monkey_island_data`. If you already have it, **make sure it's empty**. This will serve as the location where Infection @@ -132,13 +140,9 @@ After the Monkey Island docker container starts, you can access Monkey Island by ## Upgrading Currently, there's no "upgrade-in-place" option when a new version is released. -To get an updated version, download it, stop the current container and run the -installation commands again with the new file. - -If you've configured Monkey Island to use a docker volume to store runtime data, -make sure that it is empty before upgrading the Infection Monkey. Also make sure -that you use a clean volume for MongoDB, as database schemas may not be compatible -between different versions of the Infection Monkey. +To get an updated version, download it, stop and remove the current Monkey +Island and MongoDB containers and volumes, and run the installation commands +again with the new file. If you'd like to keep your existing configuration, you can export it to a file using the *Export config* button and then import it to the new Monkey Island.