This repo has been developed by the DevOps Lan&Wi-Fi to automate site creation on juniper mist.
- Copy this in your terminal and paste to create the working directory.
mkdir -p ~/mist_working_directory/data_src && cd ~/mist_working_directory
- Copy this in your terminal and paste
curl -o .env https://raw.githubusercontent.com/ministryofjustice/juniper-mist-integration/main/example.env
- Configure .env file: Review the .env file by running:
nano ~/example.env
To fully take advantage of the .env files, you can duplicate them and have different .envs per environment. If you choose to do this make sure you edit the docker run command in step 6 to pass in the correctly named file.
.env-dev
.env-prod
- Create a csv file named:
sites_with_clients.csv
within '~/mist_working_directory/data_src' or copy the example CSV (which is formatted correctly) with the following command to the data directory:
curl -o data_src/sites_with_clients.csv https://raw.githubusercontent.com/ministryofjustice/juniper-mist-integration/main/example.sites_with_clients.csv
- Make sure docker can mount the
~/mist_working_directory
Within Docker Desktop Cog --> Resources --> File Sharing --> add /Users/$YOURUSERNAME/mist_working_directory
- Copy this in your terminal and paste to download and run the Dockerized tooling:
Linux users:
docker pull ghcr.io/ministryofjustice/nvvs/juniper-mist-integration/app:latest; docker run -it -v ./data_src:/data_src --env-file .env ghcr.io/ministryofjustice/nvvs/juniper-mist-integration/app:latest
Windows Users:
docker pull ghcr.io/ministryofjustice/nvvs/juniper-mist-integration/app:latest; docker run -it -v .\data_src:/data_src --env-file .env ghcr.io/ ministryofjustice/nvvs/juniper-mist-integration/app:latest
- Docker
- IDE that integrates with docker (We use IntelliJ in this example)
- Run
make build
- Integrate built docker container with IDE. here is the example for intelliJ
- mark src directory & test directory within the IDE. here
- Setup environment vars within the IDE. IntelliJ_docs & env_file
- To see options run
make help
- If you update requirements.txt, you will need to rebuild the docker container.