操作系统: CentOS8 Linux (我本次用centos7.6)
内存资源:32GB+ (自己nuc机器32G内存)
实验软件版本:
工具名称 | Version | 描述信息 |
---|---|---|
Terraform | 1.1.7 | 使用kind provider操作kind |
Kind | 0.14.0 | 创建Kubernetes集群工具 |
Docker-CE | 1.19+以上 (Docker version 23.0.3, build 3e7cbfd) | 容器运行时 |
kubectl | version.Info{Major:“1”, Minor:“24”, GitVersion:"v1.24.0 | |
Kubernetes | 1.24.0 | 容器云环境 |
ArgoCD | 2.6.7 | 云原生应用持续部署工具 |
NFS | 172.29.9.130 | 存储系统,持久化存储容器数据 |
jenkins | jenkins/jenkins:2.415-jdk11 | / |
jenkins agent | jenkins/inbound-agent:latest | / |
链接:https://pan.baidu.com/s/1vQp0Uhug81vLYOUdCb5kwg?pwd=0820
提取码:0820
2023.7.27-jenkins安装-k8s-argocd
代码库地址: https://jihulab.com/learndevops/myiac
[root@devops7 docker_images]#docker save jenkins/jenkins:2.415-jdk11 |gzip > jenkins-jenkins-2.415-jdk11.tar.gz
[root@devops7 docker_images]#docker save jenkins/inbound-agent:latest |gzip > jenkins-inbound-agent-latest.tar.gz
[root@devops7 docker_images]#ll
total 440176
-rw-r--r-- 1 root root 165069819 Jul 27 08:00 jenkins-inbound-agent-latest.tar.gz
-rw-r--r-- 1 root root 285663588 Jul 27 07:59 jenkins-jenkins-2.415-jdk11.tar.gz
https://www.yuque.com/xyy-onlyone/exkgza/na7w52cntw6l3a1g?singleDoc# 《Devops7实验环境搭建(terraform-kind-k8s-argocd)》
## LoadDockerImage
docker pull jenkins/jenkins:2.415-jdk11
docker pull jenkins/inbound-agent:latest
kind load docker-image jenkins/jenkins:2.415-jdk11 --name devopscluster
kind load docker-image jenkins/inbound-agent:latest --name devopscluster
kubectl -n argocd apply -f jenkins-argoapp.yaml
172.29.9.130 jenkins.idevops.site
curl -sO http://jenkins.idevops.site/jnlpJars/agent.jar
java -jar agent.jar -jnlpUrl http://jenkins.idevops.site/computer/build01/jenkins-agent.jnlp -secret 93522fc440e122052dd7ce72e6d1a6b961f401506a729d8ed3433cb3b4fec04f -workDir "/opt/jenkinsagent"
kubectl -n argocd apply -f jenkins-agent-argoapp.yaml
Instance identity
插件遇到Agent日志出现下面错误,需要安装Instance identity插件解决。【记得插件安装完成后重启Jenkins】
SEVERE: http://jenkins.jenkins.svc.cluster.local:8080/tcpSlaveAgentListener/ appears to be publishing an invalid X-Instance-Identity.
5
java.io.IOException: http://jenkins.jenkins.svc.cluster.local:8080/tcpSlaveAgentListener/ appears to be publishing an invalid X-Instance-Identity.
4
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:284)
3
at hudson.remoting.Engine.innerRun(Engine.java:724)
2
at hudson.remoting.Engine.run(Engine.java:540)
https://community.jenkins.io/t/invalid-x-instance-identity/4038
我的博客主旨:
微信二维码
x2675263825 (舍得), qq:2675263825。
微信公众号
《云原生架构师实战》
语雀
https://www.yuque.com/xyy-onlyone
csdn
https://blog.csdn.net/weixin_39246554?spm=1010.2135.3001.5421
知乎
https://www.zhihu.com/people/foryouone
好了,关于本次就到这里了,感谢大家阅读,最后祝大家生活快乐,每天都过的有意义哦,我们下期见!