- Install JDK version >= 8
- Install Maven
- Run this script to set it up
- Install Git
- Install Node.js and npm (with nvm)
- Configure default registry:
npm config set registry https://registry.npmjs.org/
- Configure default registry:
- Python version 2.7 + pip for Python 2
- Install Ansible (see Ansible)
Current version of VitamUI depends on Ansible version 2.7.0 in order to run installation scripts.
In order not to interfere with more recent Ansible version, deploy a Python VirtualEnv in which you install Ansible 2.7.0:
- Check that VirtualEnv executable is installed:
apt-get install python-virtualenv
- In a directory of your choice, create the virtual environment:
virtualenv --python=python2.7 vitamUI-ansible
- Activate the environment:
source vitamUI-ansible/bin/activate
- First remove older versions of Ansible before re-installing it:
pip uninstall ansible
. - Si une version d'ansible a été installée via
apt-get install
, il est nécessaire de la désinstaller :apt-get remove ansible
- Install Ansible 2.7.0:
pip install ansible==2.7.0
- Check the version of ansible:
ansible --version
Il est possible que l'ajout du lien vers ansible dans le PATH et/ou qu'un redémarrage soit nécessaire
- Clone project and change ownership:
sudo chown -R $USER vitam-ui/
- Build project using the "right" profile (see Maven profiles and Build)
- Set up environment variables :
SERVICE_NEXUS_URL
andSERVICE_REPOSITORY_URL
- Build project using
vitam
profile (see Build for Vitam developers) - Copy files:
collect-external-client.conf
,access-external-client.conf
,ingest-external-client.conf
,keystore_ihm-demo.p12
andtruststore_ihm-demo.jks
intoapi/api-(iam|referential)/(iam|referential)-internal/src/main/config/dev-vitam/
- Redirect
dev.vitamui.com
URL defined in code tolocalhost
: add this line127.0.0.1 dev.vitamui.com
to yourhosts
(/etc/hosts
) file
/bin/sh: 1: /usr/bin/python: not found
=> Create symlink, for instance:
sudo ln -s /usr/bin/python2.7 /usr/bin/python
Without a profile, only Java projects are build.
This profile is used to build the entire project for dev purposes, backend & frontend included.
- UI modules are packaged with both Java & Angular.
- Angular projects are built without optimization in order to reduce global build time.
- Jasmine Karma tests are launched with the headless chrome.
This profile is used to build the entire project for prod purposes, backend/frontend included.
- UI modules are packaged with both Java & Angular.
- Angular projects are built with optimization.
- Jasmine Karma tests are launched with the headless chrome.
This profile is used to build rpm packages.
Only Maven modules with rpm.skip = false
in their properties are eligible.
This profile is used to push the generated rpm package.
Only Maven modules with rpm.skip = false
in their properties are eligible.
This profile is automatically activated if the option -DskipTests
is used during Maven execution in order to disable Jasmine Karma tests execution.
This profile is used to update sonar information.
This profile is used to build the entire project, backend & frontend included.
- Angular projects are build without optimization in order to reduce global build time.
- Jasmine Karma tests are launched with the headless chrome.
- Jenkins can use this profile.
This profile is used to generate the swagger.json
draft file for swagger documentation. It's only needed for API modules.
This profile is used to generate .html
& .pdf
swagger documentation in tools/swagger/docs/
.
Only Maven modules with rpm.skip = false
in their properties are eligible.
This is the profile to use for all Vitam internal developers.
No integration test is launched during the “normal” build of the project. Integration tests need a full running environment in order to launch API tests & few UI tests also.
This profile should be used to launch integration tests in Jenkins. The configuration used for the tests is available in integration-tests/src/test/resources/application-integration.yml
This profile should be used to launch integration tests in our development environment. The configuration used for the tests is available in integration-tests/src/test/resources/application-dev.yml
This profile should be used to launch API IAM integration tests in our development environment. The configuration used for the tests is available in integration-tests/src/test/resources/application-dev.yml
This profile should be used to launch API Security integration tests in our development environment. The configuration used for the tests is available in integration-tests/src/test/resources/application-dev.yml
This profile should be used to launch UI integration tests in our development environment. The configuration used for the tests is available in integration-tests/src/test/resources/application-dev.yml
Execute this command to build the project with unit tests and without building our angular projects:
mvn clean install
Execute this command to build the project without unit tests and without building our angular projects:
mvn clean install -DskipTests
mvn clean install [-Ddependency-check.skip=true] -Denv.SERVICE_NEXUS_URL=... -Denv.SERVICE_REPOSITORY_URL=... [-DskipTests] -Pvitam
Use the dev
maven profile to build the project with our angular projects.
For our angular projects, the build doesn't generate the sourcemap and doesn't optimize the build.
For the karma tests, we don't generate the code coverage and use the headless chrome.
mvn clean install -Pdev
Use the webpack
maven profile to build the project with our angular projects.
For our angular projects, the build generate the sourcemap and doesn't optimize the build.
For the karma tests, we don't generate the code coverage and use the headless chrome.
mvn clean install -Pwebpack
Use the prod
maven profile to build the project with our angular projects.
For our angular projects, the build generate the sourcemap and optimize the build.
For the karma tests, we don't generate the code coverage and use the headless chrome.
mvn clean install -Pprod
If -DskipTests
id added during the build of dev, webpack or prod, unit tests and karma tests are both ignored.
Use the dev-it
maven profile to build the project with unit tests and integration tests.
mvn clean verify -Pdev-it
For more details see README in integration-tests module.
mvn clean verify -Pintegration
Use the rpm
and webpack
maven profiles to build the project and package to RPM:
mvn clean package -Prpm,webpack
mvn clean verify -Psonar
You can specify properties to change URL and login to sonar:
mvn clean verify -Psonar \
-Dsonar.host.url=http://localhost:9000 \
-Dsonar.login=<TOKEN AUTHENTICATION>
Use the rpm
and webpack
maven profiles to build all artifacts and deploy to NEXUS use:
mvn clean deploy -Prpm,webpack
To generate swagger.json
:
mvn test -Pswagger
In case you change the model part of an object or an entity in one of the projects, it is not essential to regenerate the swagger.json file, you just have to modify it manually by adding the necessary information on the modifications we made on the model part.
To edit the file you can use this website.
To generate index.pdf
and index.html
from swagger.json
:
mvn generate-resources -Pswagger-docs
Pour lancer VITAM en mode développement et permettre à VITAMUI d'accéder à ces APIs, voir la configuration suivante.
├── tools
│ ├── docker
│ │ ├── mongo: './restart_dev.sh'
├── tools
│ ├── docker
│ │ ├── mail: './start.sh'
├── api
│ ├── api-security
│ │ ├── security-internal: 'mvn clean spring-boot:run [-Puse-profile-here]' ou './run.sh'
├── api
│ ├── api-iam
│ │ ├── iam-internal: 'mvn clean spring-boot:run [-Puse-profile-here]' ou './run.sh'
├── api
│ ├── api-iam
│ │ ├── iam-external: 'mvn clean spring-boot:run [-Puse-profile-here]' ou './run.sh'
├── api
│ ├── api-ingest
│ │ ├── ingest-internal: 'mvn clean spring-boot:run' ou './run.sh'
├── api
│ ├── api-collect
│ │ ├── collect-internal: 'mvn clean spring-boot:run' ou './run.sh'
├── api
│ ├── api-archive-search
│ │ ├── archive-search-internal: 'mvn clean spring-boot:run' ou './run.sh'
├── api
│ ├── api-ingest
│ │ ├── ingest-external: 'mvn clean spring-boot:run' ou './run.sh'
La surcharge faite sur CAS nous empêche de lancer avec le plugin spring-boot
CAS-Server dépend de security-internal, iam-internal & iam-external
├── cas
│ ├── cas-server: './run.sh'
└── ui
├── ui-frontend: 'npm run start:portal'
└── ui
├── ui-frontend: 'npm run start:identity'
└── ui
├── ui-frontend: 'npm run start:ingest'
└── ui
├── ui-frontend: 'npm run start:archive-search'
└── ui
├── ui-frontend: 'npm run start:collect'
└── ui
├── ui-frontend: 'npm run start:pastis'
- UI-Frontend
- Ui-Back
Attention : sans cette étape, le logout sur toutes les applications par CAS ne fonctionne pas.
18 - Lancer l'application 'design-system' contenant des exemples de composants graphiques du design system
└── ui
├── ui-frontend: 'npm run start:design-system'