Home

Installing Unity-One app

To install the Unity-One app, do the following:

Prerequisite: Enable Cluster Insights service

Before installing the Unity-One app, enable the Cluster Insights service.

  1. Stop Unravel.

    <Unravel installation directory>/unravel/manager stop
  2. Enable Cluster Insights service.

    <Unravel installation directory>/unravel/manager service enable clusterinsights_1 --permanent 
  3. Apply changes.

    <Unravel installation directory>/unravel/manager config apply
  4. Start Unravel.

    <Unravel installation directory>/unravel/manager start
  5. Go to <Unravel Installation directory>/unravel/data and verify if the clusterinsights folder is created.

Installing Unity-One

Note

  • In case there is an existing installation of the Unity-One app in your system, you must remove it and proceed with a fresh installation. Refer to Removing an existing Unity-One app installation

  • All the installation steps must be performed as Unravel user.

  1. Download the Unity-One app.

    curl https://preview.unraveldata.com/unravel/patches/unity/unity-app.tgz -o unity-app.tgz
    
  2. Create apps folder in <Unravel installation directory>/data/ if it is not there already. This is the folder where you extract unity-app.tgz.

  3. Change owner to Unravel.

    chown -R unravel-install-user:unravel-install-usergroup unity-app.tgz
    
  4. Extract unity-app.tgz.

    tar -xvzf unity-app.tgz

    After extracting the package, you will find the following archives:

    • unity-one.tar.gz

    • AppComparator.tar.gz

  5. Install App Comparator app.

    1. Extract AppComparator.tar.gz to <Unravel installation directory>/data/apps/

      cd <Unravel installation directory>/data/apps
      tar -xvzf AppComparator.tar.gz
      
    2. Change directory to /bin and run the start.sh script.

      cd AppCompartor/bin
      ./start.sh
      

      This will run the App Comparator on the 8050 port by default. To change the default port, update AppComparator/app_comparator/resources/config.ini.

    3. Go to http://<unravelhost>:8050 and verify if the app is running.

      unity-one-appcomparator-main.png
  6. Install Unity-One app.

    1. Change directory to /data/apps/ and extract unity-one.tar.gz.

      cd <Unravel installation directory>/data/apps
      tar -xvzf unity-one.tar.gz
    2. Update all the properties in unity-one/src/config.py with the required property details. The following table provides a description for some of the significant properties.

      Note

      If you have backed up the config.py file from a previous install, you can overwrite the current config.py file with the backed-up file.

      Properties

      Description

      unravel_java_dir

      Specify the location of either system JAVA: /usr/java/jdk1.8.0_232-cloudera/jre/bin/ or the packaged Unravel JAVA: /<Unravel Installation directory>/unravel/versions/x.x.x.x.xxxx/java/bin.

      compare_url

      Specify the URL of App Comparator. For example: http://xyz.unraveldata.com:8050

      metrics_dir

      Specify the path to the Cluster insights services folder. For example: opt/unravel/data/clusterinsights/.

      cm_alias

      Specify the alias of your Cloudera Manager. The value can be retrieved from <Unravel installation directory>/data/clusterinsights/cloudera/<cm_alias_value>/cluster/<cluster value> path where <cm_alias value> in this path is the value for <cm_alias>.

      For example: /opt/unravel/data/clusterinsights/cloudera/default/cluster/cdp-717/

      es_url

      Specify the URL for Unravel Elasticsearch (ES) in the following format:

       http://localhost:<configured_unravel_elasticsearch_port>

      cluster

      Specify the cluster name of your Cloudera Manager. The value can be retrieved from <Unravel installation directory>/data/clusterinsights/cloudera/<cm_alias_value>/cluster/<cluster value> path where <cluster value> in this path is the value for <cluster-name>.

      For example: /opt/unravel/data/clusterinsights/cloudera/default/cluster/cdp-717/

      unravel_url

      URL of the Unravel UI. For example: http://xyz.unraveldata.com:3000

      advertised_host

      The external resolvable hostname, which is used in an email link for the report. For example: http://playground-xyz001.unraveldata.com/

    3. Using a vi editor, update start.sh to point to the correct UNRAVEL_PROPERTIES path.

      export UNRAVEL_PROPERTIES=<Unravel installation directory>/unravel/data/conf/unravel.properties
      
    4. Start the app.

      sh unity-one/src/start.sh
    5. Verify that a total of 4 processes are running:

      ps -ef | grep unity

      For example:

      unravel   2370     1  0 16:53 ?        00:00:00 /home/unravel/unity-one/python3/bin/python3.7 -m gunicorn index:server --daemon --pid=gunicorn.pid --bind 0.0.0.0:8111 --threads=16 -w 1 --log-level debug --error-logfile logs/gunicorn_error.log --access-logfile logs/gunicorn_access.log --capture-output
      unravel   2375  2370  0 16:53 ?        00:00:12 /home/unravel/unity-one/python3/bin/python3.7 -m gunicorn index:server --daemon --pid=gunicorn.pid --bind 0.0.0.0:8111 --threads=16 -w 1 --log-level debug --error-logfile logs/gunicorn_error.log --access-logfile logs/gunicorn_access.log --capture-output
      unravel   2731  2375  0 16:53 ?        00:00:00 /home/unravel/unity-one/python3/bin/python3.7 reports/scheduler.py
      unravel   2732  2375  0 16:53 ?        00:00:06 /home/unravel/unity-one/python3/bin/python3.7 ast_extractor.py
    6. Check unity-one/src/logs/ast-extractor.log for any exceptions.

    7. Use a browser and go to https://<unravelhost>:<port specified for Unity-One app> to view the app on a browser.

      unity-one-main.png
Removing an existing Unity-One app installation

Run the following steps to clean up an existing Unity-One installation.

  1. Clean up App Comparator.

    1. Change directory to /bin and run the stop.sh script.

      cd <Unravel installation directory>/data/apps/AppComparator/bin
      ./stop.sh
      
    2. Open http://<unravelhost>:8050 in a browser and ensure that the app is no more accessible.

    3. Go to <Unravel installation directory>/data/apps/ and delete the AppComparator folder along with the existing AppComparator.tar.gz archive.

  2. Clean up Unity-One app.

    1. Go to the installed location of Unity-One app and run the stop.sh script. By default this is <Unravel installation directory>/data/apps/unity-one/src/.

      cd <Unravel installation directory>/data/apps/unity-one/src/
      ./stop.sh
    2. Run the following command and ensure that no of the app processes are running. Do a ps -ef | grep unity. This can take a few seconds.

      ps -ef | grep unity
    3. Open a browser and connect to the port where the Unity-One app is configured. Ensure that the app is no longer accessible.

    4. Back up config.py and save it in a different location to facilitate the next install.

    5. Go to <Unravel installation directory>/data/apps/ and delete the unity-one folder, and the existing unity-one.tar.gz.