Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page will demonstrate how to get the REACT GUI running on the local developer machine (Windows/Linux/MacOS). 


Prerequisites to running the UI

  1. Building and running CLAMP

  2. Go to the clamp directory

  3. Inside the clamp directory go to /clamp/extra/bin-for-dev

    Code Block
    languagebash
    ./start-db.sh test


  4. Check docker container id

    Code Block
    languagebash
    docker ps


  5. Log into docker container

    Code Block
    languagebash
    docker exec -it 'container_id' bash


  6. Go into mariadb shell

    Code Block
    languagebash
    mysql -u root -p


  7. Enter password



  8. Go into cldsdb4 database

    Code Block
    languagebash
    use cldsdb4;


  9. Verify if there is data in the following table 'loop_templates'

    Code Block
    languagebash
    select * from loop_templates;


  10. 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
    languagebash
    ./start-emulator.sh


  11. Start the backend service by running the command inside the /clamp/extra/bin-for-dev

    Code Block
    languagebash
    ./start-backend.sh


Checking out and building the UI

  1. Checkout UI from the repo.

    Code Block
    languagebash
    git clone "https://gerrit.nordix.org/onap/policy/gui"


  2. Change into the "gui-clamp" directory.

  3. Build the UI

    Code Block
    languagebash
    mvn clean install


  4. Start the front end UI

    Code Block
    languagebash
    npm start --scripts-prepend-node-path


  5. Once the UI starts at localhost:3000 it will ask for credentials: 
    Login: admin
    Password: password

    *  This is a windows issue so anything marked with ** is for Windows environment only.