From f8f0cd092bcb2cdff2a01fc83a50818141b4a6b0 Mon Sep 17 00:00:00 2001 From: Stephen James Date: Tue, 12 Dec 2023 12:07:00 +0000 Subject: [PATCH 1/4] Formatting for copy button --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 3065c87..e393987 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,10 @@ This repo has been developed by the DevOps Lan&Wi-Fi to automate site creation o Run the following: 1. ```mkdir ~/mist_working_directory && ~/mist_working_directory/data_src && cd ~/mist_working_directory``` + + 2. ```wget -O .env https://github.com/ministryofjustice/juniper-mist-integration/blob/main/example.env``` + 3. Configure .env file: You must either provide MIST_USERNAME and MIST_PASSWORD or MIST_API_TOKEN. If you opt for username and password MFA will be requested during runtime. All other inputs are mandatory: ORG_ID, SITE_GROUP_IDS From 9d44a1ee04ccf6039148957001e1f8daf20429ec Mon Sep 17 00:00:00 2001 From: Stephen James Date: Tue, 12 Dec 2023 12:10:31 +0000 Subject: [PATCH 2/4] Added another layer to force the copy button trying to make it really easy for the users of the tool. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e393987..3287290 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,14 @@ This repo has been developed by the DevOps Lan&Wi-Fi to automate site creation o Run the following: -1. ```mkdir ~/mist_working_directory && ~/mist_working_directory/data_src && cd ~/mist_working_directory``` +1. Copy this in your terminal and paste to create the working directory. + +```mkdir ~/mist_working_directory && ~/mist_working_directory/data_src && cd ~/mist_working_directory``` -2. ```wget -O .env https://github.com/ministryofjustice/juniper-mist-integration/blob/main/example.env``` +2. Copy this in your terminal and paste + +```wget -O .env https://github.com/ministryofjustice/juniper-mist-integration/blob/main/example.env``` 3. Configure .env file: You must either provide MIST_USERNAME and MIST_PASSWORD or MIST_API_TOKEN. If you opt for username From 3ea46983ab85f9903ff7bc282ce8dfe7510e4f70 Mon Sep 17 00:00:00 2001 From: Stephen James Date: Tue, 12 Dec 2023 12:14:39 +0000 Subject: [PATCH 3/4] Another attempt --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3287290..4293f8b 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,16 @@ Run the following: 1. Copy this in your terminal and paste to create the working directory. -```mkdir ~/mist_working_directory && ~/mist_working_directory/data_src && cd ~/mist_working_directory``` +``` +mkdir ~/mist_working_directory && ~/mist_working_directory/data_src && cd ~/mist_working_directory +``` 2. Copy this in your terminal and paste -```wget -O .env https://github.com/ministryofjustice/juniper-mist-integration/blob/main/example.env``` +``` +wget -O .env https://github.com/ministryofjustice/juniper-mist-integration/blob/main/example.env +``` 3. Configure .env file: You must either provide MIST_USERNAME and MIST_PASSWORD or MIST_API_TOKEN. If you opt for username @@ -29,7 +33,11 @@ Test location 2,"102 Petty France, London SW1H 9AJ", FALSE, TRUE, 00000DD0000BC0 Test location 3,"Met Office, FitzRoy Road, Exeter, Devon, EX1 3PB", FALSE, FALSE, 00000DD0000BC0EEE000, 00000DD0000BC0EEE000 ``` -5. ```docker run -it -v $(pwd)/data_src:/data_src --env-file .env docker pull ghcr.io/ministryofjustice/nvvs/juniper-mist-integration/app:latest``` +5. Copy this in your terminal and paste + +``` +docker run -it -v $(pwd)/data_src:/data_src --env-file .env docker pull ghcr.io/ministryofjustice/nvvs/juniper-mist-integration/app:latest +``` ## Development setup From 24695765560d9b8ec7b7745c7b704cb9dd920cf3 Mon Sep 17 00:00:00 2001 From: Stephen James Date: Tue, 12 Dec 2023 12:59:31 +0000 Subject: [PATCH 4/4] Amended some commands so they work correctly --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4293f8b..b06907b 100644 --- a/README.md +++ b/README.md @@ -9,20 +9,21 @@ Run the following: 1. Copy this in your terminal and paste to create the working directory. ``` -mkdir ~/mist_working_directory && ~/mist_working_directory/data_src && cd ~/mist_working_directory +mkdir -p ~/mist_working_directory/data_src && cd ~/mist_working_directory ``` 2. Copy this in your terminal and paste ``` -wget -O .env https://github.com/ministryofjustice/juniper-mist-integration/blob/main/example.env +wget -O .env https://raw.githubusercontent.com/ministryofjustice/main/scope-creep-copy-button/example.env ``` 3. Configure .env file: You must either provide MIST_USERNAME and MIST_PASSWORD or MIST_API_TOKEN. If you opt for username and password MFA will be requested during runtime. All other inputs are mandatory: ORG_ID, SITE_GROUP_IDS , RF_TEMPLATE_ID + 4. Create a csv file named: `sites_with_clients.csv` within '~/mist_working_directory/data_src' Below is an [example](./example.sites_with_clients.csv) of how the CSV should be formatted. @@ -33,10 +34,16 @@ Test location 2,"102 Petty France, London SW1H 9AJ", FALSE, TRUE, 00000DD0000BC0 Test location 3,"Met Office, FitzRoy Road, Exeter, Devon, EX1 3PB", FALSE, FALSE, 00000DD0000BC0EEE000, 00000DD0000BC0EEE000 ``` -5. Copy this in your terminal and paste +or copy the example CSV with the following command to the data directory: + +``` +wget -O data_src/sites_with_clients.csv https://raw.githubusercontent.com/ministryofjustice/juniper-mist-integration/main/example.sites_with_clients.csv +``` + +5. Copy this in your terminal and paste to download and run the Dockerized tooling: ``` -docker run -it -v $(pwd)/data_src:/data_src --env-file .env docker pull ghcr.io/ministryofjustice/nvvs/juniper-mist-integration/app:latest +docker run -it -v $(pwd)/data_src:/data_src --env-file .env ghcr.io/ministryofjustice/nvvs/juniper-mist-integration/app:latest ``` ## Development setup