Wednesday 28 November 2018

Hygieia Developer Setup

         As we know that Hygieia is open source DevOps tool and source code is available in the Capital One GitHub.
Set up Hygieia in Local:-

1) Install Prerequisites
The following are the prerequisites to set up Hygieia,
  • Java (Java 1.8 is recommended)
  • Maven
  • Git
  • MongoDB

2) Download or Clone Hygieia
    You can download or clone Hygieia from the GitHub Repository in your local.

3)  Build Hygieia

Run maven build from Hygieia root directory, use any one of the below mvn commands.


mvn clean install package
 
(or)
 
mvn clean install package -Dmaven.test.skip=true
 
(or for Skipping PDM Violations)
 
mvn clean install package -Dmaven.test.skip=true -Dpmd.failOnViolation=false


If everything is build fine, will display the below screen shot,

Hygieia mvn build screen


as a result of this commands, will generate the .jar file of all components. The .jar file is located in the \target folder for each component of Hygieia, including collectors.


4) Start MongoDB database  and create user in the database.

If you don't have mongo db database, download and install from mongo db website.

Create database dashboard using command - create database dashboard.

Create user admin in the database dashboard using below query,

db.createUser(
              {
                user: "admin",
                pwd: "admin",
                roles: [
                     {role: "readWrite", db: "dashboard"}
                     ]
              })


5) Run api and required collectors

We need to provide the properties file in run time while running the api and collectors. Properties file contains database name, database password, db host, port and some other required information.

Use below command to run the api,

java -jar api.jar --spring.config.location=C:\[path to]\Hygieia\api\dashboard.properties

Sample api dashboard.properties file,

dbname=dashboard
dbhost=localhost
dbport=27017
dbusername=admin
dbpassword=admin
server.port=8080
server.contextPath=/api
key=key for private repo access

Samething run required collector jars, like repo collector(bitbucket as example), build collector(Bamboo as example) and deploy collector (Udeploy as example).

Ex:-- bamboo collector

java -jar bamboo-build-collector-2.0.5-SNAPSHOT.jar --spring.config.location=<path of hygieia>\collectors\build\bamboo\bamboo.properties

Contents of sample bamboo.properties file,

dbname=dashboard
dbusername=admin
dbpassword=admin
dbhost=localhost
dbport=27017
dbreplicaset=false
dbhostport=localhost:27017
bamboo.cron=0 0/5 * * * *
bamboo.servers[0]=https://bamboo.domain.com/
bamboo.username=username of bamboo server
bamboo.apiKey[0]=apiKey of bamboo


6) Run UI using gulp serve command.

Run UI using gulp serve, in UI root directory.

Automatically it will open the browser with URL http://localhost:3000/


This is all about Hygieia local set up. Thanks for visiting blog.



Related Posts:--
1)  Hygieia Introduction
2)  Hygieia Architecture
3) Hygieia End User Configuration
4) Collectors in Hygieia

No comments:

Post a Comment