This page will demonstrate how to get the REACT GUI running on the local developer machine (Windows/Linux/MacOS).
Prerequisites to running the UI
- Building and running CLAMP
- Go to the clamp directory
Inside the clamp directory go to /clamp/extra/bin-for-dev
Code Block language bash ./start-db.sh test
Check docker container id
Code Block language bash docker ps
Log into docker container
Code Block language bash docker exec -it 'container_id' bash
Go into mariadb shell
Code Block language bash mysql -u root -p
- Enter password
Go into cldsdb4 database
Code Block language bash use cldsdb4;
Verify if there is data in the following table 'loop_templates'
Code Block language bash select * from loop_templates;
Once the database is up and running need to start the clamp emulator, by running the following command inside the /clamp/extra/bin-for-dev
Code Block language bash ./start-emulator.sh
Start the backend service by running the command inside the /clamp/extra/bin-for-dev
Code Block language bash ./start-backend.sh
...
Checkout UI from the repo.
Code Block language bash git clone "https://gerrit.nordix.org/onap/policy/gui"
- Change into the "gui-clamp" directory.
Build the UI
Code Block language bash mvn clean install
Start the front end UI
Code Block language bash npm start --scripts-prepend-node-path
- Once the UI starts at localhost:3000 it will ask for credentials:
Login: admin
Password: password