持续集成交付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
相关推荐
赖亦无12 分钟前
【水动力学】06 Linux + Conda 环境下源码编译安装 pypims (CUDA加速) 避坑指南
linux·运维·conda·pypims·水动力学
todoitbo10 小时前
用虚拟局域网打通 Win/Mac/Linux 三端:跨设备协作的实用方案
linux·运维·macos
Sylvia-girl11 小时前
Linux下的基本指令1
linux·运维·服务器
CDN36012 小时前
360CDN SDK 游戏盾:轻量化接入 + 强防护实测
运维·游戏·网络安全
Stewie1213812 小时前
Docker 面试题
运维·docker·容器
星纬智联技术13 小时前
GEO E2E 自动化验证测试文章
运维·自动化·geo
jarreyer13 小时前
CentOS 7 无法使用 yum 安装软件
linux·运维·centos
脆皮的饭桶13 小时前
结合使用,实现IPVS的高可用性、利用VRRP Script 实现全能高可用
运维·服务器·网络
RisunJan14 小时前
Linux命令-md5sum(计算和校验文件报文摘要的工具程序)
linux·运维
抹茶咖啡15 小时前
IT运维的365天--042 骚操作之--用IPSec给远程桌面上把锁
运维·网络·it运维