$ hal config provider kubernetes enable + Get current deployment Success + Edit the kubernetes provider Success Validation in default: - WARNING You have not yet selected a version of Spinnaker to deploy. ? Options include: - 1.29.0 - 1.28.1 - 1.27.1 - 1.26.7
Validation in default.provider.kubernetes: - WARNING Provider kubernetes is enabled, but no accounts have been configured.
+ Successfully enabled kubernetes
添加 kubernetes 账号
在 Halyard 容器中,执行以下命令,添加账号
$ CONTEXT=$(kubectl config current-context) $ hal config provider kubernetes account add my-k8s-account --context $CONTEXT + Get current deployment Success + Add the my-k8s-account account Success Validation in default: - WARNING You have not yet selected a version of Spinnaker to deploy. ? Options include: - 1.29.0 - 1.28.1 - 1.27.1 - 1.26.7
+ Successfully added account my-k8s-account for provider kubernetes.
Choose Environment
选择如何安装 Spinnaker,此处选择 Distributed installation on Kubernetes[4]
$ hal config deploy edit --type distributed --account-name my-k8s-account
+ Get current deployment Success + Get the deployment environment Success + Edit the deployment environment Success Validation in default: - WARNING You have not yet selected a version of Spinnaker to deploy. ? Options include: - 1.29.0 - 1.28.1 - 1.27.1 - 1.26.7
+ Successfully updated your deployment environment.
Your AWS Secret Key.: + Get current deployment Success + Get persistent store Success + Edit persistent store Success Validation in default.persistentStorage: - WARNING Your deployment will most likely fail until you configure and enable a persistent store.
Validation in default: - WARNING You have not yet selected a version of Spinnaker to deploy. ? Options include: - 1.29.0 - 1.28.1 - 1.27.1 - 1.26.7
+ Successfully edited persistent store "s3".
在 Halyard 容器中,执行以下命令,配置存储源为 AWS S3
$ hal config storage edit --type s3 + Get current deployment Success + Get persistent storage settings Success + Edit persistent storage settings Success Validation in default: - WARNING You have not yet selected a version of Spinnaker to deploy. ? Options include: - 1.29.0 - 1.28.1 - 1.27.1 - 1.26.7
# 指定要部署的版本 $ hal config version edit --version 1.29.0
# 执行部署 $ hal deploy apply
+ Get current deployment Success + Prep deployment Success Validation in default.stats: - INFO Stats are currently ENABLED. Usage statistics are being collected. Thank you! These stats inform improvements to the product, and that helps the community. To disable, run `hal config stats disable`. To learn more about what and how stats data is used, please see https://spinnaker.io/docs/community/stay-informed/stats.
Validation in default.security: - WARNING Your UI or API domain does not have override base URLs set even though your Spinnaker deployment is a Distributed deployment on a remote cloud provider. As a result, you will need to open SSH tunnels against that deployment to access Spinnaker. ? We recommend that you instead configure an authentication mechanism (OAuth2, SAML2, or x509) to make it easier to access Spinnaker securely, and then register the intended Domain and IP addresses that your publicly facing services will be using.
通过 Ingress 绑定的域名,可以访问到 Spinnaker UI,此时 Web UI 中会无法获取到资源,因为默认的 Gate Endpoint 为 http://localhost:8084,浏览器页面会报错 : Error fetching applications. Check that your gate endpoint is accessible. Further information on troubleshooting this error is available here。因此需要执行以下命令配置 UI 和 Gate Api 的域名 [7]
hal config security ui edit --override-base-url http://deck.my.com hal config security api edit --override-base-url http://spin-gate.my.com
$ hal config provider docker-registry enable + Get current deployment Success + Edit the dockerRegistry provider Success Validation in default.provider.dockerRegistry: - WARNING Provider dockerRegistry is enabled, but no accounts have been configured.
+ Get current deployment Success + Add the my-docker-registry account Success + Successfully added account my-docker-registry for provider dockerRegistry.
配置 Jenkins 信息
启用 Jenkins
hal config ci jenkins enable
配置 Jenkins 认证信息
hal config ci jenkins master add my-jenkins-master-01 \ --address http://34.150.227.175:8080 \ --username admin \ --password 32366490694c4af4
启用 csrf
hal config ci jenkins master edit my-jenkins-master-01 --csrf true