持续集成交付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
相关推荐
慕容雪_22 分钟前
运维笔记-笔记本无线网卡连接wifi,有线网卡连接内网
运维·内网·远程
小杰帅气30 分钟前
进程优先级与切换调度
linux·运维·服务器
华纳云IDC服务商31 分钟前
DNS负载均衡能自动避开故障服务器吗?
运维·服务器·负载均衡
奋斗的阿狸_198634 分钟前
键盘组合键监听与 xterm 唤醒程序
linux·运维·服务器
小张成长计划..37 分钟前
【linux】2:linux权限的概念
linux·运维·服务器
ben9518chen39 分钟前
Linux操作系统基本使用
linux·运维·服务器
以太浮标43 分钟前
华为eNSP模拟器综合实验之- HRP(华为冗余协议)双机热备
运维·网络·华为·信息与通信
慧一居士43 分钟前
Gitea和GitLab对比
运维·gitlab·gitea
不像程序员的程序媛1 小时前
Linux开机自启动systemd配置
linux·运维·服务器
墨香幽梦客1 小时前
企业IT运维流程标准化:从事件管理到问题闭环的自动化实践
运维·自动化