【SRE系列】--部署gitlab

news/2024/9/8 11:08:47

1、部署gitlab

1.1下载gitlab安装包并安装

在这里插入图片描述

下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu/pool/
root@k8s-gitlab:~# wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu/pool/bionic/main/g/gitlab-ce/gitlab-ce_16.1.4-ce.0_amd64.deb
root@k8s-gitlab:~# dpkg -i gitlab-ce_16.1.4-ce.0_amd64.deb  #执行完这命令会卡顿一会,属于正常现象
Selecting previously unselected package gitlab-ce.
(Reading database ... 113088 files and directories currently installed.)
Preparing to unpack gitlab-ce_16.1.4-ce.0_amd64.deb ...
Unpacking gitlab-ce (16.1.4-ce.0) ...
Setting up gitlab-ce (16.1.4-ce.0) ...
It looks like GitLab has not been configured yet; skipping the upgrade script.*.                  *.***                 ********               *****.******             ***************            ********,,,,,,,,,***********,,,,,,,,,,,,,,,,,,,,*********,,,,,,,,,,,.,,,,,,,,,,,*******,,,,,,,,,,,,,,,,,,,,,*****,,,,,,,,,.,,,,,,,****,,,,,,.,,,***,,,,,*,._______ __  __          __/ ____(_) /_/ /   ____ _/ /_/ / __/ / __/ /   / __ `/ __ \/ /_/ / / /_/ /___/ /_/ / /_/ /\____/_/\__/_____/\__,_/_.___/Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:sudo gitlab-ctl reconfigureFor a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.mdHelp us improve the installation experience, let us know how we did with a 1 minute survey:
https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=16-1

1.2修改gitlab配置文件

root@k8s-gitlab:~# cat /etc/gitlab/gitlab.rb
external_url 'http://gitlab.weng.org'
#修改此行
#增加下面行(可以和上面行写在一起),可选邮件通知设置
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.qq.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "2923035330@qq.com"
gitlab_rails['smtp_password'] = "jdwpvcoauyerdeed"
gitlab_rails['smtp_domain'] = "qq.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = false
gitlab_rails['smtp_tls'] = true
gitlab_rails['gitlab_email_from'] = "2923035330@qq.com"
#新版中增加下面行,给root用户指定初始密码才能登录
gitlab_rails['initial_root_password'] = "12345678"
prometheus['enable'] = false
prometheus['monitor_kubernetes'] =false
alertmanager['enable'] = false
node_exporter['enable'] = false
redis_exporter['enable'] = false
postgres_exporter['enable'] = false
gitlab_exporter['enable'] = false
prometheus_monitoring['enable'] =false
grafana['enable'] = false

1.3初始化和启动gitlab服务

root@k8s-gitlab:~# gitlab-ctl reconfigure  #每修改完配置文件都需执行此命令初始化

1.4验证gitlab

#查看gitlab初始化密码
root@k8s-gitlab:~# cat /etc/gitlab/initial_root_password
# WARNING: This value is valid only in the following conditions
#          1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails['initial_root_password']` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first reconfigure run).
#          2. Password hasn't been changed manually, either via UI or via command line.
#
#          If the password shown here doesn't work, you must reset the admin password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.Password: ETgsAbhaJdwitZKBKC5J2KWrK6B2gJ62L8oc1KvV2hA=# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.cpky.cn/p/8600.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈,一经查实,立即删除!

相关文章

计算机设计大赛 深度学习乳腺癌分类

文章目录 1 前言2 前言3 数据集3.1 良性样本3.2 病变样本 4 开发环境5 代码实现5.1 实现流程5.2 部分代码实现5.2.1 导入库5.2.2 图像加载5.2.3 标记5.2.4 分组5.2.5 构建模型训练 6 分析指标6.1 精度,召回率和F1度量6.2 混淆矩阵 7 结果和结论8 最后 1 前言 &…

K8S—Pod详解

目录 一 Pod基础概念 1.1 Pod是什么 1.2 为什么要使用Pod?Pod在K8S集群中的使用方式? 1.3 基础容器pause 二 Pod的分类 2.1 自主式Pod和控制器管理的Pod 2.2 容器的分类 2.2.1 基础容器(infrastructure container) 2.2.2…

2023全新UI最新自助打印系统/云打印小程序源码 PHP后端 附教程

应用介绍 本文来自:2023全新UI最新自助打印系统/云打印小程序源码 PHP后端 附教程 - 源码1688 简介: 2023全新UI最新自助打印系统/云打印小程序源码 PHP后端 附教程 图片: ©软件著作权归作者所有。本站所有软件均来源于网络&#xff…

Redis中的AOF重写到底是怎么一回事

首先我们知道AOF和RDB都是Redis持久化的方法。RDB是Redis DB,一种二进制数据格式,这样就是相当于全量保存数据快照了。AOF则是保存命令,然后恢复的时候重放命令。 AOF随着时间推移,会越来越大,因为不断往里追加命令。…

SQL字符集

目标:了解字符集的概念,掌握MySQL数据库存储数据的字符集逻辑以及设置方式 字符集概念 MySQL字符集关系 解决乱码问题 字符集设置原理 1、字符集概念 目标:了解字符集概念,掌握字符集存储和读取的实现原理 概念 字符集:charset或者character set&am…

信息系统项目管理师(高项)—学习笔记

第一章信息化发展 1.1 信息与信息化 1.1.1 信息 信息是物质、能量及其属性的标示的集合,是确定性的增加。 它以物质介质为载体,在传递和反映世界各种事物存在方式、运动状态等的表征。 信息不是物质,也不是能力,它以一种普遍…