Getting Started
Know the basics of installing and configuring Hygieia
Know the basics of installing and configuring Hygieia
Run the following command to build all components for Hygieia.
mvn clean install package
The following components are required to run Hygieia℠
Hygieia uses MongoDB 3.0 + version. We recommend that you download MongoDB clients(RoboMongo etc) to connect to your local running Database and make sure that database: dashboard is created and you are successfully able to connect to it.
mongod --dbpath [ path to the data directory]
for e.g
/usr/bin/mongodb-linux-x86_64-2.6.3/bin/mongod --dbpath /dev/data/db
/usr/bin/mongodb-linux-x86_64-2.6.3/bin/mongo
$ mongo MongoDB shell version: 3.0.4 connecting to: test > use dashboard switched to db dashboard > db.createUser( { user: "db", pwd: "dbpass", roles: [ {role: "readWrite", db: "dashboard"} ] }) Successfully added user: { "user" : "dbuser", "roles" : [ { "role" : "readWrite", "db" : "dashboard" } ] }
Please click on this link to learn about how to build and run the UI layer.
Please click on this link to learn about the API Layer set-up.
In general all the collectors can be run using the following command:
java -jar--spring.config.name= --spring.config.location=
For each individual collector setup click on the links below:
You can pick and choose which collectors are applicable for your DevOps toolset or you can write your own collector and plug it in.
You can use Jenkins - Hygieia plugin to publish data from Jenkins to Hygieia. Currently, you can publish build, artifact info, sonar results, deployment results and cucumber test results. You may not need to run corresponding collectors if you use Jenkins for build, deploy, sonar analysis and running cucumber tests.
You can use GitHub webhook to publish commit information to Hygieia. If you use webhook, you will not need to run github collector. Your Github webhook's payload url should be set to: http://hygieia-base-url/api/commit/github/v3Hygieia supports proxy authentication for working behind corporate firewalls. For development, please refer to the following configuration differences; for deployment/operations, please refer to the subsequent sub-section:
Update your Maven settings.xml file:
...... ...... your-proxy-id true http your.proxy.domain.name 8080 companyId999 yourPassword *.local
Additionally, set the following export variables:
export HTTP_PROXY=http://companyId999:yourPassword@your.proxy.domain.name:8080 export HTTPS_PROXY=http://companyId999:yourPassword@your.proxy.domain.name:8080 export JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=your.proxy.domain.name -Dhttp.proxyPort=8080 -Dhttp.proxyUser=companyId999 -Dhttp.proxyPassword=yourPassword" # This option may be duplicative if you have already updated your # Maven settings.xml file, but will only help: export MAVEN_OPTS="$MAVEN_OPTS -Dhttp.proxyHost=your.proxy.domain.name -Dhttp.proxyPort=8080 -Dhttp.proxyUser=companyId999 -Dhttp.proxyPassword=yourPassword" Tests should now run/pass when built from behind a corporate proxy, even if it is an authenticated proxy
Only the above proxy settings (non authentication) may required to be set on your deployment instance. Additionally, please updated all property files for each collector/API configuration with their specific proxy setting property.
mvn docker:build
docker-compose up -d
docker exec -t -i mongodb2 bash mongo 192.168.64.2/admin --eval 'db.getSiblingDB("dashboard").createUser({user: "db", pwd: "dbpass", roles: [{role: "readWrite", db: "dashboard"}]})'
These are the most common entries, the uncommented ones are mandatory if you want the collector to work. For dev/testing you will find it useful to change the CRON entries to "0 * * * * *" hygieia-github-scm-collector:
environment: - GITHUB_HOST=github.com - GITHUB_CRON=0 * * * * * - GITHUB_COMMIT_THRESHOLD_DAYS=300 hygieia-jira-feature-collector: environment: - JIRA_BASE_URL=https://mycompany.atlassian.net/ - JIRA_CREDENTIALS=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - JIRA_ISSUE_TYPE_ID=10200 - JIRA_SPRINT_DATA_FIELD_NAME=customfield_10007 - JIRA_EPIC_FIELD_NAME=customfield_10008 hygieia-jenkins-build-collector: environment: - JENKINS_CRON=0 * * * * * - JENKINS_MASTER=http://192.168.99.100:9100 - JENKINS_USERNAME=XXXXXXXXXXXXXXXXXXXXXX - JENKINS_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXX hygieia-jenkins-cucumber-test-collector: environment: - JENKINS_CRON=0 * * * * * - JENKINS_MASTER=http://192.168.99.100:9100 - JENKINS_USERNAME=XXXXXXXXXXXXXXXXXXXXXX - JENKINS_API_KEY=XXXXXXXXXXXXXXXXX - JENKINS_CUCUMBER_JSON_FILENAME=cucumber-report.json hygieia-sonar-codequality-collector: environment: - SONAR_URL=http://192.168.99.100:9000 - SONAR_CRON=0 * * * * * Make sure everything is restarted it may fail if the user doesn't exist at start up time docker-compose restart Get the port for the UI docker port hygieia-ui
Configure it to point to the github master branch for Hygieia
a. In the SCM panel, select 'git' b. Enter the URL: 'https://github.com/capitalone/Hygieia.git' (without the quotes) c. Set the branch to 'master' (without the quotes) Note: For this to work you will need to have set your credentials on the ID that the collectors is running under, the best way to do this is first clone the repo to set your credentials.
Run a test instance of SONAR
a. docker-compose -f test-servers/sonar/sonar.yml up -d b. Fill it with data from the Hygieia project mvn sonar:sonar -Dsonar.host.url=http://$(docker-machine ip default):9000 -Dsonar.jdbc.url="jdbc:h2:tcp://$(docker-machine ip default)/sonar" c. You can now go in and configure the quality panel in the UI.
Start a test Jenkins Master
Output will be in cucumber.
a. docker-compose -f test-servers/jenkins/jenkins.yml up -d b. Run the job: http://192.168.99.100:9100/job/Hygieia_Example_Job/build c. Configure the Jenkins Build and Jenkins Cucumber panels using this jobs output.