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参数。