没有合适的资源?快使用搜索试试~ 我知道了~
容器自动化(五):jenkins+git+docker构建持续化集成环境.pdf
需积分: 43 53 下载量 170 浏览量
2019-07-18
09:33:00
上传
评论 2
收藏 1.43MB PDF 举报
温馨提示
docker+jenkins+gitlab的持续集成,持续交付,使开发,运维,测试一体化,研发:开发流程高效,稳定,快速,交付结果可预测,运维:容器监控,自动化运维,降低维护成本
资源推荐
资源详情
资源评论



















容器自动化(五):jenkins+git+docker构建持续化集成环境
云计算专题之容器自动化
--私人课件,不公开,不出版,禁止传播
想做好运维工作,人先要学会勤快;
居安而思危,勤记而补拙,方可不断提高;
别人资料不论你用着再如何爽那也是别人的;
自己总结东西是你自身特有的一种思想与理念的展现;
精髓不是看出来的,精髓是记出来的;
请同学们在学习的过程中养成好的学习习惯;
勤于实践,抛弃教案,勤于动手,整理文档。
一,CI/CD介绍

二,发布流程设计
服务器 IP地址
Git/Harbor 192.168.200.201

Docker 192.168.200.202
Jenkins服务器 192.168.200.203
服务器 IP地址
工具 版本
CentOS 7.5_x64
Maven 3.5
Tomcat 8
JDK 1.8
Jenkins 2.6
Docker CE 18.03.1
1. [root@Harbor ~]# cat /etc/redhat-release
2. CentOS Linux release 7.5.1804 (Core)
3. [root@Harbor ~]# uname -r
4. 3.10.0-862.3.3.el7.x86_64
三,部署Harbor镜像仓库
服务器 IP地址
Git/Harbor 192.168.200.201
1. #创建ca证书
2. [root@Harbor ~]# mkdir -p /data/ssl
3. [root@Harbor ~]# cd /data/ssl
4. [root@Harbor ssl]# which openssl
5. /usr/bin/openssl
6. [root@Harbor ssl]# openssl req -newkey rsa:4096 -nodes -sha256 -keyout ca.key -x50
9 -days 365 -out ca.crt
7. Generating a 4096 bit RSA private key
8. ................................................++
9. ....................................................................................
.................................++

10. writing new private key to 'ca.key'
11. -----
12. You are about to be asked to enter information that will be incorporated
13. into your certificate request.
14. What you are about to enter is what is called a Distinguished Name or a DN.
15. There are quite a few fields but you can leave some blank
16. For some fields there will be a default value,
17. If you enter '.', the field will be left blank.
18. -----
19. Country Name (2 letter code) [XX]:CN
20. State or Province Name (full name) []:Beijing
21. Locality Name (eg, city) [Default City]:Beijing
22. Organization Name (eg, company) [Default Company Ltd]:yunjisuan
23. Organizational Unit Name (eg, section) []:yunjisuan
24. Common Name (eg, your name or your servers hostname) []:www.yunjisuan.com
25. Email Address []:
26.
27. #生成证书请求
28. [root@Harbor ssl]# openssl req -newkey rsa:4096 -nodes -sha256 -keyout www.yunjisu
an.com.key -out www.yunjisuan.com.csr
29. Generating a 4096 bit RSA private key
30. .........................................................++
31. ....................................................................................
..................................++
32. writing new private key to 'www.yunjisuan.com.key'
33. -----
34. You are about to be asked to enter information that will be incorporated
35. into your certificate request.
36. What you are about to enter is what is called a Distinguished Name or a DN.
37. There are quite a few fields but you can leave some blank
38. For some fields there will be a default value,
39. If you enter '.', the field will be left blank.
40. -----
41. Country Name (2 letter code) [XX]:CN
42. State or Province Name (full name) []:Beijing
43. Locality Name (eg, city) [Default City]:Beijing
44. Organization Name (eg, company) [Default Company Ltd]:yunjisuan
45. Organizational Unit Name (eg, section) []:yunjisuan
46. Common Name (eg, your name or your servers hostname) []:www.yunjisuan.com
47. Email Address []:
48.
49. Please enter the following 'extra' attributes
50. to be sent with your certificate request
51. A challenge password []:
52. An optional company name []:

53.
54. #生成注册表主机的证书
55. [root@Harbor ssl]# openssl x509 -req -days 365 -in www.yunjisuan.com.csr -CA ca.cr
t -CAkey ca.key -CAcreateserial -out www.yunjisuan.com.crt
56. Signature ok
57. subject=/C=CN/ST=Beijing/L=Beijing/O=yunjisuan/OU=yunjisuan/CN=www.yunjisuan.com
58. Getting CA Private Key
59. [root@Harbor ssl]# ll
60. 总用量 24
61. -rw-r--r-- 1 root root 2049 7月 24 20:57 ca.crt
62. -rw-r--r-- 1 root root 3272 7月 24 20:57 ca.key
63. -rw-r--r-- 1 root root 17 7月 24 21:00 ca.srl
64. -rw-r--r-- 1 root root 1931 7月 24 21:00 www.yunjisuan.com.crt
65. -rw-r--r-- 1 root root 1716 7月 24 20:58 www.yunjisuan.com.csr
66. -rw-r--r-- 1 root root 3272 7月 24 20:58 www.yunjisuan.com.key
67.
68. #信任自签发的证书
69. [root@Harbor ssl]# scp www.yunjisuan.com.crt /etc/pki/ca-trust/source/anchors/
70. [root@Harbor ssl]# update-ca-trust enable
71. [root@Harbor ssl]# update-ca-trust extract
72.
73. #安装docker-ce社区版
74. [root@Harbor ssl]# sestatus
75. SELinux status: disabled
76. [root@Harbor ssl]# yum -y install yum-utils device-mapper-persistent-data lvm2
77. [root@Harbor ssl]# curl https://download.docker.com/linux/centos/docker-ce.repo -o
/etc/yum.repos.d/docker-ce.repo
78. % Total % Received % Xferd Average Speed Time Time Time Current
79. Dload Upload Total Spent Left Speed
80. 100 2424 100 2424 0 0 412 0 0:00:05 0:00:05 --:--:-- 720
81. [root@Harbor ssl]# yum -y install docker-ce
82. [root@Harbor ssl]# systemctl start docker
83. [root@Harbor ssl]# systemctl enable docker
84. Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to
/usr/lib/systemd/system/docker.service.
85. [root@Harbor ssl]# docker version
86. Client:
87. Version: 18.06.0-ce
88. API version: 1.38
89. Go version: go1.10.3
90. Git commit: 0ffa825
91. Built: Wed Jul 18 19:08:18 2018
92. OS/Arch: linux/amd64
93. Experimental: false
94.
剩余29页未读,继续阅读
资源评论


码海兴辰
- 粉丝: 1w+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 基于 Python tkinter 与 MySQL的图书管理系统.zip
- 基于 Python 的 Linux 应用防火墙(UESTC 课程设计).zip
- 基于 Python 编写的点名器.zip
- 基于 Python 的 Hyper-V 虚拟机管理工具.zip
- 基于 Python 的结构化日志库..zip
- 基于 Python 的 QQ 空间爬虫程序.zip
- 基于 python 的 selenium UI 自动化测试框架,采用 Page Object 设计模式进行二次开发
- 基于 python 开发的 DDNS 域名自动解析工具, 适用于百度云_ 百度智能云域名。.zip
- 基于 Python 的跳动爱心.zip
- 基于 Python 的量化投资基金的仓库.zip
- 基于 Redis 官方分布式锁文章的 Python 实现.zip
- 基于 Python 实现微信公众号爬虫.zip
- 基于 Python-Flask 的微服务框架.zip
- 基于 skywind3000_KCP 的 python 版本.zip
- 基于 Skulpt.js 的在线 Python 编程学习网站.zip
- 基于 skulpt 开发的 Python online.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
