持续集成交付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
相关推荐
哲讯智能科技20 小时前
苏州SAP代理商:哲讯科技助力企业数字化转型
大数据·运维·人工智能
十五年专注C++开发20 小时前
Qt .pro配置gcc相关命令(三):-W1、-L、-rpath和-rpath-link
linux·运维·c++·qt·cmake·跨平台编译
qq_6285157620 小时前
Centos与RockLinux设置静态ip
linux·运维·centos
程序员老乔21 小时前
【Dify系列】【一】【安装与部署】【ubuntu22.04安装docker部署dify1.4.2】
运维·docker·容器
沧浪之水120101371 天前
linux常用命令
linux·运维·服务器
梦会实现1 天前
无外接物理显示器的Ubuntu系统的远程桌面连接(升级版)
linux·运维·ubuntu·计算机外设
Hello.Reader1 天前
NGINX 四层共享内存区同步模块实战 `ngx_stream_zone_sync_module`
运维·nginx
暗离子跃迁1 天前
达梦数据库单机部署dmhs同步复制(dm8->kafka)
linux·运维·数据库·分布式·学习·kafka·达梦数据库
北城笑笑1 天前
Server 11 ,⭐通过脚本在全新 Ubuntu 系统中安装 Nginx 环境,安装到指定目录( 脚本安装Nginx )
linux·运维·前端·nginx·ubuntu
zsyzClb1 天前
总结用ubuntu一直以来遇到的问题
linux·运维·ubuntu