https://about.gitlab.cn/install

    https://docs.gitlab.cn/omnibus

    https://docs.gitlab.com/runner/install/

    配置:

    1. cp /etc/gitlab/gitlab.rb.template gitlab.rb
    2. vim /etc/gitlab/gitlab.rb
    3. external_url 'http://gitlab.riyimei.cn'

    用户头像不显示

    ### Gravatar Settings
    # gitlab_rails['gravatar_plain_url'] = 'http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon'
    # gitlab_rails['gravatar_ssl_url'] = 'https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon'
    gitlab_rails['gravatar_plain_url'] = 'http://cdn.libravatar.org/avatar/%{hash}?s=%{size}&d=identicon'
    

    初始化

    gitlab-ctl reconfigure
    

    启动Gitlab服务

    gitlab-ctl start
    gitlab-ctl restart
    gitlab-ctl status
    
    # 启动Gitlab所有组件
    sudo gitlab-ctl start
    
    # 停止Gitlab所有组件
    sudo gitlab-ctl stop
    
    # 重启Gitlab所有组件
    sudo gitlab-ctl restart
    

    密码并存储在 /etc/gitlab/initial_root_password 文件中(出于安全原因,24 小时后,此文件会被第一次 gitlab-ctl reconfigure 自动删除,因此若使用随机密码登录,建议安装成功初始登录成功之后,立即修改初始密码)。
    使用此密码和用户名 root 登录

    image.png

    Install GitLab Runner
    https://docs.gitlab.com/runner/install

    image.png

    helm repo add gitlab https://charts.gitlab.io/
    helm repo update
    helm search repo -l gitlab/gitlab-runner
    
    helm pull gitlab/gitlab-runner
    tar xf gitlab-runner-0.37.2.tgz
    

    image.png

    [root@master gitlab-runner]# helm install --namespace gitlab-runner  --set rbac.create="true" --set rbac.clusterWideAccess="true"   gitlab-runner -f values.yaml gitlab/gitlab-runner
    NAME: gitlab-runner
    LAST DEPLOYED: Sat Feb 19 23:11:48 2022
    NAMESPACE: gitlab-runner
    STATUS: deployed
    REVISION: 1
    TEST SUITE: None
    NOTES:
    Your GitLab Runner should now be registered against the GitLab instance reachable at: "http://192.168.11.154/"
    
    Runner namespace "gitlab-runner" was found in runners.config template.
    [root@master gitlab-runner]#
    

    https://gitlab.com/gitlab-org/gitlab-runner/-/issues/3841

    [root@master gitlab-runner]# kubectl -n gitlab-runner get pod 
    NAME                                           READY   STATUS    RESTARTS   AGE
    gitlab-runner-gitlab-runner-55df6c698b-8rglf   1/1     Running   0          2m9s
    [root@master gitlab-runner]#
    

    image.png

    Install the GitLab Agent Server (KAS)

    http://gitlab.riyimei.cn/help/administration/clusters/kas.md

    GitLab Agent for Kubernetes
    http://gitlab.riyimei.cn/help/user/clusters/agent/index.md
    Install the GitLab Agent
    http://gitlab.riyimei.cn/help/user/clusters/agent/install/index.md

    /etc/gitlab/gitlab.rb
    
    gitlab_kas['enable'] = true
    
    sudo gitlab-ctl restart
    sudo gitlab-ctl status
    

    用户密码重置
    https://docs.gitlab.com/ee/security/reset_user_password.html

    [root@riyimei ~]# sudo gitlab-rake "gitlab:password:reset"
    Enter username: root
    Enter password: 
    Confirm password: 
    Password successfully updated for user with username root.
    [root@riyimei ~]#