持续集成交付CICD:安装Gitlab Runner(从节点)

目录

一、实验

[1.选择Gitlab Runner版本](#1.选择Gitlab Runner版本)

[2.安装Gitlab Runner(第一种方式:交互式安装)](#2.安装Gitlab Runner(第一种方式:交互式安装))

[3.安装Gitlab Runner(第二种方式:非交互式安装)](#3.安装Gitlab Runner(第二种方式:非交互式安装))

二、问题

1.如何查看Gitlab版本


一、实验

1.选择Gitlab Runner版本

(1)查看gitlab版本

Edition 12.10.14

(2)下载对应版本Gitlab Runner

Index of /gitlab-runner/yum/el7-x86_64/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

这里选择如下版本:

2.安装Gitlab Runner(第一种方式:交互式安装)

(1)安装git

bash 复制代码
[root@jenkins opt]# yum install -y git

(2)安装Gitlab Runner

bash 复制代码
[root@jenkins opt]# rpm -ivh gitlab-runner-12.10.1-1.x86_64.rpm 

(3)gitlab查看token

(4)交互式注册

bash 复制代码
[root@jenkins opt]# gitlab-runner register

列表查看

bash 复制代码
[root@jenkins opt]# gitlab-runner list

配置文件

bash 复制代码
vim /etc/gitlab-runner/config.toml

(5)已出现Gitlab Runner,点击配置

(6)修改状态

(7)添加项目

(8)再次查看runner状态

(9)帮助命令

bash 复制代码
[root@jenkins opt]# gitlab-runner -h

(10)验证命令

bash 复制代码
[root@jenkins opt]# gitlab-runner verify

3.安装Gitlab Runner(第二种方式:非交互式安装)

(1)非交互式注册

bash 复制代码
#registration-token为之前页面查看的

[root@jenkins opt]# gitlab-runner register \
>  --non-interactive \
>  --url "http://192.168.204.8:82/" \
>  --registration-token "XXXXX" \
>  --executor "shell" \
>  --description "buildrunner" \
>  --tag-list "build,k8s,go" \
>  --run-untagged="true" \
>  --locked="false" \
>  --access-level="not_protected"

(2)出现节点

(3)编辑

(4)修改

(5)查看

二、问题

1.如何查看Gitlab版本

(1) 方式一:使用help页面确认​​​​​​​

点击GitLab右上角的help展开页面来确认,此种方式需要登录之后才能确认版本信息

(2)方式二:使用admin页面确认

如果希望确认GitLab各组件版本信息,可使用admin页面确认,但是此页面为管理员才可访问

(3)方式三: 使用内部文件

以容器化方式为例,可查看如下文件内容确认版本信息

bash 复制代码
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
bash 复制代码
[root@gitlab ~]# cd /opt/gitlab/embedded/service/gitlab-rails/
[root@gitlab gitlab-rails]# grep . *VERSION

(4)方式四: 命令行方式确认

执行如下命令可以查看包括各组件信息的的GitLab内容:

bash 复制代码
[root@gitlab gitlab-rails]# gitlab-rake gitlab:env:info
相关推荐
Linux运维技术栈13 分钟前
CentOS 7 升级系统内核级库 glibc 2.40 完整教程
linux·运维·centos·glibc·系统内核
刘延林.25 分钟前
树莓派5-ollama-linux-arm64.tgz 下载
linux·运维·服务器
半梦半醒*1 小时前
OSPF实验一
运维·网络·网络协议·tcp/ip·网络安全·信息与通信
TeleostNaCl1 小时前
一次因 luci 无法登录而通过 SSH 升级 OpenWrt 固件的经验总结
运维·网络·经验分享·ssh·智能路由器
ZZZKKKRTSAE2 小时前
玩转rhel9 Apache
linux·运维·服务器·apache·web
爱吃土豆的马铃薯ㅤㅤㅤㅤㅤㅤㅤㅤㅤ2 小时前
Linux 下使用 vim 文本编辑器时的操作指令
linux·运维·vim
胡耀超3 小时前
GraphRAG Docker化部署,接入本地Ollama完整技术指南:从零基础到生产部署的系统性知识体系
运维·docker·容器·大模型·知识图谱·rag·ollama
hryyx3 小时前
Linux磁盘限速(Ubuntu24实测)
linux·运维·服务器
阿巴~阿巴~3 小时前
Linux进程状态实战指南:转换关系、监控命令与状态解析
linux·运维·服务器
爱吃土豆的马铃薯ㅤㅤㅤㅤㅤㅤㅤㅤㅤ4 小时前
linux打包指令和移动指令
linux·运维·服务器