Closed cosven closed 3 years ago
##### ssh docker
sudo ...
docker ps
docker exec -i -t 6a718e6e3a04 /bin/bash
docker exec -u 0 -i -t 6a718e6e3a04 /bin/bash # login as root
##### install docker
apt-get install apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
apt-get install docker-engine
service docker start
docker run hello-world # test install
##### docker-compose 配置更新时
docker-compose up --build
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
问题原因:user 所在组不对。使用 sudo 即可。
Jenkinsfile 里面没有 git credentialsId: credentialsId, url: url
参考链接:
旧式 freestyle
job 支持简单地持续集成,允许玩家按照顺序定义一些任务。
pipelines 允许你在一个脚本中定义整个应用生命周期。 pipelines 功能支持持续部署。
Step, Node, Stage Master, agent, executor
It is a best practice to develop pipelines as code by storing a Jenkinsfile with pipeline script in your SCM, so that you can apply the same version control and testing to pipelines as you do to your other software
提到一个 Docker Pipeline,其实就是提供一些 docker 操作的接口。感觉用 shell script 代替即可。
....
没啥营养可以查文档的东西...
https://jenkins.io/blog/2016/08/31/scaling-jenkins-at-jenkins-world/
In many cases when people talk about "scaling Jenkins" they’re talking about "Jenkins as a Service" or "Continuous Delivery as a Service"
link: https://www.cloudbees.com/jenkinsops-initiative-streamline-and-automate-jenkins
tags: 没营养
job as code
docker swarm
– Uptime: Quick automated failover across datacenters – Secure master-node communication (without using SSH) – Performs well at scale
backing up JENKINS_HOME
Doing the failover
fetch the latest backup & start new master (automated)
take-away
secure master-node communication 使用 gRPC 开发了这一种新的 node 模式...
我们并不关注
Performance at scale
node 连接 master 的时候
Recap
tag: 没营养
scaling jenkins:
一个 master 上挂更多的 agents
更多的 masters
对比了三种方案在一些特性方面的对比:比如存储啊,对环境依赖啊,目前版本支持否等问题
大概在讲 怎样评价 jenkins 集群是否大。
这个方案神奇的跳过了 jenkins-slave 需要 secret 和 node name 的事实?
https://dzone.com/articles/jenkins-cluster-setup-with-docker-containers
https://www.digitalocean.com/community/tutorials/how-to-manage-jenkins-with-rancher-on-ubuntu-14-04
用到 Rancher 这个东西,通过 Jenkins Username 和 Password 启动的。
所以,大概就是使用一个管理 Docker 的东西,再实现一些 API,然后就实现了管理 Jenkins 集群