Install and run the tutorial project

This section describes how to install and run the tutorial project.

Platform-independent instructions for running the tutorial project

This section provides general steps for installing and running the tutorial project. If your development environment is on Ubuntu Linux, consider using the detailed instructions in Installing and running the tutorial on Ubuntu Linux.

To install and run the tutorial:

  1. Ensure that you have all of the requirements listed in Software requirements.

  2. Open a terminal window, and change to a directory where you want to install the Brightspot project.

  3. Download the repository: git clone https://github.com/perfectsense/brightspot-tutorial.git.

  4. Change the current directory: cd brightspot-tutorial/init/.

  5. Type ./run.sh (Linux, OS X) or run.cmd (Windows). The installation script requires about three minutes to download components, compile, and display at http://localhost:9480/cms/logIn.jsp. (If the installation script seems to stall, halt the server in the terminal window by pressing Ctrl-C, restarting the server with ./run.sh or run.cmd, and then reloading the page in the browser.) A form for entering a username and password appears.

    ../../../_images/login.png
  6. Enter a username and password, and click Log In. The dashboard appears.

    ../../../_images/dashboard.png
  7. If you are using an IDE, import the tutorial project starting from the directory brightspot-tutorial/init/.

Installing and running the tutorial on Ubuntu Linux

This section describes how to install and run the Brightspot tutorial on Ubuntu Linux 18.04 desktop edition.

To install and run the tutorial in Ubuntu Linux:

  1. Ensure port 9480 is open.

  2. Install git and node package manager: sudo apt install git npm -y.

  3. Install the Java development kit (JDK) version 8 from Oracle:

    1. Download the JDK from https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. (Take a later version if available.) Be sure to download the tarball ending in .tar.gz.

      ../../../_images/oracle-jdk-download.svg
    2. Create an installation directory for the JDK: mkdir ~/oracle_jdk/.

    3. Unzip the downloaded tarball into the installation directory tar xvzf /tmp/jdk-8uxxx-linux-x64.tar.gz -C ~/oracle_jdk/.

  4. Get directory name for the JDK: VERSION=$(ls ~/oracle_jdk/).

  5. Add a line to .bashrc so that the shell finds the JDK: echo "export PATH=$HOME/oracle_jdk/$VERSION/bin:\$PATH" >> ~/.bashrc.

  6. Read the new path: source ~/.bashrc.

  7. Test the path: java -version. If you see the version number, your shell can find the JDK.

    java version "1.8.0_221"
    Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
    
  8. Clone the Brightspot tutorial: git clone https://github.com/perfectsense/brightspot-tutorial ~/brightspot-tutorial/.

  9. Change to the tutorial project: cd ~/brightspot-tutorial/init/.

  10. Install gulp: npm install gulp-cli.

  11. Run the tutorial: ./run.sh. The installation script requires about three minutes to download components, compile, and display at http://localhost:9480/cms/logIn.jsp. A form for entering a username and password appears.

    ../../../_images/login.png
  12. Enter a username and password, and click Log In. The dashboard appears.

    ../../../_images/dashboard.png
  13. If you are using an IDE, import the tutorial project starting from the directory brightspot-tutorial/init/.