-
Notifications
You must be signed in to change notification settings - Fork 0
BecomingMaintainer
Through a series of tasks, this article aims to bring you up to speed with how to run ViEWS 3, how to fix common issues, and how to contribute new functionality to the system. After completing these tasks, you will have the competence to run and admin ViEWS 3.
- Azure SP credentials
Prerequisites:
- docker => 19.03.8
- docker-compose >= 1.28.6
ViEWS 3 is a system of services. Each service runs in a separate process, and communicates with other services over HTTP. The system runs in Docker, and can easily be put up using the provided Docker Compose file.
Although service based architectures have a lot of advantages, both in terms of performance, maintainability and concern isolation, they can also be a bit tricky to develop on. Not to worry! This step by step guide shows you how.
ViEWS 3 uses Azure both for storing Docker Images, and for storing cached data. The Azure resources are not generally accessible, and require authentication to reach. You authenticate to Azure by providing an auth-file to the running containers.
To make the containers aware of the auth-file, create a file named .env
in
the directory containing the views 3 meta repo containing the following line:
AUTH_FILE=../path/../to/../auth/../file.env
This passes the authentication information on to each container, allowing them to communicate with Azure.
Clone the prio-data/views3 repository. Then, inside the repo folder, do
docker-compose pull
This fetches the latest version of the images for each of the services. Once
you have these, and you've placed the SP file in the ./sp
folder, you can run
docker-compose up
Congratulations! You now have ViEWS3 running locally on your computer.
To develop on the services comprising ViEWS 3, you need to rebuild and replace services with changes. First of all, you need the code for all of the services. If you have already cloned the prio-data/views3 meta-repository, enter it and run:
git submodule init
git pull --recurse-submodules
This downloads the repository for each service. You make changes to a service by editing the code within one of the repositories. Once you have edited some code, and want to see how it works in concert with the other services, run:
docker-compose build
Then to start the composition, you run
docker-compose up
A very practical one-liner that rebuilds and restarts only the services that have changed is:
docker-compose build && docker-compose up --no-deps -d
This lets you quickly iterate on services, seeing how they work after a quick compile-step.