CI/CD 持续交付搭建
流行CI/CD 可持续交付的方案,作为资深开发员,必须掌握。如果面试问到这些,就显得很有管理经验,在项目组处于骨干角色。
主要包括 jekins ,gitlab , docker, k8s, git server.
git server ,gitlab ,代码管理,开发人员对项目权限管理。
jekins ,构建与部署工具。
docker 容器工具
k8s 运维工具。
用deepin 系统作为服务器。在安装git 时,发现没有rpm 与 apt-get 等软件管理工具。
安装Java环境,oracle 下载 Linux 版本jdk ,解压到某个文件。
在/etc/profile 上 加上 PATH=$PATH:/xxx/xx (/xxx/xx为jdk解压后bin目录)
source /etc/profile 让刚刚修改的文件生效。
java -version 看jdk 是否安装成功。
git server
https://www.cnblogs.com/JayYang/p/16436643.html
gitlab 搭建
https://www.cnblogs.com/kylin5201314/p/16596100.html
debian 上搭建 gitlab
https://www.yundongfang.com/Yun39025.html
gitlab安装
按照官网的操作,失败。 debain 安装gilab https://about.gitlab.com/install/#debian
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash. deepin 上的curl 命令不能用,直接获取这个.sh 脚本 文件无法正常运行,说是脚本有些地方无法通过,脚本编程的问题。
在https://packages.gitlab.com/gitlab/gitlab-ce/直接拉取安装包,上传到服务器进行安装。直接安装失败
正在设置 gitlab-ce (15.4.0-ce.0) ...
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libcrypt.so.1: version `XCRYPT_2.0' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7)
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7)
dpkg: 处理软件包 gitlab-ce (--configure)时出错:
已安装 gitlab-ce 软件包 post-installation 脚本 子进程返回错误状态 1
更换系统 换成uos 系统 ,安装成

配置gitlab 启动gitlab
# 配置文件
# 修改配置文件
[root@sean ~]# vim /etc/gitlab/gitlab.rb
external_url 'http://192.168.3.12'
nginx['listen_port'] = 80
# 刷新配置(默认启动)
gitlab-ctl reconfigure
# 启动
gitlab-ctl start
24H内 在/etc/gitlab/initial_root_password 查看root密码。
然后根据该网页完成更精细的配置。
https://about.gitlab.com/install/#debian
浙公网安备 33010602011771号