Monday, June 19, 2017

Installing Hygieia Dashboard on Ubuntu 16.04


Install Java

sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Install mongo db

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt-get update
sudo apt-get install -y mongodb-org

Edit following file and add contents

sudo vi /etc/systemd/system/mongodb.service

----------------------------
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target

[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

[Install]
WantedBy=multi-user.target

----------------------------------

start mongodb

sudo systemctl start mongodb
sudo systemctl status mongodb
sudo systemctl enable mongodb

create db and user in mongo.

use dashboarddb

db.createUser( { user: "dashboarduser", pwd: "dbpassword", roles: [ {role: "readWrite", db: "dashboarddb"} ] } )


Install other required software.

sudo apt-get install nodejs-legacy
sudo apt-get install ruby
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
sudo apt-get install npm
sudo npm install -g bower
sudo npm install -g gulp
sudo apt-get install gdebi
wget http://ppa.launchpad.net/natecarlson/maven3/ubuntu/pool/main/m/maven3/maven3_3.2.1-0~ppa1_all.deb
sudo gdebi maven3_3.2.1-0~ppa1_all.deb
sudo ln -s /usr/share/maven3/bin/mvn /usr/bin/mvn
sudo apt-get install git

checkout hygieia code.

mkdir Hygieia
cd Hygieia
git clone https://github.com/capitalone/Hygieia.git .

Build code.

mvn clean install

-------------------------------

cd UI
UI$ gulp serve

UI starts on port 3000

Start API:

Create dashboard.properties in Hygieia/api folder.

Hygieia/api$ vi dashboard.properties

Add following content.

-----------------------------

# dashboard.properties
dbname=dashboarddb
dbusername=dashboarduser
dbpassword=dbpassword

-----------------------------

Now start API.

Hygieia/api$ java -jar target/api.jar --spring.config.location=dashboard.properties -Djasypt.encryptor.password=hygieiasecret

And then you can start the collectors you want.

5 comments:

  1. Thanks for the Installation Commands really helpful, can you please do steps for adding any one collector (may be Jenkins).

    ReplyDelete
    Replies
    1. Thanks Rakesh,
      I will provide Steps for Jenkins in next tutorial.

      Delete
  2. Hey,
    Thanks for the steps but i am facing problems with installation. This is the error that got. can you please help me in finding a resolution for this.


    ------------------------------

    Building com.capitalone.dashboard:api 3.0.1
    [INFO] ------------------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO]
    [INFO] com.capitalone.dashboard:Hygieia .................. SUCCESS [ 0.878 s]
    [INFO] com.capitalone.dashboard:api ...................... FAILURE [ 0.436 s]
    [INFO] com.capitalone.dashboard:api-audit ................ SKIPPED
    [INFO] com.capitalone.dashboard:nfrr-audit-collector ..... SKIPPED
    [INFO] com.capitalone.dashboard:rally-collector .......... SKIPPED
    [INFO] com.capitalone.dashboard:artifactory-artifact-collector SKIPPED
    [INFO] com.capitalone.dashboard:bamboo-build-collector ... SKIPPED
    [INFO] com.capitalone.dashboard:jenkins-build-collector .. SKIPPED
    [INFO] com.capitalone.dashboard:jenkins-cucumber-test-collector SKIPPED
    [INFO] com.capitalone.dashboard:jenkins-codequality ...... SKIPPED
    [INFO] com.capitalone.dashboard:sonar-codequality-collector SKIPPED
    [INFO] com.capitalone.dashboard:aws-cloud-collector ...... SKIPPED
    [INFO] com.capitalone.dashboard:udeploy-deployment-collector SKIPPED
    [INFO] com.capitalone.dashboard:xldeploy-deployment-collector SKIPPED
    [INFO] com.capitalone.dashboard:jira-feature-collector ... SKIPPED
    [INFO] com.capitalone.dashboard:versionone-feature-collector SKIPPED
    [INFO] com.capitalone.dashboard:gitlab-feature-collector . SKIPPED
    [INFO] com.capitalone.dashboard:chat-ops-collector ....... SKIPPED
    [INFO] com.capitalone.dashboard:appdynamics-performance-collector SKIPPED
    [INFO] com.capitalone.dashboard:bitbucket-scm-collector .. SKIPPED
    [INFO] com.capitalone.dashboard:github-scm-collector ..... SKIPPED
    [INFO] com.capitalone.dashboard:github-graphql-scm-collector SKIPPED
    [INFO] com.capitalone.dashboard:subversion-collector ..... SKIPPED
    [INFO] com.capitalone.dashboard:gitlab-scm-collector ..... SKIPPED
    [INFO] com.capitalone.dashboard:hpsm-cmdb-collector ...... SKIPPED
    [INFO] com.capitalone.dashboard:nexus-iq-collector ....... SKIPPED
    [INFO] com.capitalone.dashboard:score-collector .......... SKIPPED
    [INFO] Hygieia Publisher Plugin .......................... SKIPPED
    [INFO] com.capitalone.dashboard:UI ....................... SKIPPED
    [INFO] com.capitalone.dashboard:ui-tests ................. SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 4.912 s
    [INFO] Finished at: 2018-12-12T19:55:15+00:00
    [INFO] Final Memory: 32M/77M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal on project api: Could not resolve dependencies for project com.capitalone.dashboard:api:jar:3.0.1: Failed to collect dependencies at com.capitalone.dashboard:core:jar:[3.1.0-SNAPSHOT,): No versions available for com.capitalone.dashboard:core:jar:[3.1.0-SNAPSHOT,) within specified range -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
    -------------------------------------

    ReplyDelete
    Replies
    1. Even i faced this error, this is how you resolve

      git clone git@github.com:Hygieia/hygieia-core.git

      cd hygieia-core
      mvn clean install package

      and then do "mvn clean install package" under Hygieia

      Delete
  3. I followed these steps, including hygieia core . installed successfully but I am unabl to login to server. Its connections refused on 8080. Can you please help me?

    ReplyDelete