持续集成交付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
相关推荐
2401_8582861137 分钟前
OS26.【Linux】进程程序替换(下)
linux·运维·服务器·开发语言·算法·exec·进程
wanhengidc1 小时前
云手机挂机掉线是由哪些因素造成的?
运维·服务器·网络·安全·智能手机
刃神太酷啦2 小时前
Linux 常用指令全解析:从基础操作到系统管理(1w字精简版)----《Hello Linux!》(2)
linux·运维·服务器·c语言·c++·算法·leetcode
qq_433888933 小时前
win11中系统的WSL安装Centos以及必要组件
linux·运维·centos
我命由我123456 小时前
Excel 表格 - 合并单元格、清除单元格格式
运维·word·powerpoint·excel·工具·表格·软件工具
cxr82813 小时前
自动化知识工作AI代理的工程与产品实现
运维·人工智能·自动化
·云扬·13 小时前
从零开始搭 Linux 环境:VMware 下 CentOS 7 的安装与配置全流程(附图解)
linux·运维·centos
叫我阿柒啊15 小时前
从全栈开发到微服务架构:一次真实的Java面试实录
java·redis·ci/cd·微服务·vue3·springboot·jwt
btyzadt16 小时前
虚拟机蓝屏问题排查与解决
linux·运维·网络
G_H_S_3_17 小时前
【网络运维】Shell 脚本编程:while 循环与 until 循环
linux·运维·网络·shell