Administration portal for sec-psc.
This project was generated with Angular CLI version 17.2.2.
This ecosystem uses many independant components, some of which live an independant life in distinct repositories.
For each release of psc-admin-portal
, the psc-components' distribution history
file will need to be updated with the new version, so that we can keep track of compatible component versions,
and go back to a previous working distribution if need be.
The license header check gets performed as part of each container build. If the check fails,
the container build will fail. If this happens, use the license/license-format.sh
script to draft the header bump commit. Always check the result before committing : the tool mostly works,
but in some corner cases (some partial match with the header with too much difference) it will make invalid change
that needs to be manually fixed.
- You need bash and docker, directly or in a linux virtual machine like WSL or VirtualBox.
- You need to map the
sec-psc.wom.dev.henix.fr
domain name to the interface the proxy will be listening to. The launch script defaults to127.0.0.2
, but if you need this proxy to listen to a specific interface, set theHOST_ADDRESS
shell variable before running. - You need all sec-psc git repositories checked-out in the same directory. For this to work, do not working copies need to be checked-out under the default directory name created by git clone.
-
Docker containers won't run in WSL
-
First of all, please check that you have WSL2 active (WSL1 does not allow docker to work properly)
-
If you do run WSL2, check the docker daemon status with :
sudo service docker status
If the answer is not docker is running, the start it :
sudo service docker start
-
-
Docker containers don't have network access
This migh result from docker's private subnet in the 172.17.xx.xx colliding with the WSL2 VM's random IP adress if this address is in the 172.17.xx.xx range. To ensure this won't happen, you need to tweak docker's daemon configuration to change its private subnet IP range. If your WSL2 VM runs a debian or dervied distro, follow these steps :
-
Open the
/etc/default/docker
as adminsudo nano /etc/default/docker
-
Change the DOCKER_OPT line
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
to
DOCKER_OPTS="----bip 198.168.50.1/24"
-
Two helper processes may be run as docker containers :
-
Development proxy
To be able to run the angular portal in development mode, you need a reverse proxy for service calls. The mapping to backend processes IP and PORT is defined in the
scripts/service-addresses.conf
file. This file is not committed, but generated from thescripts/service-addresses.conf.in
file if it does not exist. Default values are OK if you run backends alongside the proxy container using the script (see Running backend processes). If this is not your configuration, adjust the IP or PORT variables as you need. -
Mongodb database for the backends
Both containers can be launched by running the scripts/launch_dev_helpers.sh
script.
Launch the scripts/launch_dev_backends.sh
script.
To stop the backend, launch the scripts/stop_dev_backends.sh
script.
After launching development processes (see above), processes may be tested using two datasets :
-
Creation dataset
This dataset is in the file
src/test/resources/rass-2000-lignes.txt
. To load it:- first copy the (empty)
target/rass-archive-mock.txt
file created by dev helpers into thetarget/pscload_files
directory. - then copy the
src/test/resources/rass-2000-lignes.txt
file content into thetarget/pscload_files/rass-archive-mock.txt
file. - The process will run all along by itself (no restriction on PS creations)
- first copy the (empty)
-
The complete deletion dataset
This dataset is the empty rass mock extract created by the dev helpers. To load it :
- Empty the
target/pscload_files
directory - Launch the process
- Deleting 2000 PS will trigger an alert (which can be bypassed from the gestion des alertes action pane)
- Empty the
To test the process in qualification (cloud) environments, make sure the qualification environment can access raw github resources and see the rass-loader qualification procedure.