当前位置: 首页 > news >正文

基于Kubernetes集群构建大中型企业CICD应用平台(2)--code阶段工具gitlab安装

这里我们为gitlab服务器准备一台虚拟机:192.168.19.6-gitlab服务器

在code阶段,我们需要将不同版本的代码存储到一个仓库中,常见的版本控制工具就是SVN或者Git,这里我们采用Git作为版本控制工具,GitLab作为远程仓库。

Git(傻瓜式安装)

2.1、gitlab安装

单独准备服务器,采用Docker安装。这里需要先安装好docker和docker-compose

  • 拉取gitlab镜像

docker pull gitlab/gitlab-ce
  • 编写docker-compose.yml文件

在/usr/local/docker/gitlab-docker目录下编写docker-compose.yml文件,文件的具体内容如下:

external_url: 按照docker-compose的服务的IP地址

version: '3.1'
services:gitlab:image: 'gitlab/gitlab-ce:latest'container_name: gitlabrestart: alwaysenvironment:GITLAB_OMNIBUS_CONFIG: |external_url 'http://192.168.19.6:8929'gitlab_rails['gitlab_shell_ssh_port'] = 2224ports:- '8929:8929'- '2224:2224'volumes:- './config:/etc/gitlab'- './logs:/var/log/gitlab'- './data:/var/opt/gitlab'
  • 启动docker-compose

[root@localhost docker]# docker-compose up -d
Creating network "docker_default" with the default driver
Creating gitlab ... done
  • 访问GitLab首页

    在浏览器上输入192.168.19.6:8929

    账号使用root,密码:eH+xJVXetYyhvoeMOg88kPVgSz8gA9IES+S+KhRJAWI=

  • 查看root用户的初始密码

    [root@localhost docker]# docker exec -it 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: eH+xJVXetYyhvoeMOg88kPVgSz8gA9IES+S+KhRJAWI=
    ​
    # NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours

    从这里可以看出gitlab的root账号的初始密码是:eH+xJVXetYyhvoeMOg88kPVgSz8gA9IES+S+KhRJAWI=

  • 修改密码为:a897546s

    可以修改为自己喜欢的密码

    http://192.168.19.6:8929/-/profile/password/edit

 

 

http://www.lryc.cn/news/67954.html

相关文章:

  • 数字化转型浪潮下,如何选择适合企业的低代码平台
  • 利用 Amazon API Gateway 和 Amazon Lambda 处理 Cloudfront 的内容请求
  • Parasoft和TASKING联手提供卓越的汽车软件开发和自动化测试
  • java读取word文档内容
  • 使用Process Monitor排查因dll库被锁定导致C++程序启动报“0xc0000022”错误问题
  • Unity UI -- (1)概览
  • 玩转 LLMs 之基础设施「利刃出鞘」
  • WPF MaterialDesign 初学项目实战(1)首页搭建
  • 【纳什博弈、ADMM】基于纳什博弈和交替方向乘子法的多微网主体能源共享研究(Matlab代码实现)
  • 每日学术速递5.8
  • ChatGPT时代:我们可能站到了自然语言编程的大门口
  • 关于不同处理器的函数调用规则
  • Rust Wasm Linux开发环境搭建
  • 【项目设计】 负载均衡在线OJ系统
  • 【服务器】无公网IP,异地远程连接威联通NAS
  • 在中国,年收入20W是什么水平?答案扎心了(文末附最新招聘)
  • navicat连接oracle报错 ORA-28547
  • 量化指标WR:弱的确是弱,但是老Q会魔改啊!
  • 生物信息学知识点
  • 14.贪心算法
  • 你知道营销人为什么要讲洞察吗?
  • Neovim-配置教程
  • Windows管理内存的3种方式——堆、虚拟内存、共享内存
  • PCM/FM解调原理与Matlab算法仿真
  • 我的『1024』创作纪念日
  • Python ---> 衍生的数据技术
  • 【27】linux进阶——rpm软件包的管理
  • HTTP第六讲——键入网址再按下回车,后面究竟发生了什么?
  • layui目录和项目引入
  • Ubuntu22.04 将EFI启动分区迁移到另一块硬盘