7. Hygieia的安裝和使用

1. 安裝Java辞色、Maven和Git(略)

2. 安裝MongoDB

下載地址:https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2.6.1.zip
2.1. 安裝

image.png

##store data here
dbpath=C:\software\mongodb\data
 
##all output go here
logpath=C:\software\mongodb\log\mongo.log
 
##log read and write operations
diaglog=3

2.2. 啟動(dòng)和創(chuàng)建用戶


image.png
C:\Users\Administrator>mongod --dbpath=C:\software\mongodb
db.createUser({user: "dashboarduser",pwd: "dashboarduser123", roles: [ {role: "readWrite", db: "dashboarddb"}]})

順便提及一下無關(guān)的一個(gè)命令:

> show dbs;
admin        0.078GB
dashboard    0.078GB
dashboarddb  0.078GB
local        0.078GB
> use dashboarddb
switched to db dashboarddb
> db.collectors.find()

3. 安裝Nodejs

下載地址: https://nodejs.org/en/download/
安裝好后(沒有特殊的地方乳幸,這里略去):

  1. 設(shè)置path變量到安裝目錄的bin子目錄
  2. 依次執(zhí)行兩個(gè)npm命令喂急,可能需要設(shè)置一下代理


    image.png

    2.1 C:\Users\Administrator>npm install -g bower

Bower是一個(gè)客戶端技術(shù)的軟件包管理器缰贝,它可用于搜索肥印、安裝和卸載如javascript、HTML、CSS之類的網(wǎng)絡(luò)資源

2.2 C:\Users\Administrator>npm install -g gulp

也可在命令里面指明淘寶鏡像:npm install -g gulp --registry=https://registry.npm.taobao.org

4. 安裝RoboMongo (or) Admin Mongo

https://robomongo.org/download
image.png

5. 下載源碼進(jìn)行編譯

D:\gitProject>git clone https://github.com/Hygieia/hygieia-core.git

D:\gitProject>git clone https://github.com/capitalone/Hygieia.git

1.2 構(gòu)建源代碼

代碼下載地址:https://github.com/capitalone/Hygieia/releases/

D:\gitProject>cd hygieia-core
D:\gitProject\hygieia-core>mvn clean install package -Dmaven.test.skip=true -Dpmd.failOnViolation=false


D:\softwareback\devops\hygieia\Hygieia-3.0.0\mvn clean install package -Dmaven.test.skip=true -Dpmd.failOnViolation=false
image.png

接下來:
image.png

image.png

image.png

6. 啟動(dòng)

1啟動(dòng)monngodb服務(wù)

mongod --dbpath=C:\software\mongodb

2 啟動(dòng)api服務(wù)

2.1 增加一個(gè)dashboard.properties配置文件

image.png
#dashboard.properties文件內(nèi)容:
dbname=dashboarddb
dbhost=localhost
dbport=27017

2.2 啟動(dòng)API

說明:我增加了一個(gè)
D:\softwareback\devops\hygieia\Hygieia-3.0.2\api\target\classes\application.properties:
dbname=dashboard
dbhost=127.0.0.1
dbport=11500
server.contextPath=/api
server.port=8080
但是實(shí)際上根本不需要

java -jar D:\softwareback\devops\hygieia\Hygieia-3.0.2\api\target\api.jar  --spring.config.location=D:\softwareback\devops\hygieia\Hygieia-3.0.2\api\dashboard.properties

3 collectors組件Feature監(jiān)控

3.1 Jira

image.png

image.png

image.png

image.png

application.properties:

image.png

#Collector schedule (required)
dbname=dashboarddb
#dbhost=localhost
#dbport=27017

feature.cron=*/30 * * * * ?
#feature.cron=0 */5 * * * *


#Page size for data calls (Jira maxes at 1000)
feature.pageSize=100

#In-built folder housing prepared REST queries (required)
feature.queryFolder=jiraapi-queries

#Jira API Query file names (String template requires the files to have .st extension) (required)
feature.storyQuery=story
feature.epicQuery=epic

feature.projectQuery=projectinfo
feature.memberQuery=memberinfo
feature.sprintQuery=sprintinfo
feature.teamQuery=teaminfo
feature.trendingQuery=trendinginfo



# Trending Query:  Length of sprint week (not-required)
#feature.sprintEndPrior=2

#Scheduled Job prior minutes to recover data created during execution time (usually, 2 minutes is enough)
feature.scheduledPriorMin=2

#Delta change date that modulates the collector item task - should be about as far back as possible, in ISO format (required)
feature.deltaCollectorItemStartDate=2018-01-01T00:00:00.000000

#Jira Connection Details
feature.jiraBaseUrl=http://10.45.*.*:8080
feature.jiraQueryEndpoint=rest/api/2/

#64-bit encoded credentials with the pattern username:password

#on a mac you con create them with : echo "username:password" | base64
#reference:  https://www.base64decode.org/


feature.jiraCredentials=MT*****************************Iz


#Start dates from which to begin collector data, if no other data is present - usually, a month back is appropriate (required)
feature.deltaStartDate=2019-02-01T00:00:00.000000
feature.masterStartDate=2019-02-01T00:00:00.000000

# In Jira, general IssueType IDs are associated to various "issue"
# attributes. However, there is one attribute which this collector's
# queries rely on that change between different instantiations of Jira.
# Please provide a String Name reference to your instance's IssueType for
# the lowest level of Issues (e.g., "user story") specific to your Jira
# instance.  Note:  You can retrieve your instance's IssueType Name
# listings via the following URI:  https://[your-jira-domain-name]/rest/api/2/issuetype/
# Multiple comma-separated values can be specified.
# feature.jiraIssueTypeNames=Story,Epic,Task,Sub-task
feature.jiraIssueTypeNames=故事,缺陷,任務(wù),子任務(wù),Epic



# In Jira, your instance will have its own custom field created for "sprint" or "timebox" details,
# which includes a list of information.  This field allows you to specify that data field for your
# instance of Jira. Note: You can retrieve your instance's sprint data field name
# via the following URI, and look for a package name com.atlassian.greenhopper.service.sprint.Sprint;
# your custom field name describes the values in this field:
# https://[your-jira-domain-name]/rest/api/2/issue/[some-issue-name]
feature.jiraSprintDataFieldName=customfield_10001


# In Jira, your instance will have its own custom field created for "super story" or "epic" back-end ID,
# which includes a list of information.  This field allows you to specify that data field for your instance
# of Jira.  Note:  You can retrieve your instance's epic ID field name via the following URI where your
# queried user story issue has a super issue (e.g., epic) tied to it; your custom field name describes the
# epic value you expect to see, and is the only field that does this for a given issue:
# https://[your-jira-domain-name]/rest/api/2/issue/[some-issue-name]
feature.jiraEpicIdFieldName=customfield_11800
#feature.jiraEpicIdFieldName=customfield_10008
#customfield_11800

# In Jira, your instance will have its own custom field created for "story points"
# This field allows you to specify that data field for your instance
# of Jira.  Note:  You can retrieve your instance's storypoints ID field name via the following URI where your
# queried user story issue has story points set on it; your custom field name describes the
# story points value you expect to see:
# https://[your-jira-domain-name]/rest/api/2/issue/[some-issue-name]
feature.jiraStoryPointsFieldName=customfield_10006



# In Jira, your instance will have its own custom field created for "team"
# This field allows you to specify that data field for your instance
# of Jira.  Note:  You can retrieve your instance's team ID field name via the following URI where your
# queried user story issue has team set on it; your custom field name describes the
# team value you expect to see:
# https://[your-jira-domain-name]/rest/api/2/issue/[some-issue-name]
feature.jiraTeamFieldName=

# Set this to true if you use boards as team
#feature.jiraBoardAsTeam=false
feature.jiraBoardAsTeam=true



#Story,Bug,Task,Sub-Task,Epic
feature.jiraStoryIds[0]=11739
feature.jiraStoryIds[1]=11900
feature.jiraStoryIds[2]=10106
feature.jiraStoryIds[3]=10102
feature.jiraEpicId=11800
image.png

啟動(dòng):

Java -jar D:\softwareback\devops\hygieia\Hygieia-3.0.2\collectors\feature\jira\target\jira-feature-collector.jar --spring.config.name=feature --spring.config.location=D:\softwareback\devops\hygieia\Hygieia-3.0.2\collectors\feature\jira\target\classes\application.properties

3.2 Jenkins

image.png

image.png

image.png

image.png

application.properties:

#Database Name 
dbname=dashboarddb 
 
#jenkins.servers[0]=http://localhost:8181/jenkins/
jenkins.servers[0]=http://10.45.136.151:9999/
jenkins.usernames[0]=yay
jenkins.apiKeys[0]=116ed4863f449d202f58e4fa290171a2b3
#上面是API Tokens困肩,在Jenkins用戶里面可以配置
#Collector schedule (required)
jenkins.cron=0 0/5 * * * * 

jenkins.saveLog=true
image.png

啟動(dòng):

java -jar D:\softwareback\devops\hygieia\Hygieia-3.0.2\collectors\build\jenkins\target\jenkins-build-collector-3.0.1.jar --spring.config.location=D:\softwareback\devops\hygieia\Hygieia-3.0.2\collectors\build\jenkins\application.properties

3.3 SCM倉庫----github

D:\softwareback\devops\hygieia\Hygieia-3.0.2\collectors\scm\github\target\classes\application.properties:

#Database Name
dbname=dashboarddb

#Database HostName - default is localhost
dbhost=localhost

 #Database Port - default is 27017
dbport=27017

#Database Username - default is blank
#dbusername=db

#Database Password - default is blank

#dbpassword=dbpwd

#Collector schedule (required)
github.cron=0 */15 * * * *

github.host=github.com

#Maximum number of days to go back in time when fetching commits
github.commitThresholdDays=60

#Optional: Error threshold count after which collector stops collecting for a collector item. Default is 2.
github.errorThreshold=10

#This is the key generated using the Encryption class in core
github.key=

#personal access token generated from github and used for making authentiated calls

github.personalAccessToken=
#github.personalAccessToken=fc5ae511dc0a8fc5cb27629ab2f6601718872610


#dbusername=dashboarduser
#dbpassword=dashboarduser123

啟動(dòng)命令(我寫了一個(gè)bat文件):

title "github collector"

java -jar D:\softwareback\devops\hygieia\Hygieia-3.0.2\collectors\scm\github\target\github-scm-collector-3.0.1.jar --spring.config.location=D:\softwareback\devops\hygieia\Hygieia-3.0.2\collectors\scm\github\target\classes\application.properties

配置如下:
image.png

看到的效果為:
image.png

提示:發(fā)現(xiàn)很有必要在遇到“JWT validity cannot be asserted and should not be trusted”錯(cuò)誤時(shí)候,把瀏覽器cookie清空:
image.png

3.4 SCM倉庫----svn

image.png

image.png

image.png
# Database Name
dbname=dashboarddb

# Database HostName - default is localhost
dbhost=localhost

# Database Port - default is 27017
dbport=27017


# Logging File location
#logging.file=./logs/subversion.log

# Collector schedule (required)
subversion.cron=*/30 * * * * ?
#subversion.cron=0 0/5 * * * *
#subversion.cron=0 */15 * * * *

#注意下面這種地址不要配置脆侮,用戶和口令也不要配置
#subversion.host=https://10.45.136.230/svn/ZYN/HGARCH/branch/V1.0/code/personrecord

# Maximum number of previous days from current date, when fetching commits
subversion.commitThresholdDays=30

啟動(dòng)(我建了一個(gè)bat文件僻弹,內(nèi)容如下):

title "svn collector"
java -jar D:\softwareback\devops\hygieia\Hygieia-3.0.2\collectors\scm\subversion\target\subversion-collector-3.0.1.jar --spring.config.name=subversion  --spring.config.location=D:\softwareback\devops\hygieia\Hygieia-3.0.2\collectors\scm\subversion\target\classes\application.properties

3.5 sonar

  1. ) 啟動(dòng)ui
cd D:\softwareback\devops\hygieia\Hygieia-3.0.2\UI\
gulp serve
image.png

6. 登錄

image.png
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市他嚷,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌芭毙,老刑警劉巖筋蓖,帶你破解...
    沈念sama閱讀 211,265評論 6 490
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異退敦,居然都是意外死亡粘咖,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,078評論 2 385
  • 文/潘曉璐 我一進(jìn)店門侈百,熙熙樓的掌柜王于貴愁眉苦臉地迎上來瓮下,“玉大人,你說我怎么就攤上這事钝域》砘担” “怎么了?”我有些...
    開封第一講書人閱讀 156,852評論 0 347
  • 文/不壞的土叔 我叫張陵例证,是天一觀的道長路呜。 經(jīng)常有香客問我,道長织咧,這世上最難降的妖魔是什么胀葱? 我笑而不...
    開封第一講書人閱讀 56,408評論 1 283
  • 正文 為了忘掉前任,我火速辦了婚禮笙蒙,結(jié)果婚禮上抵屿,老公的妹妹穿的比我還像新娘。我一直安慰自己捅位,他們只是感情好轧葛,可當(dāng)我...
    茶點(diǎn)故事閱讀 65,445評論 5 384
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著绿渣,像睡著了一般朝群。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上中符,一...
    開封第一講書人閱讀 49,772評論 1 290
  • 那天姜胖,我揣著相機(jī)與錄音,去河邊找鬼淀散。 笑死右莱,一個(gè)胖子當(dāng)著我的面吹牛蚜锨,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播慢蜓,決...
    沈念sama閱讀 38,921評論 3 406
  • 文/蒼蘭香墨 我猛地睜開眼亚再,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了晨抡?” 一聲冷哼從身側(cè)響起氛悬,我...
    開封第一講書人閱讀 37,688評論 0 266
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎耘柱,沒想到半個(gè)月后如捅,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 44,130評論 1 303
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡调煎,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,467評論 2 325
  • 正文 我和宋清朗相戀三年镜遣,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片士袄。...
    茶點(diǎn)故事閱讀 38,617評論 1 340
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡悲关,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出娄柳,到底是詐尸還是另有隱情寓辱,我是刑警寧澤,帶...
    沈念sama閱讀 34,276評論 4 329
  • 正文 年R本政府宣布赤拒,位于F島的核電站讶舰,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏需了。R本人自食惡果不足惜跳昼,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,882評論 3 312
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望肋乍。 院中可真熱鬧鹅颊,春花似錦、人聲如沸墓造。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,740評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽觅闽。三九已至帝雇,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間蛉拙,已是汗流浹背尸闸。 一陣腳步聲響...
    開封第一講書人閱讀 31,967評論 1 265
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人吮廉。 一個(gè)月前我還...
    沈念sama閱讀 46,315評論 2 360
  • 正文 我出身青樓苞尝,卻偏偏與公主長得像,于是被迫代替她去往敵國和親宦芦。 傳聞我的和親對象是個(gè)殘疾皇子宙址,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 43,486評論 2 348

推薦閱讀更多精彩內(nèi)容

  • 看明月把思念撕裂 那徹骨的痛卻讓思念更加強(qiáng)烈 看明月把思念撕裂 那影子正流淌無奈的血 看明月把思念撕裂 那歡笑卻陪...
    劉漢皇閱讀 138評論 0 1
  • 天涼了,多加衣调卑。晚安抡砂!
    團(tuán)子的安閱讀 220評論 4 3
  • 無論今天的你怎么用力,明天的落葉還是會(huì)飄下來恬涧,世上有很多事是無法提前的舀患,活在當(dāng)下,正向提升气破。
    淺_夜閱讀 137評論 3 3