Igor是一項服務,可為Spinnaker提供連續集成(CI)和源控制管理(SCM)服務的單個集成點。
伊戈爾(Igor)運行了許多共享相同常見體系結構的民意調查器。在高水平上,他們全部:
特徵:
HealthIndicator ,如果沒有投票程序正在Down或長期以來沒有成功的投票週期/admin/pollers/fastforward/{monitorName}[?partition={partition}] 。快進意味著所有等待的高速緩存狀態都將進行輪詢和保存,但不會發送迴聲通知。相關屬性:
| 財產 | 預設值 | 描述 |
|---|---|---|
spinnaker.build.pollingEnabled | 真的 | 定義是否啟用了構建系統輪詢機制。禁用此功能將有效地禁用與構建系統的任何集成,以依靠Igor進行輪詢。 |
spinnaker.build.pollInterval | 60 | 在輪詢週期之間以秒為單位的間隔 |
spinnaker.pollingSafeguard.itemUpperThreshold | 1000 | 定義在緩存更新周期之前將拒絕新項目數量的上閾值 |
locking.enabled | false | 啟用分佈式鎖定,以便igor可以在多個節點上運行而不會干擾 |
相關指標:
| 公制 | 類型 | 描述 |
|---|---|---|
pollingMonitor.newItems | 測量 | 表示在投票週期中給定監視器緩存的新項目數量 |
pollingMonitor.itemsOverThreshold | 測量 | 0如果deltasize <閾值,否則否則 |
pollingMonitor.pollTiming | 計時器 | 在每個投票週期中發布,持續時間完成 |
pollingMonitor.failed | 櫃檯 | 錯誤的反擊表示投票週期失敗 |
所有這些指標都可以通過monitor標籤(例如DockerMonitor , JenkinsMonitor ...)進行分組,以跟踪問題。
支持以下存儲後端:
相關屬性:
redis:
enabled: true
connection: redis://host:port
支持以下SCM服務:
Commit控制器類將API暴露在檢索提交列表中,例如/github/{{projectKey}}/{{repositorySlug}}/compareCommits?from={{fromHash}}&to={{toHash}}
目前,Igor僅揭露讀取API,沒有直接涉及SCM服務的投票程序,也沒有觸發器。
相關屬性:
github:
baseUrl: "https://api.github.com"
accessToken: '<your github token>'
commitDisplayLength: 8
stash:
baseUrl: "<stash url>"
username: '<stash username>'
password: '<stash password>'
bitbucket:
baseUrl: "https://api.bitbucket.org"
username: '<bitbucket username>'
password: '<bitbucket password>'
commitDisplayLength: 7
gitlab:
baseUrl: "https://gitlab.com"
privateToken: '<your gitlab token>'
commitDisplayLength: 8
支持以下CI服務:
對於這些服務中的每一個,都可以啟用一個民意測驗器(例如,使用jenkins.enabled )開始監視新的構建/管道/工件,緩存它們並向Echo提交事件,從而支持管道觸發器。 GCB有些不同,因為它不進行輪詢,需要設置PubSub訂閱。
BuildController類還公開了支持它們的服務的API,例如:
這些API用於為烘焙階段提供工件信息。
在您的配置塊中(在igor.yml中,igor-local.yml,spinnaker.yml或spinnaker-local.yml)中,您可以使用列表格式來定義多個大師塊。
您可以通過導航到http://your.jenkins.server/me/configure ( me是您的用戶名)來獲得Jenkins API令牌。
jenkins:
enabled: true
masters:
-
address: "https://spinnaker.cloudbees.com/"
name: cloudbees
password: f5e182594586b86687319aa5780ebcc5
username: spinnakeruser
-
address: "http://hostedjenkins.amazon.com"
name: bluespar
password: de4f277c81fb2b7033065509ddf31cd3
username: spindoctor
在您的配置塊中(在igor.yml中,igor-local.yml,spinnaker.yml或spinnaker-local.yml)中,您可以使用列表格式來定義多個大師塊。
要使用Travis進行身份驗證,您可以在具有權限的GIT用戶上使用“個人訪問令牌” read:org, repo, user 。這是在github/github -enterprise上的settings -> Personal access tokens中添加的。
travis:
enabled: true
# Travis names are prefixed with travis- inside igor.
masters:
- name: ci # This will show as travis-ci inside spinnaker.
baseUrl: https://travis-ci.com
address: https://api.travis-ci.com
githubToken: 6a7729bdba8c4f9abc58b175213d83f072d1d832
regexes:
- /Upload https?://.+/(.+.(deb|rpm))/
當從Travis構建中解析人工製品信息時,Igor使用默認的正則正則是jfrog rt / art CLI工具的輸出匹配。與默認值不同,可以使用regexes列表進行配置。
在您的配置塊中(在igor.yml中,igor-local.yml,spinnaker.yml或spinnaker-local.yml)中,您可以使用列表格式來定義多個大師塊。
要使用Gitlab CI進行身份驗證,請使用Permissions read_api使用個人訪問令牌。
gitlab-ci:
enabled: true
itemUpperThreshold: 1000 # Optional, default 1000. Determines max new pipeline count before a cache cycle is rejected
masters:
- address: "https://git.mycompany.com"
name: mygitlab
privateToken: kjsdf023ofku209823
# Optional:
defaultHttpPageLength: 100 # defaults 100, page length when querying paginated Gitlab API endpoints (100 is max per Gitlab docs)
limitByOwnership: false # defaults false, limits API results to projects/groups owned by the token creator
limitByMembership: true # defaults true, limits API results to projects/groups the token creator is a member in
httpRetryMaxAttempts: 5 # defaults 5, # default max number of retries when hitting Gitlab APIs and errors occur
httpRetryWaitSeconds: 2 # defaults 2, # of seconds to wait between retries
httpRetryExponentialBackoff: false # deafults false, if true retries to Gitlab will increase exponentially using the httpRetryWaitSeconds option's value
使用模式SPINNAKER_PROPERTY_*=value從成功的gitlab ci管道中自動讀取構建屬性。例如,包含行SPINNAKER_PROPERTY_HELLO=world日誌將創建一個構建屬性項目hello=world 。 Gitlab CI文物尚未得到支持。
可以將CloudDriver配置為輪詢您的註冊表。在這種情況下,Igor可以創建一個將列出由Clouddriver索引的註冊表,檢查每個圖像的註冊表,並將事件提交給Echo(因此允許Docker Triggers)
相關屬性:
dockerRegistry.enabledservices.clouddriver.baseUrl 。Igor要求Redis服務器啟動並運行。
通過./gradlew bootRun啟動igor。或通過使用Spinnaker安裝腳本按照說明。
要以調試模式啟動JVM,請設置Java系統屬性DEBUG=true :
./gradlew -DDEBUG=true
然後,JVM將聆聽端口8188上附加的調試器。JVM將不等待在啟動Igor之前附加調試器;可以根據build.gradle中的需要看到和修改相關的JVM參數。