Centos7.9 持续集成与部署


Centos7.9 持续集成与部署


前言

接上文 VirtualBox 搭建Centos7.9 , 在这里说一下 Centos7.9 持续集成与部署。

正文

DevOps(Development和Operations的组合词)是一组过程、方法与系统的统称, 用于促进开发(应用程序/软件工程)、技术运营和质量保障(QA)部门之间的沟通、协作与整合。

它是一种重视“软件开发人员(Dev)”和“IT运维技术人员(Ops)”之间沟通合作的文化、运动或惯例。 透过自动化“软件交付”和“架构变更”的流程,来使得构建、测试、发布软件能够更加地快捷、频繁和可靠。 它的出现是由于软件行业日益清晰地认识到:为了按时交付软件产品和服务,开发和运维工作必须紧密合作。

CI(Continuous Integration)持续集成是借助工具对软件项目进行持续的自动化的编译打包构建测试发布,来检查软件交付质量的一种行为。 而CD(Continuous Delivery)持续部署是基于持续交付的优势自动将经过测试的代码推入生产环境的过程。

私有仓库搭建

通常我们在docker中拉取的镜像都是在docker hub在线存储库中获取的,这个在线存储库里的docker镜像可以由任何用户发布和使用, 显然这在某些场景下是不适用的,比如某些互金的隐私项目,或者是公司完全处于内网状态不能访问外网, 再或者你想个性化定制某些配置等等等,所以这就需要用到私有存储库了。

Docker Registry 是一个无状态,高度可扩展的服务器端应用程序,它存储并允许您分发Docker映像。

拉取镜像:

docker pull registry

创建容器:

> docker run --name registry --privileged=true -p 5000:5000 -v /opt/registry:/var/lib/registry -d registry

Registry服务默认会将上传的镜像保存在容器的/var/lib/registry,我们将主机的/opt/registry目录挂载到该目录, 即可实现将镜像保存到主机的/opt/registry目录了。

[root@localhost ~]# docker pull registry
Using default tag: latest
Trying to pull repository docker.io/library/registry ...
latest: Pulling from docker.io/library/registry
59bf1c3509f3: Pull complete
666ba61612fd: Pull complete
a4642f78634a: Pull complete
9ab650d99063: Pull complete
91dceb018e81: Pull complete
Digest: sha256:c26590bcf53822a542e78fab5c88e1dfbcdee91c1882f4656b7db7b542d91d97
Status: Downloaded newer image for docker.io/registry:latest
[root@localhost ~]#
[root@localhost ~]# docker images
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
docker.io/registry   latest              9c97225e83c8        2 weeks ago         24.2 MB
docker.io/nginx      latest              c316d5a335a5        3 weeks ago         142 MB
docker.io/php        7.1.30-fpm          0b13895891aa        2 years ago         391 MB
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# docker run --name registry --privileged=true -p 5000:5000 -v /opt/registry:/var/lib/registry -d registry
e8314bf2b462d004e767661f3a7d8371ec4eee6ff89a451526dad8181fbc9d1e
[root@localhost ~]#
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
e8314bf2b462        registry            "/entrypoint.sh /e..."   6 seconds ago       Up 4 seconds        0.0.0.0:5000->5000/tcp   registry
813daeef096d        nginx               "/docker-entrypoin..."   5 days ago          Up 4 days           0.0.0.0:80->80/tcp       server-nginx
83199b3ed9ba        php:7.1.30-fpm      "docker-php-entryp..."   5 days ago          Up 2 hours          0.0.0.0:9000->9000/tcp   server-php
[root@localhost ~]#

配置私有仓库地址

vim /etc/docker/daemon.json

加入一行:

{"insecure-registries": [192.168.56.108:5000]}

重新加载配置

sudo systemctl daemon-reload

重启启动 docker

sudo systemctl restart docker

访问:http://192.168.56.108:5000/v2/_catalog,返回:

{"repositories":[]}
[root@localhost ~]# vim /etc/docker/daemon.json
[root@localhost ~]#
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]#
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
e8314bf2b462        registry            "/entrypoint.sh /e..."   About an hour ago   Up About an hour    0.0.0.0:5000->5000/tcp   registry
813daeef096d        nginx               "/docker-entrypoin..."   5 days ago          Up 4 days           0.0.0.0:80->80/tcp       server-nginx
83199b3ed9ba        php:7.1.30-fpm      "docker-php-entryp..."   5 days ago          Up 3 hours          0.0.0.0:9000->9000/tcp   server-php
[root@localhost ~]#
[root@localhost ~]# systemctl restart docker
[root@localhost ~]#
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
e8314bf2b462        registry            "/entrypoint.sh /e..."   About an hour ago   Up About an hour    0.0.0.0:5000->5000/tcp   registry
813daeef096d        nginx               "/docker-entrypoin..."   5 days ago          Up 4 days           0.0.0.0:80->80/tcp       server-nginx
83199b3ed9ba        php:7.1.30-fpm      "docker-php-entryp..."   5 days ago          Up 3 hours          0.0.0.0:9000->9000/tcp   server-php
[root@localhost ~]#

GitLab安装

GitLab介绍

Gitlab的服务构成:

Nginx:静态web服务器。
gitlab-shell:用于处理Git命令和修改authorized keys列表。
gitlab-workhorse: 轻量级的反向代理服务器。
logrotate:日志文件管理工具。
postgresql:数据库。
redis:缓存数据库。
sidekiq:用于在后台执行队列任务(异步执行)。
unicorn:An HTTP server for Rack applications,GitLab Rails应用是托管在这个服务器上面的。

GitLab工作流程:

创建容器

拉取gitlab镜像:

docker pull gitlab/gitlab-ce

挂载目录准备:

mkdir -p /home/gitlab/etc

mkdir -p /home/gitlab/data

mkdir -p /home/gitlab/logs

运行:

docker run --name gitlab -p 8000:80 -p 8001:443 -v /home/gitlab/etc:/etc/gitlab -v /home/gitlab/data:/var/opt/gitlab -v /home/gitlab/logs:/var/log/gitlab -v /etc/localtime:/etc/localtime:ro --privileged=true -d gitlab/gitlab-ce:latest
[root@localhost ~]# docker pull gitlab/gitlab-ce
Using default tag: latest
Trying to pull repository docker.io/gitlab/gitlab-ce ...
latest: Pulling from docker.io/gitlab/gitlab-ce
08c01a0ec47e: Pull complete
1336f80b1446: Pull complete
5527f2ed103a: Pull complete
e94405815edf: Pull complete
1775badf737c: Pull complete
a13fc59dc1f7: Pull complete
6bc3ef7350c0: Pull complete
0bc7e1696e41: Pull complete
Digest: sha256:3d5757bd08e1dc08fae8236733c008c620394c7ea60370b273ee1f661daf7a07
Status: Downloaded newer image for docker.io/gitlab/gitlab-ce:latest
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# docker images
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
docker.io/gitlab/gitlab-ce   latest              6f6c9f0dd251        6 days ago          2.39 GB
docker.io/registry           latest              9c97225e83c8        2 weeks ago         24.2 MB
[root@localhost ~]#
[root@localhost ~]# mkdir -p /home/gitlab/etc /home/gitlab/data /home/gitlab/logs
[root@localhost ~]#
[root@localhost ~]# ls -l /home/gitlab
总用量 0
drwxr-xr-x 2 root root 6 3月  17 10:58 data
drwxr-xr-x 2 root root 6 3月  17 10:58 etc
drwxr-xr-x 2 root root 6 3月  17 10:58 logs
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# docker run --name gitlab -p 8000:80 -p 8001:443 -v /home/gitlab/etc:/etc/gitlab -v /home/gitlab/data:/var/opt/gitlab -v /home/gitlab/logs:/var/log/gitlab -v /etc/localtime:/etc/localtime:ro --privileged=true -d gitlab/gitlab-ce:latest
0569bc0b6906a0424731defec1a13c6641798b9925a4b809f79cd49165837268
[root@localhost ~]#
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                             PORTS                                                      NAMES
0569bc0b6906        gitlab/gitlab-ce:latest   "/assets/wrapper"        31 seconds ago      Up 29 seconds (health: starting)   22/tcp, 0.0.0.0:8000->80/tcp, 0.0.0.0:8001->443/tcp        gitlab
e8314bf2b462        registry                  "/entrypoint.sh /e..."   5 hours ago         Up 5 hours                         0.0.0.0:5000->5000/tcp                                     registry
[root@localhost ~]#

这个容器比较大,启动需要时间,我们可以查看启动日志:

docker logs -f gitlab

启动成功后,浏览器访问 192.168.56.108:8000 可以看到 gitlab 的登录页面。

配置

现在在gitlab上创建项目的时候,生成项目的URL访问地址是按容器的 hostname 来生成的,也就是容器的id。 作为gitlab服务器,我们需要一个固定的URL访问地址,需要配置 gitlab.rb 外部访问地址,在宿主机修改:

vim /home/gitlab/etc/gitlab.rb

找到位置并写入:

external_url 'http://192.168.56.108:8000'

配置gitlab.yml:

vim /home/gitlab/data/gitlab-rails/etc/gitlab.yml

修改为:

gitlab:
    host: 192.168.56.108
    port: 8000
    https: false

配置好后,可以选择重启容器(建议):

docker restart gitlab

容器内重启

也可以选择在容器内重启gitlab服务(不建议):

docker exec -it gitlab /bin/bash

gitlab-ctl reconfigure

gitlab-ctl restart

[root@localhost ~]# vim /home/gitlab/etc/gitlab.rb
[root@localhost ~]#
[root@localhost ~]# vim /home/gitlab/data/gitlab-rails/etc/gitlab.yml
[root@localhost ~]#
[root@localhost ~]# docker exec -it gitlab /bin/bash
root@da9824e0ef9d:/#
root@da9824e0ef9d:/# gitlab-ctl reconfigure
Starting Chef Infra Client, version 15.17.4
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
  - gitlab (0.0.1)
  - package (0.1.0)
  - logrotate (0.1.0)
  - postgresql (0.1.0)
  - redis (0.1.0)
  - monitoring (0.1.0)
  - registry (0.1.0)
  - mattermost (0.1.0)
  - consul (0.1.0)
  - gitaly (0.1.0)
  - gitlab-kas (0.1.0)
  - letsencrypt (0.1.0)
  - praefect (0.1.0)
  - gitlab-pages (0.1.0)
  - nginx (0.1.0)
  - runit (5.1.3)
  - acme (4.1.3)
  - crond (0.1.0)
Installing Cookbook Gems:
Compiling Cookbooks...
Recipe: gitlab::default
  * directory[/etc/gitlab] action create (up to date)
  Converging 268 resources
  * directory[/etc/gitlab] action create (up to date)
  * directory[Create /var/opt/gitlab] action create (up to date)
  * directory[Create /var/log/gitlab] action create (up to date)
  * directory[/opt/gitlab/embedded/etc] action create (up to date)
  * template[/opt/gitlab/embedded/etc/gitconfig] action create (up to date)
Recipe: gitlab::web-server
  * account[Webserver user and group] action create (up to date)
Recipe: gitlab::users
  * directory[/var/opt/gitlab] action create (up to date)
  * account[GitLab user and group] action create (up to date)
  * template[/var/opt/gitlab/.gitconfig] action create
    - update content in file /var/opt/gitlab/.gitconfig from a30bc1 to f7bae1
    --- /var/opt/gitlab/.gitconfig      2022-03-17 09:46:02.415464800 +0800
    +++ /var/opt/gitlab/.chef-.gitconfig20220317-5960-16xh26m.gitconfig 2022-03-17 10:33:04.110790205 +0800
    @@ -4,7 +4,7 @@

     [user]
             name = GitLab
    -        email = gitlab@da9824e0ef9d
    +        email = gitlab@192.168.56.108
     [core]
             autocrlf = input
             alternateRefsCommand="exit 0 #"
  * directory[/var/opt/gitlab/.bundle] action create (up to date)
Recipe: gitlab::gitlab-shell
  * storage_directory[/var/opt/gitlab/.ssh] action create
    * ruby_block[directory resource: /var/opt/gitlab/.ssh] action run (skipped due to not_if)
     (up to date)
  * directory[/var/log/gitlab/gitlab-shell/] action create (up to date)
  * directory[/var/opt/gitlab/gitlab-shell] action create (up to date)
  * templatesymlink[Create a config.yml and create a symlink to Rails root] action create
    * template[/var/opt/gitlab/gitlab-shell/config.yml] action create (up to date)
    * link[Link /opt/gitlab/embedded/service/gitlab-shell/config.yml to /var/opt/gitlab/gitlab-shell/config.yml] action create (up to date)
     (up to date)
  * link[/opt/gitlab/embedded/service/gitlab-shell/.gitlab_shell_secret] action create (up to date)
  * file[/var/opt/gitlab/.ssh/authorized_keys] action create_if_missing (up to date)
Recipe: gitlab::gitlab-rails
  * storage_directory[/var/opt/gitlab/git-data] action create
    * ruby_block[directory resource: /var/opt/gitlab/git-data] action run (skipped due to not_if)
     (up to date)
  * storage_directory[/var/opt/gitlab/git-data/repositories] action create
    * ruby_block[directory resource: /var/opt/gitlab/git-data/repositories] action run (skipped due to not_if)
     (up to date)
Recipe: gitlab::rails_pages_shared_path
  * storage_directory[/var/opt/gitlab/gitlab-rails/shared] action create
    * ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared] action run (skipped due to not_if)
     (up to date)
  * storage_directory[/var/opt/gitlab/gitlab-rails/shared/pages] action create
    * ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/pages] action run (skipped due to not_if)
     (up to date)
Recipe: gitlab::gitlab-rails
  * storage_directory[/var/opt/gitlab/gitlab-rails/shared/artifacts] action create
    * ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/artifacts] action run (skipped due to not_if)
     (up to date)
  * storage_directory[/var/opt/gitlab/gitlab-rails/shared/external-diffs] action create
    * ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/external-diffs] action run (skipped due to not_if)
     (up to date)
  * storage_directory[/var/opt/gitlab/gitlab-rails/shared/lfs-objects] action create
    * ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/lfs-objects] action run (skipped due to not_if)
     (up to date)
  * storage_directory[/var/opt/gitlab/gitlab-rails/shared/packages] action create
    * ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/packages] action run (skipped due to not_if)
     (up to date)
  * storage_directory[/var/opt/gitlab/gitlab-rails/shared/dependency_proxy] action create
    * ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/dependency_proxy] action run (skipped due to not_if)
     (up to date)
  * storage_directory[/var/opt/gitlab/gitlab-rails/shared/terraform_state] action create
    * ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/terraform_state] action run (skipped due to not_if)
     (up to date)
  * storage_directory[/var/opt/gitlab/gitlab-rails/shared/encrypted_settings] action create
    * ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/encrypted_settings] action run (skipped due to not_if)
     (up to date)
  * storage_directory[/var/opt/gitlab/gitlab-rails/uploads] action create
    * ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/uploads] action run (skipped due to not_if)
     (up to date)
  * storage_directory[/var/opt/gitlab/gitlab-ci/builds] action create
    * ruby_block[directory resource: /var/opt/gitlab/gitlab-ci/builds] action run (skipped due to not_if)
     (up to date)
  * storage_directory[/var/opt/gitlab/gitlab-rails/shared/cache] action create
    * ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/cache] action run (skipped due to not_if)
     (up to date)
  * storage_directory[/var/opt/gitlab/gitlab-rails/shared/tmp] action create
    * ruby_block[directory resource: /var/opt/gitlab/gitlab-rails/shared/tmp] action run (skipped due to not_if)
     (up to date)
  * storage_directory[/opt/gitlab/embedded/service/gitlab-rails/public] action create (skipped due to only_if)
  * directory[create /var/opt/gitlab/gitlab-rails/etc] action create (up to date)
  * directory[create /opt/gitlab/etc/gitlab-rails] action create (up to date)
  * directory[create /var/opt/gitlab/gitlab-rails/working] action create (up to date)
  * directory[create /var/opt/gitlab/gitlab-rails/tmp] action create (up to date)
  * directory[create /var/opt/gitlab/gitlab-rails/upgrade-status] action create (up to date)
  * directory[create /var/log/gitlab/gitlab-rails] action create (up to date)
  * storage_directory[/var/opt/gitlab/backups] action create
    * ruby_block[directory resource: /var/opt/gitlab/backups] action run (skipped due to not_if)
     (up to date)
  * directory[/var/opt/gitlab/gitlab-rails] action create (up to date)
  * directory[/var/opt/gitlab/gitlab-ci] action create (up to date)
  * file[/var/opt/gitlab/gitlab-rails/etc/gitlab-registry.key] action create (skipped due to only_if)
  * template[/opt/gitlab/etc/gitlab-rails-rc] action create (up to date)
  * file[/opt/gitlab/etc/gitlab-rails/gitlab-rails-rc] action delete (up to date)
  * file[/opt/gitlab/embedded/service/gitlab-rails/.secret] action delete (up to date)
  * file[/var/opt/gitlab/gitlab-rails/etc/secret] action delete (up to date)
  * templatesymlink[Create a database.yml and create a symlink to Rails root] action create
    * template[/var/opt/gitlab/gitlab-rails/etc/database.yml] action create (up to date)
    * link[Link /opt/gitlab/embedded/service/gitlab-rails/config/database.yml to /var/opt/gitlab/gitlab-rails/etc/database.yml] action create (up to date)
     (up to date)
  * templatesymlink[Create a secrets.yml and create a symlink to Rails root] action create
    * template[/var/opt/gitlab/gitlab-rails/etc/secrets.yml] action create (up to date)
    * link[Link /opt/gitlab/embedded/service/gitlab-rails/config/secrets.yml to /var/opt/gitlab/gitlab-rails/etc/secrets.yml] action create (up to date)
     (up to date)
  * templatesymlink[Create a resque.yml and create a symlink to Rails root] action create
    * template[/var/opt/gitlab/gitlab-rails/etc/resque.yml] action create (up to date)
    * link[Link /opt/gitlab/embedded/service/gitlab-rails/config/resque.yml to /var/opt/gitlab/gitlab-rails/etc/resque.yml] action create (up to date)
     (up to date)
  * templatesymlink[Create a cable.yml and create a symlink to Rails root] action create
    * template[/var/opt/gitlab/gitlab-rails/etc/cable.yml] action create (up to date)
    * link[Link /opt/gitlab/embedded/service/gitlab-rails/config/cable.yml to /var/opt/gitlab/gitlab-rails/etc/cable.yml] action create (up to date)
     (up to date)
  * templatesymlink[Create a redis.cache.yml and create a symlink to Rails root] action create (skipped due to not_if)
  * file[/opt/gitlab/embedded/service/gitlab-rails/config/redis.cache.yml] action delete (up to date)
  * file[/var/opt/gitlab/gitlab-rails/etc/redis.cache.yml] action delete (up to date)
  * templatesymlink[Create a redis.queues.yml and create a symlink to Rails root] action create (skipped due to not_if)
  * file[/opt/gitlab/embedded/service/gitlab-rails/config/redis.queues.yml] action delete (up to date)
  * file[/var/opt/gitlab/gitlab-rails/etc/redis.queues.yml] action delete (up to date)
  * templatesymlink[Create a redis.shared_state.yml and create a symlink to Rails root] action create (skipped due to not_if)
  * file[/opt/gitlab/embedded/service/gitlab-rails/config/redis.shared_state.yml] action delete (up to date)
  * file[/var/opt/gitlab/gitlab-rails/etc/redis.shared_state.yml] action delete (up to date)
  * templatesymlink[Create a redis.trace_chunks.yml and create a symlink to Rails root] action create (skipped due to not_if)
  * file[/opt/gitlab/embedded/service/gitlab-rails/config/redis.trace_chunks.yml] action delete (up to date)
  * file[/var/opt/gitlab/gitlab-rails/etc/redis.trace_chunks.yml] action delete (up to date)
  * templatesymlink[Create a redis.rate_limiting.yml and create a symlink to Rails root] action create (skipped due to not_if)
  * file[/opt/gitlab/embedded/service/gitlab-rails/config/redis.rate_limiting.yml] action delete (up to date)
  * file[/var/opt/gitlab/gitlab-rails/etc/redis.rate_limiting.yml] action delete (up to date)
  * templatesymlink[Create a redis.sessions.yml and create a symlink to Rails root] action create (skipped due to not_if)
  * file[/opt/gitlab/embedded/service/gitlab-rails/config/redis.sessions.yml] action delete (up to date)
  * file[/var/opt/gitlab/gitlab-rails/etc/redis.sessions.yml] action delete (up to date)
  * templatesymlink[Create a smtp_settings.rb and create a symlink to Rails root] action delete
    * file[/var/opt/gitlab/gitlab-rails/etc/smtp_settings.rb] action delete (up to date)
    * link[/opt/gitlab/embedded/service/gitlab-rails/config/initializers/smtp_settings.rb] action delete (up to date)
     (up to date)
  * templatesymlink[Create a gitlab.yml and create a symlink to Rails root] action create
    * template[/var/opt/gitlab/gitlab-rails/etc/gitlab.yml] action create
      - update content in file /var/opt/gitlab/gitlab-rails/etc/gitlab.yml from ae8dce to 7bf7db
      --- /var/opt/gitlab/gitlab-rails/etc/gitlab.yml   2022-03-17 10:30:48.849658204 +0800
      +++ /var/opt/gitlab/gitlab-rails/etc/.chef-gitlab20220317-5960-8lixs9.yml 2022-03-17 10:33:06.026445209 +0800
      @@ -48,7 +48,7 @@
           # Uncomment and set to false if you need to disable email sending from GitLab (default: true)
           email_enabled:
           # Email address used in the "From" field in mails sent by GitLab
      -    email_from: gitlab@da9824e0ef9d
      +    email_from: gitlab@192.168.56.108
           email_display_name:
           email_reply_to:
           email_subject_suffix:
    * link[Link /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml to /var/opt/gitlab/gitlab-rails/etc/gitlab.yml] action create (up to date)

  * templatesymlink[Create a gitlab_workhorse_secret and create a symlink to Rails root] action create
    * template[/var/opt/gitlab/gitlab-rails/etc/gitlab_workhorse_secret] action create (up to date)
    * link[Link /opt/gitlab/embedded/service/gitlab-rails/.gitlab_workhorse_secret to /var/opt/gitlab/gitlab-rails/etc/gitlab_workhorse_secret] action create (up to date)
     (up to date)
  * templatesymlink[Create a gitlab_shell_secret and create a symlink to Rails root] action create
    * template[/var/opt/gitlab/gitlab-rails/etc/gitlab_shell_secret] action create (up to date)
    * link[Link /opt/gitlab/embedded/service/gitlab-rails/.gitlab_shell_secret to /var/opt/gitlab/gitlab-rails/etc/gitlab_shell_secret] action create (up to date)
     (up to date)
  * templatesymlink[Create a gitlab_pages_secret and create a symlink to Rails root] action create
    * template[/var/opt/gitlab/gitlab-rails/etc/gitlab_pages_secret] action create (up to date)
    * link[Link /opt/gitlab/embedded/service/gitlab-rails/.gitlab_pages_secret to /var/opt/gitlab/gitlab-rails/etc/gitlab_pages_secret] action create (up to date)
     (up to date)
  * templatesymlink[Create a gitlab_kas_secret and create a symlink to Rails root] action create
    * template[/var/opt/gitlab/gitlab-rails/etc/gitlab_kas_secret] action create (up to date)
    * link[Link /opt/gitlab/embedded/service/gitlab-rails/.gitlab_kas_secret to /var/opt/gitlab/gitlab-rails/etc/gitlab_kas_secret] action create (up to date)
     (up to date)
  * link[/opt/gitlab/embedded/service/gitlab-rails/config/initializers/relative_url.rb] action delete (up to date)
  * file[/var/opt/gitlab/gitlab-rails/etc/relative_url.rb] action delete (up to date)
  * env_dir[/opt/gitlab/etc/gitlab-rails/env] action create
    * directory[/opt/gitlab/etc/gitlab-rails/env] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-rails/env/HOME] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-rails/env/RAILS_ENV] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-rails/env/LD_PRELOAD] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-rails/env/BUNDLE_GEMFILE] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-rails/env/SIDEKIQ_MEMORY_KILLER_MAX_RSS] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-rails/env/PATH] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-rails/env/ICU_DATA] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-rails/env/PYTHONPATH] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-rails/env/EXECJS_RUNTIME] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-rails/env/TZ] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-rails/env/SSL_CERT_DIR] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-rails/env/SSL_CERT_FILE] action create (up to date)
     (up to date)
  * link[/opt/gitlab/embedded/service/gitlab-rails/tmp] action create (up to date)
  * link[/opt/gitlab/embedded/service/gitlab-rails/public/uploads] action create (up to date)
  * link[/opt/gitlab/embedded/service/gitlab-rails/log] action create (up to date)
  * link[/var/log/gitlab/gitlab-rails/sidekiq.log] action delete (skipped due to only_if)
  * file[/opt/gitlab/embedded/service/gitlab-rails/db/structure.sql] action create (up to date)
  * remote_file[/var/opt/gitlab/gitlab-rails/VERSION] action create/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/chef-15.17.4/lib/chef/provider/remote_file/local_file.rb:43: warning: URI.unescape is obsolete
 (up to date)
  * remote_file[/var/opt/gitlab/gitlab-rails/REVISION] action create/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/chef-15.17.4/lib/chef/provider/remote_file/local_file.rb:43: warning: URI.unescape is obsolete
 (up to date)
  * version_file[Create version file for Rails] action create
    * file[/var/opt/gitlab/gitlab-rails/RUBY_VERSION] action create (up to date)
     (up to date)
  * execute[clear the gitlab-rails cache] action nothing (skipped due to action :nothing)
  * file[/var/opt/gitlab/gitlab-rails/config.ru] action delete (up to date)
Recipe: gitlab::selinux
  * bash[Set proper security context on ssh files for selinux] action nothing (skipped due to action :nothing)
Recipe: gitlab::add_trusted_certs
  * directory[/etc/gitlab/trusted-certs] action create (up to date)
  * directory[/opt/gitlab/embedded/ssl/certs] action create (up to date)
  * file[/opt/gitlab/embedded/ssl/certs/README] action create (up to date)
  * ruby_block[Move existing certs and link to /opt/gitlab/embedded/ssl/certs] action run (skipped due to only_if)
Recipe: gitlab::default
  * service[create a temporary puma service] action nothing (skipped due to action :nothing)
  * service[create a temporary sidekiq service] action nothing (skipped due to action :nothing)
  * service[create a temporary mailroom service] action nothing (skipped due to action :nothing)
Recipe: package::sysctl
  * execute[reload all sysctl conf] action nothing (skipped due to action :nothing)
Recipe: logrotate::folders_and_configs
  * directory[/var/opt/gitlab/logrotate] action create (up to date)
  * directory[/var/opt/gitlab/logrotate/logrotate.d] action create (up to date)
  * directory[/var/log/gitlab/logrotate] action create (up to date)
  * template[/var/opt/gitlab/logrotate/logrotate.conf] action create (up to date)
  * template[/var/opt/gitlab/logrotate/logrotate.d/nginx] action create (up to date)
  * template[/var/opt/gitlab/logrotate/logrotate.d/puma] action create (up to date)
  * template[/var/opt/gitlab/logrotate/logrotate.d/gitlab-rails] action create (up to date)
  * template[/var/opt/gitlab/logrotate/logrotate.d/gitlab-shell] action create (up to date)
  * template[/var/opt/gitlab/logrotate/logrotate.d/gitlab-workhorse] action create (up to date)
  * template[/var/opt/gitlab/logrotate/logrotate.d/gitlab-pages] action create (up to date)
  * template[/var/opt/gitlab/logrotate/logrotate.d/gitlab-kas] action create (up to date)
  * template[/var/opt/gitlab/logrotate/logrotate.d/gitaly] action create (up to date)
  * template[/var/opt/gitlab/logrotate/logrotate.d/mailroom] action create (up to date)
Recipe: logrotate::enable
  * service[logrotate] action nothing (skipped due to action :nothing)
  * runit_service[logrotate] action enable
    * ruby_block[restart_service] action nothing (skipped due to action :nothing)
    * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/sv/logrotate] action create (up to date)
    * template[/opt/gitlab/sv/logrotate/run] action create (up to date)
    * directory[/opt/gitlab/sv/logrotate/log] action create (up to date)
    * directory[/opt/gitlab/sv/logrotate/log/main] action create (up to date)
    * template[/opt/gitlab/sv/logrotate/log/config] action create (up to date)
    * ruby_block[verify_chown_persisted_on_logrotate] action nothing (skipped due to action :nothing)
    * link[/var/log/gitlab/logrotate/config] action create (up to date)
    * template[/opt/gitlab/sv/logrotate/log/run] action create (up to date)
    * directory[/opt/gitlab/sv/logrotate/env] action create (up to date)
    * ruby_block[Delete unmanaged env files for logrotate service] action run (skipped due to only_if)
    * template[/opt/gitlab/sv/logrotate/check] action create (skipped due to only_if)
    * template[/opt/gitlab/sv/logrotate/finish] action create (skipped due to only_if)
    * directory[/opt/gitlab/sv/logrotate/control] action create (up to date)
    * template[/opt/gitlab/sv/logrotate/control/t] action create (up to date)
    * link[/opt/gitlab/init/logrotate] action create (up to date)
    * file[/opt/gitlab/sv/logrotate/down] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/service] action create (up to date)
    * link[/opt/gitlab/service/logrotate] action create (up to date)
    * ruby_block[wait for logrotate service socket] action run (skipped due to not_if)
     (up to date)
Recipe: redis::enable
  * redis_service[redis] action create
    * account[user and group for redis] action create (up to date)
    * group[Socket group] action create (up to date)
    * directory[/var/opt/gitlab/redis] action create (up to date)
    * directory[/var/log/gitlab/redis] action create (up to date)
    * template[/var/opt/gitlab/redis/redis.conf] action create (up to date)
  Recipe: <Dynamically Defined Resource>
    * service[redis] action nothing (skipped due to action :nothing)
    * runit_service[redis] action enable
      * ruby_block[restart_service] action nothing (skipped due to action :nothing)
      * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
      * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
      * directory[/opt/gitlab/sv/redis] action create (up to date)
      * template[/opt/gitlab/sv/redis/run] action create (up to date)
      * directory[/opt/gitlab/sv/redis/log] action create (up to date)
      * directory[/opt/gitlab/sv/redis/log/main] action create (up to date)
      * template[/opt/gitlab/sv/redis/log/config] action create (up to date)
      * ruby_block[verify_chown_persisted_on_redis] action nothing (skipped due to action :nothing)
      * link[/var/log/gitlab/redis/config] action create (up to date)
      * template[/opt/gitlab/sv/redis/log/run] action create (up to date)
      * directory[/opt/gitlab/sv/redis/env] action create (up to date)
      * ruby_block[Delete unmanaged env files for redis service] action run (skipped due to only_if)
      * template[/opt/gitlab/sv/redis/check] action create (skipped due to only_if)
      * template[/opt/gitlab/sv/redis/finish] action create (skipped due to only_if)
      * directory[/opt/gitlab/sv/redis/control] action create (up to date)
      * link[/opt/gitlab/init/redis] action create (up to date)
      * file[/opt/gitlab/sv/redis/down] action nothing (skipped due to action :nothing)
      * directory[/opt/gitlab/service] action create (up to date)
      * link[/opt/gitlab/service/redis] action create (up to date)
      * ruby_block[wait for redis service socket] action run (skipped due to not_if)
       (up to date)
    * ruby_block[warn pending redis restart] action run (skipped due to only_if)
     (up to date)
Recipe: redis::enable
  * template[/opt/gitlab/etc/gitlab-redis-cli-rc] action create (up to date)
Recipe: gitaly::enable
  * directory[/var/opt/gitlab/gitaly] action create (up to date)
  * directory[/var/log/gitlab/gitaly] action create (up to date)
  * directory[/var/opt/gitlab/gitaly/internal_sockets] action create (up to date)
  * env_dir[/opt/gitlab/etc/gitaly/env] action create
    * directory[/opt/gitlab/etc/gitaly/env] action create (up to date)
    * file[/opt/gitlab/etc/gitaly/env/HOME] action create (up to date)
    * file[/opt/gitlab/etc/gitaly/env/PATH] action create (up to date)
    * file[/opt/gitlab/etc/gitaly/env/TZ] action create (up to date)
    * file[/opt/gitlab/etc/gitaly/env/PYTHONPATH] action create (up to date)
    * file[/opt/gitlab/etc/gitaly/env/ICU_DATA] action create (up to date)
    * file[/opt/gitlab/etc/gitaly/env/SSL_CERT_DIR] action create (up to date)
    * file[/opt/gitlab/etc/gitaly/env/GITALY_PID_FILE] action create (up to date)
    * file[/opt/gitlab/etc/gitaly/env/WRAPPER_JSON_LOGGING] action create (up to date)
     (up to date)
  * template[Create Gitaly config.toml] action create (up to date)
  * service[gitaly] action nothing (skipped due to action :nothing)
  * runit_service[gitaly] action enable
    * ruby_block[restart_service] action nothing (skipped due to action :nothing)
    * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/sv/gitaly] action create (up to date)
    * template[/opt/gitlab/sv/gitaly/run] action create (up to date)
    * directory[/opt/gitlab/sv/gitaly/log] action create (up to date)
    * directory[/opt/gitlab/sv/gitaly/log/main] action create (up to date)
    * template[/opt/gitlab/sv/gitaly/log/config] action create (up to date)
    * ruby_block[verify_chown_persisted_on_gitaly] action nothing (skipped due to action :nothing)
    * link[/var/log/gitlab/gitaly/config] action create (up to date)
    * template[/opt/gitlab/sv/gitaly/log/run] action create (up to date)
    * directory[/opt/gitlab/sv/gitaly/env] action create (up to date)
    * ruby_block[Delete unmanaged env files for gitaly service] action run (skipped due to only_if)
    * template[/opt/gitlab/sv/gitaly/check] action create (skipped due to only_if)
    * template[/opt/gitlab/sv/gitaly/finish] action create (skipped due to only_if)
    * directory[/opt/gitlab/sv/gitaly/control] action create (up to date)
    * link[/opt/gitlab/init/gitaly] action create (up to date)
    * file[/opt/gitlab/sv/gitaly/down] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/service] action create (up to date)
    * link[/opt/gitlab/service/gitaly] action create (up to date)
    * ruby_block[wait for gitaly service socket] action run (skipped due to not_if)
     (up to date)
  * version_file[Create version file for Gitaly] action create
    * file[/var/opt/gitlab/gitaly/VERSION] action create (up to date)
     (up to date)
  * version_file[Create Ruby version file for Gitaly] action create
    * file[/var/opt/gitlab/gitaly/RUBY_VERSION] action create (up to date)
     (up to date)
  * consul_service[gitaly] action delete
    * file[/var/opt/gitlab/consul/config.d/gitaly-service.json] action delete (up to date)
     (up to date)
Recipe: postgresql::bin
  * ruby_block[check_postgresql_version] action run (skipped due to not_if)
  * ruby_block[check_postgresql_version_is_deprecated] action run (skipped due to not_if)
  * ruby_block[Link postgresql bin files to the correct version] action run (skipped due to only_if)
  * template[/opt/gitlab/etc/gitlab-psql-rc] action create (up to date)
Recipe: postgresql::user
  * account[Postgresql user and group] action create (up to date)
  * directory[/var/opt/gitlab/postgresql] action create (up to date)
  * file[/var/opt/gitlab/postgresql/.profile] action create (up to date)
Recipe: postgresql::sysctl
  * gitlab_sysctl[kernel.shmmax] action create
    * directory[create /etc/sysctl.d for kernel.shmmax] action create (skipped due to only_if)
    * file[create /opt/gitlab/embedded/etc/90-omnibus-gitlab-kernel.shmmax.conf kernel.shmmax] action create (skipped due to only_if)
    * link[/etc/sysctl.d/90-omnibus-gitlab-kernel.shmmax.conf] action create (skipped due to only_if)
    * execute[load sysctl conf kernel.shmmax] action nothing (skipped due to action :nothing)
     (up to date)
  * gitlab_sysctl[kernel.shmall] action create
    * directory[create /etc/sysctl.d for kernel.shmall] action create (skipped due to only_if)
    * file[create /opt/gitlab/embedded/etc/90-omnibus-gitlab-kernel.shmall.conf kernel.shmall] action create (skipped due to only_if)
    * link[/etc/sysctl.d/90-omnibus-gitlab-kernel.shmall.conf] action create (skipped due to only_if)
    * execute[load sysctl conf kernel.shmall] action nothing (skipped due to action :nothing)
     (up to date)
  * gitlab_sysctl[kernel.sem] action create
    * directory[create /etc/sysctl.d for kernel.sem] action create (skipped due to only_if)
    * file[create /opt/gitlab/embedded/etc/90-omnibus-gitlab-kernel.sem.conf kernel.sem] action create (skipped due to only_if)
    * link[/etc/sysctl.d/90-omnibus-gitlab-kernel.sem.conf] action create (skipped due to only_if)
    * execute[load sysctl conf kernel.sem] action nothing (skipped due to action :nothing)
     (up to date)
Recipe: postgresql::enable
  * directory[/var/opt/gitlab/postgresql] action create (up to date)
  * directory[/var/opt/gitlab/postgresql/data] action create (up to date)
  * directory[/var/log/gitlab/postgresql] action create (up to date)
  * directory[/var/opt/gitlab/postgresql/data] action create (up to date)
  * execute[/opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8] action run (skipped due to not_if)
  * file[/var/opt/gitlab/postgresql/data/server.crt] action create (up to date)
  * file[/var/opt/gitlab/postgresql/data/server.key] action create (up to date)
  * postgresql_config[gitlab] action create
    * template[/var/opt/gitlab/postgresql/data/postgresql.conf] action create (up to date)
    * template[/var/opt/gitlab/postgresql/data/runtime.conf] action create (up to date)
    * template[/var/opt/gitlab/postgresql/data/pg_hba.conf] action create (up to date)
    * template[/var/opt/gitlab/postgresql/data/pg_ident.conf] action create (up to date)
     (up to date)
Recipe: postgresql::standalone
  * service[postgresql] action nothing (skipped due to action :nothing)
  * runit_service[postgresql] action enable
    * ruby_block[restart_service] action nothing (skipped due to action :nothing)
    * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/sv/postgresql] action create (up to date)
    * template[/opt/gitlab/sv/postgresql/run] action create (up to date)
    * directory[/opt/gitlab/sv/postgresql/log] action create (up to date)
    * directory[/opt/gitlab/sv/postgresql/log/main] action create (up to date)
    * template[/opt/gitlab/sv/postgresql/log/config] action create (up to date)
    * ruby_block[verify_chown_persisted_on_postgresql] action nothing (skipped due to action :nothing)
    * link[/var/log/gitlab/postgresql/config] action create (up to date)
    * template[/opt/gitlab/sv/postgresql/log/run] action create (up to date)
    * directory[/opt/gitlab/sv/postgresql/env] action create (up to date)
    * ruby_block[Delete unmanaged env files for postgresql service] action run (skipped due to only_if)
    * template[/opt/gitlab/sv/postgresql/check] action create (skipped due to only_if)
    * template[/opt/gitlab/sv/postgresql/finish] action create (skipped due to only_if)
    * directory[/opt/gitlab/sv/postgresql/control] action create (up to date)
    * template[/opt/gitlab/sv/postgresql/control/t] action create (up to date)
    * link[/opt/gitlab/init/postgresql] action create (up to date)
    * file[/opt/gitlab/sv/postgresql/down] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/service] action create (up to date)
    * link[/opt/gitlab/service/postgresql] action create (up to date)
    * ruby_block[wait for postgresql service socket] action run (skipped due to not_if)
    * directory[/opt/gitlab/service/postgresql/supervise] action create (up to date)
    * directory[/opt/gitlab/service/postgresql/log/supervise] action create (up to date)
    * file[/opt/gitlab/service/postgresql/supervise/ok] action touch (skipped due to only_if)
    * file[/opt/gitlab/service/postgresql/log/supervise/ok] action touch (skipped due to only_if)
    * file[/opt/gitlab/service/postgresql/supervise/status] action touch (skipped due to only_if)
    * file[/opt/gitlab/service/postgresql/log/supervise/status] action touch
      - change owner from 'root' to 'gitlab-psql'
      - change group from 'root' to 'gitlab-psql'
      - update utime on file /opt/gitlab/service/postgresql/log/supervise/status
    * file[/opt/gitlab/service/postgresql/supervise/control] action touch (skipped due to only_if)
    * file[/opt/gitlab/service/postgresql/log/supervise/control] action touch (skipped due to only_if)

  * database_objects[postgresql] action create
    * postgresql_user[gitlab] action create
      * execute[create gitlab postgresql user] action run (skipped due to not_if)
       (up to date)
    * postgresql_user[gitlab_replicator] action create
      * execute[create gitlab_replicator postgresql user] action run (skipped due to not_if)
      * execute[set options for gitlab_replicator postgresql user] action run (skipped due to not_if)
       (up to date)
    * postgresql_database[gitlabhq_production] action create
      * execute[create database gitlabhq_production] action run (skipped due to not_if)
       (up to date)
    * postgresql_extension[pg_trgm] action enable
      * postgresql_query[enable pg_trgm extension] action run (skipped due to only_if)
       (up to date)
    * postgresql_extension[btree_gist] action enable
      * postgresql_query[enable btree_gist extension] action run (skipped due to only_if)
       (up to date)
     (up to date)
  * ruby_block[warn pending postgresql restart] action run (skipped due to only_if)
  * execute[reload postgresql] action nothing (skipped due to action :nothing)
  * execute[start postgresql] action nothing (skipped due to action :nothing)
Recipe: praefect::disable
  * service[praefect] action nothing (skipped due to action :nothing)
  * runit_service[praefect] action disable
    * ruby_block[disable praefect] action run (skipped due to only_if)
     (up to date)
  * consul_service[praefect] action delete
    * file[/var/opt/gitlab/consul/config.d/praefect-service.json] action delete (up to date)
     (up to date)
Recipe: gitlab-kas::disable
  * service[gitlab-kas] action nothing (skipped due to action :nothing)
  * runit_service[gitlab-kas] action disable
    * ruby_block[disable gitlab-kas] action run (skipped due to only_if)
     (up to date)
Recipe: gitlab::database_migrations
  * ruby_block[check remote PG version] action nothing (skipped due to action :nothing)
  * rails_migration[gitlab-rails] action run
    * bash[migrate gitlab-rails database] action run (skipped due to not_if)
     (up to date)
Recipe: crond::disable
  * service[crond] action nothing (skipped due to action :nothing)
  * runit_service[crond] action disable
    * ruby_block[disable crond] action run (skipped due to only_if)
     (up to date)
Recipe: gitlab::puma
  * directory[/var/log/gitlab/puma] action create (up to date)
  * directory[/opt/gitlab/var/puma] action create (up to date)
  * directory[/var/opt/gitlab/gitlab-rails/sockets] action create (up to date)
  * puma_config[/var/opt/gitlab/gitlab-rails/etc/puma.rb] action create
    * directory[/var/opt/gitlab/gitlab-rails/etc] action create (up to date)
    * template[/var/opt/gitlab/gitlab-rails/etc/puma.rb] action create (up to date)
     (up to date)
  * service[puma] action nothing (skipped due to action :nothing)
  * runit_service[puma] action enable
    * ruby_block[restart_service] action nothing (skipped due to action :nothing)
    * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/sv/puma] action create (up to date)
    * template[/opt/gitlab/sv/puma/run] action create (up to date)
    * directory[/opt/gitlab/sv/puma/log] action create (up to date)
    * directory[/opt/gitlab/sv/puma/log/main] action create (up to date)
    * template[/opt/gitlab/sv/puma/log/config] action create (up to date)
    * ruby_block[verify_chown_persisted_on_puma] action nothing (skipped due to action :nothing)
    * link[/var/log/gitlab/puma/config] action create (up to date)
    * template[/opt/gitlab/sv/puma/log/run] action create (up to date)
    * directory[/opt/gitlab/sv/puma/env] action create (up to date)
    * ruby_block[Delete unmanaged env files for puma service] action run (skipped due to only_if)
    * template[/opt/gitlab/sv/puma/check] action create (skipped due to only_if)
    * template[/opt/gitlab/sv/puma/finish] action create (skipped due to only_if)
    * directory[/opt/gitlab/sv/puma/control] action create (up to date)
    * template[/opt/gitlab/sv/puma/control/t] action create (up to date)
    * template[/opt/gitlab/sv/puma/control/h] action create (up to date)
    * link[/opt/gitlab/init/puma] action create (up to date)
    * file[/opt/gitlab/sv/puma/down] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/service] action create (up to date)
    * link[/opt/gitlab/service/puma] action create (up to date)
    * ruby_block[wait for puma service socket] action run (skipped due to not_if)
     (up to date)
  * consul_service[rails] action delete
    * file[/var/opt/gitlab/consul/config.d/rails-service.json] action delete (up to date)
     (up to date)
  * gitlab_sysctl[net.core.somaxconn] action create
    * directory[create /etc/sysctl.d for net.core.somaxconn] action create (skipped due to only_if)
    * file[create /opt/gitlab/embedded/etc/90-omnibus-gitlab-net.core.somaxconn.conf net.core.somaxconn] action create (skipped due to only_if)
    * link[/etc/sysctl.d/90-omnibus-gitlab-net.core.somaxconn.conf] action create (skipped due to only_if)
    * execute[load sysctl conf net.core.somaxconn] action nothing (skipped due to action :nothing)
     (up to date)
Recipe: gitlab::sidekiq
  * sidekiq_service[sidekiq] action enable
    * directory[/var/log/gitlab/sidekiq] action create (up to date)
  Recipe: <Dynamically Defined Resource>
    * service[sidekiq] action nothing (skipped due to action :nothing)
    * runit_service[sidekiq] action enable
      * ruby_block[restart_service] action nothing (skipped due to action :nothing)
      * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
      * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
      * directory[/opt/gitlab/sv/sidekiq] action create (up to date)
      * template[/opt/gitlab/sv/sidekiq/run] action create (up to date)
      * directory[/opt/gitlab/sv/sidekiq/log] action create (up to date)
      * directory[/opt/gitlab/sv/sidekiq/log/main] action create (up to date)
      * template[/opt/gitlab/sv/sidekiq/log/config] action create (up to date)
      * ruby_block[verify_chown_persisted_on_sidekiq] action nothing (skipped due to action :nothing)
      * link[/var/log/gitlab/sidekiq/config] action create (up to date)
      * template[/opt/gitlab/sv/sidekiq/log/run] action create (up to date)
      * directory[/opt/gitlab/sv/sidekiq/env] action create (up to date)
      * ruby_block[Delete unmanaged env files for sidekiq service] action run (skipped due to only_if)
      * template[/opt/gitlab/sv/sidekiq/check] action create (skipped due to only_if)
      * template[/opt/gitlab/sv/sidekiq/finish] action create (skipped due to only_if)
      * directory[/opt/gitlab/sv/sidekiq/control] action create (up to date)
      * link[/opt/gitlab/init/sidekiq] action create (up to date)
      * file[/opt/gitlab/sv/sidekiq/down] action nothing (skipped due to action :nothing)
      * directory[/opt/gitlab/service] action create (up to date)
      * link[/opt/gitlab/service/sidekiq] action create (up to date)
      * ruby_block[wait for sidekiq service socket] action run (skipped due to not_if)
       (up to date)
     (up to date)
Recipe: gitlab::sidekiq
  * consul_service[sidekiq] action delete
    * file[/var/opt/gitlab/consul/config.d/sidekiq-service.json] action delete (up to date)
     (up to date)
Recipe: gitlab::gitlab-workhorse
  * directory[/var/opt/gitlab/gitlab-workhorse] action create (up to date)
  * directory[/var/opt/gitlab/gitlab-workhorse/sockets] action create (up to date)
  * directory[/var/log/gitlab/gitlab-workhorse] action create (up to date)
  * directory[/opt/gitlab/etc/gitlab-workhorse] action create (up to date)
  * env_dir[/opt/gitlab/etc/gitlab-workhorse/env] action create
    * directory[/opt/gitlab/etc/gitlab-workhorse/env] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-workhorse/env/PATH] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-workhorse/env/HOME] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-workhorse/env/SSL_CERT_DIR] action create (up to date)
     (up to date)
  * service[gitlab-workhorse] action nothing (skipped due to action :nothing)
  * runit_service[gitlab-workhorse] action enable
    * ruby_block[restart_service] action nothing (skipped due to action :nothing)
    * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/sv/gitlab-workhorse] action create (up to date)
    * template[/opt/gitlab/sv/gitlab-workhorse/run] action create (up to date)
    * directory[/opt/gitlab/sv/gitlab-workhorse/log] action create (up to date)
    * directory[/opt/gitlab/sv/gitlab-workhorse/log/main] action create (up to date)
    * template[/opt/gitlab/sv/gitlab-workhorse/log/config] action create (up to date)
    * ruby_block[verify_chown_persisted_on_gitlab-workhorse] action nothing (skipped due to action :nothing)
    * link[/var/log/gitlab/gitlab-workhorse/config] action create (up to date)
    * template[/opt/gitlab/sv/gitlab-workhorse/log/run] action create (up to date)
    * directory[/opt/gitlab/sv/gitlab-workhorse/env] action create (up to date)
    * ruby_block[Delete unmanaged env files for gitlab-workhorse service] action run (skipped due to only_if)
    * template[/opt/gitlab/sv/gitlab-workhorse/check] action create (skipped due to only_if)
    * template[/opt/gitlab/sv/gitlab-workhorse/finish] action create (skipped due to only_if)
    * directory[/opt/gitlab/sv/gitlab-workhorse/control] action create (up to date)
    * link[/opt/gitlab/init/gitlab-workhorse] action create (up to date)
    * file[/opt/gitlab/sv/gitlab-workhorse/down] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/service] action create (up to date)
    * link[/opt/gitlab/service/gitlab-workhorse] action create (up to date)
    * ruby_block[wait for gitlab-workhorse service socket] action run (skipped due to not_if)
     (up to date)
  * consul_service[workhorse] action delete
    * file[/var/opt/gitlab/consul/config.d/workhorse-service.json] action delete (up to date)
     (up to date)
  * version_file[Create version file for Workhorse] action create
    * file[/var/opt/gitlab/gitlab-workhorse/VERSION] action create (up to date)
     (up to date)
  * template[/var/opt/gitlab/gitlab-workhorse/config.toml] action create (up to date)
Recipe: gitlab::mailroom_disable
  * service[mailroom] action nothing (skipped due to action :nothing)
  * runit_service[mailroom] action disable
    * ruby_block[disable mailroom] action run (skipped due to only_if)
     (up to date)
Recipe: gitlab::nginx
  * directory[/var/opt/gitlab/nginx] action create (up to date)
  * directory[/var/opt/gitlab/nginx/conf] action create (up to date)
  * directory[/var/log/gitlab/nginx] action create (up to date)
  * link[/var/opt/gitlab/nginx/logs] action create (up to date)
  * template[/var/opt/gitlab/nginx/conf/gitlab-http.conf] action create
    - update content in file /var/opt/gitlab/nginx/conf/gitlab-http.conf from 5f9ca6 to 520d57
    --- /var/opt/gitlab/nginx/conf/gitlab-http.conf     2022-03-17 09:49:27.820383409 +0800
    +++ /var/opt/gitlab/nginx/conf/.chef-gitlab-http20220317-5960-1fkyj3x.conf  2022-03-17 10:33:11.017135694 +0800
    @@ -32,10 +32,10 @@


     server {
    -  listen *:80;
    +  listen *:8000;


    -  server_name da9824e0ef9d;
    +  server_name 192.168.56.108;
       server_tokens off; ## Don't show the nginx version number, a security best practice

       ## Increase this if you want to upload large attachments
    @@ -60,7 +60,7 @@
       error_log   /var/log/gitlab/nginx/gitlab_error.log error;

       if ($http_host = "") {
    -    set $http_host_with_default "da9824e0ef9d";
    +    set $http_host_with_default "192.168.56.108:8000";
       }

       if ($http_host != "") {
  * template[/var/opt/gitlab/nginx/conf/gitlab-smartcard-http.conf] action delete (up to date)
  * template[/var/opt/gitlab/nginx/conf/gitlab-health.conf] action create (up to date)
  * template[/var/opt/gitlab/nginx/conf/gitlab-pages.conf] action delete (up to date)
  * template[/var/opt/gitlab/nginx/conf/gitlab-registry.conf] action delete (up to date)
  * template[/var/opt/gitlab/nginx/conf/gitlab-mattermost-http.conf] action delete (up to date)
  * template[/var/opt/gitlab/nginx/conf/nginx-status.conf] action create (up to date)
  * consul_service[nginx] action delete
    * file[/var/opt/gitlab/consul/config.d/nginx-service.json] action delete (up to date)
     (up to date)
  * template[/var/opt/gitlab/nginx/conf/nginx.conf] action create (up to date)
Recipe: nginx::enable
  * service[nginx] action nothing (skipped due to action :nothing)
  * runit_service[nginx] action enable
    * ruby_block[restart_service] action nothing (skipped due to action :nothing)
    * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/sv/nginx] action create (up to date)
    * template[/opt/gitlab/sv/nginx/run] action create (up to date)
    * directory[/opt/gitlab/sv/nginx/log] action create (up to date)
    * directory[/opt/gitlab/sv/nginx/log/main] action create (up to date)
    * template[/opt/gitlab/sv/nginx/log/config] action create (up to date)
    * ruby_block[verify_chown_persisted_on_nginx] action nothing (skipped due to action :nothing)
    * link[/var/log/gitlab/nginx/config] action create (up to date)
    * template[/opt/gitlab/sv/nginx/log/run] action create (up to date)
    * directory[/opt/gitlab/sv/nginx/env] action create (up to date)
    * ruby_block[Delete unmanaged env files for nginx service] action run (skipped due to only_if)
    * template[/opt/gitlab/sv/nginx/check] action create (skipped due to only_if)
    * template[/opt/gitlab/sv/nginx/finish] action create (skipped due to only_if)
    * directory[/opt/gitlab/sv/nginx/control] action create (up to date)
    * link[/opt/gitlab/init/nginx] action create (up to date)
    * file[/opt/gitlab/sv/nginx/down] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/service] action create (up to date)
    * link[/opt/gitlab/service/nginx] action create (up to date)
    * ruby_block[wait for nginx service socket] action run (skipped due to not_if)
     (up to date)
  * execute[reload nginx] action nothing (skipped due to action :nothing)
Recipe: gitlab::remote-syslog_disable
  * service[remote-syslog] action nothing (skipped due to action :nothing)
  * runit_service[remote-syslog] action disable
    * ruby_block[disable remote-syslog] action run (skipped due to only_if)
     (up to date)
Recipe: gitlab::storage-check_disable
  * service[storage-check] action nothing (skipped due to action :nothing)
  * runit_service[storage-check] action disable
    * ruby_block[disable storage-check] action run (skipped due to only_if)
     (up to date)
Recipe: gitlab-pages::disable
  * service[gitlab-pages] action nothing (skipped due to action :nothing)
  * runit_service[gitlab-pages] action disable
    * ruby_block[disable gitlab-pages] action run (skipped due to only_if)
     (up to date)
Recipe: registry::disable
  * service[registry] action nothing (skipped due to action :nothing)
  * runit_service[registry] action disable
    * ruby_block[disable registry] action run (skipped due to only_if)
     (up to date)
Recipe: mattermost::disable
  * service[mattermost] action nothing (skipped due to action :nothing)
  * runit_service[mattermost] action disable
    * ruby_block[disable mattermost] action run (skipped due to only_if)
     (up to date)
Recipe: letsencrypt::disable
  * crond_job[letsencrypt-renew] action delete
    * file[/var/opt/gitlab/crond/letsencrypt-renew] action delete (up to date)
     (up to date)
Recipe: gitlab::gitlab-healthcheck
  * template[/opt/gitlab/etc/gitlab-healthcheck-rc] action create
    - update content in file /opt/gitlab/etc/gitlab-healthcheck-rc from 6da55f to 03b0c6
    --- /opt/gitlab/etc/gitlab-healthcheck-rc   2022-03-17 09:49:37.395576626 +0800
    +++ /opt/gitlab/etc/.chef-gitlab-healthcheck-rc20220317-5960-1uthlo2        2022-03-17 10:33:11.323042711 +0800
    @@ -1,3 +1,3 @@
    -url='http://localhost:80/help'
    +url='http://localhost:8000/help'
     flags='--insecure'
Recipe: monitoring::node-exporter_disable
  * service[node-exporter] action nothing (skipped due to action :nothing)
  * runit_service[node-exporter] action disable
    * ruby_block[disable node-exporter] action run (skipped due to only_if)
     (up to date)
  * consul_service[node-exporter] action delete
    * file[/var/opt/gitlab/consul/config.d/node-exporter-service.json] action delete (up to date)
     (up to date)
Recipe: monitoring::gitlab-exporter
  * directory[/var/opt/gitlab/gitlab-exporter] action create (up to date)
  * directory[/var/log/gitlab/gitlab-exporter] action create (up to date)
  * env_dir[/opt/gitlab/etc/gitlab-exporter/env] action create
    * directory[/opt/gitlab/etc/gitlab-exporter/env] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-exporter/env/LD_PRELOAD] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-exporter/env/MALLOC_CONF] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-exporter/env/RUBY_GC_HEAP_INIT_SLOTS] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-exporter/env/RUBY_GC_HEAP_FREE_SLOTS_MIN_RATIO] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-exporter/env/RUBY_GC_HEAP_FREE_SLOTS_MAX_RATIO] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-exporter/env/SSL_CERT_DIR] action create (up to date)
    * file[/opt/gitlab/etc/gitlab-exporter/env/SSL_CERT_FILE] action create (up to date)
     (up to date)
  * template[/var/opt/gitlab/gitlab-exporter/gitlab-exporter.yml] action create (up to date)
  * version_file[Create version file for GitLab-Exporter] action create
    * file[/var/opt/gitlab/gitlab-exporter/RUBY_VERSION] action create (up to date)
     (up to date)
  * service[gitlab-exporter] action nothing (skipped due to action :nothing)
  * runit_service[gitlab-exporter] action enable
    * ruby_block[restart_service] action nothing (skipped due to action :nothing)
    * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/sv/gitlab-exporter] action create (up to date)
    * template[/opt/gitlab/sv/gitlab-exporter/run] action create (up to date)
    * directory[/opt/gitlab/sv/gitlab-exporter/log] action create (up to date)
    * directory[/opt/gitlab/sv/gitlab-exporter/log/main] action create (up to date)
    * template[/opt/gitlab/sv/gitlab-exporter/log/config] action create (up to date)
    * ruby_block[verify_chown_persisted_on_gitlab-exporter] action nothing (skipped due to action :nothing)
    * link[/var/log/gitlab/gitlab-exporter/config] action create (up to date)
    * template[/opt/gitlab/sv/gitlab-exporter/log/run] action create (up to date)
    * directory[/opt/gitlab/sv/gitlab-exporter/env] action create (up to date)
    * ruby_block[Delete unmanaged env files for gitlab-exporter service] action run (skipped due to only_if)
    * template[/opt/gitlab/sv/gitlab-exporter/check] action create (skipped due to only_if)
    * template[/opt/gitlab/sv/gitlab-exporter/finish] action create (skipped due to only_if)
    * directory[/opt/gitlab/sv/gitlab-exporter/control] action create (up to date)
    * link[/opt/gitlab/init/gitlab-exporter] action create (up to date)
    * file[/opt/gitlab/sv/gitlab-exporter/down] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/service] action create (up to date)
    * link[/opt/gitlab/service/gitlab-exporter] action create (up to date)
    * ruby_block[wait for gitlab-exporter service socket] action run (skipped due to not_if)
     (up to date)
  * consul_service[gitlab-exporter] action delete
    * file[/var/opt/gitlab/consul/config.d/gitlab-exporter-service.json] action delete (up to date)
     (up to date)
Recipe: monitoring::redis-exporter
  * directory[/var/log/gitlab/redis-exporter] action create (up to date)
  * directory[/opt/gitlab/etc/redis-exporter/env] action create (up to date)
  * env_dir[/opt/gitlab/etc/redis-exporter/env] action create
    * directory[/opt/gitlab/etc/redis-exporter/env] action create (up to date)
    * file[/opt/gitlab/etc/redis-exporter/env/SSL_CERT_DIR] action create (up to date)
     (up to date)
  * service[redis-exporter] action nothing (skipped due to action :nothing)
  * runit_service[redis-exporter] action enable
    * ruby_block[restart_service] action nothing (skipped due to action :nothing)
    * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/sv/redis-exporter] action create (up to date)
    * template[/opt/gitlab/sv/redis-exporter/run] action create (up to date)
    * directory[/opt/gitlab/sv/redis-exporter/log] action create (up to date)
    * directory[/opt/gitlab/sv/redis-exporter/log/main] action create (up to date)
    * template[/opt/gitlab/sv/redis-exporter/log/config] action create (up to date)
    * ruby_block[verify_chown_persisted_on_redis-exporter] action nothing (skipped due to action :nothing)
    * link[/var/log/gitlab/redis-exporter/config] action create (up to date)
    * template[/opt/gitlab/sv/redis-exporter/log/run] action create (up to date)
    * directory[/opt/gitlab/sv/redis-exporter/env] action create (up to date)
    * ruby_block[Delete unmanaged env files for redis-exporter service] action run (skipped due to only_if)
    * template[/opt/gitlab/sv/redis-exporter/check] action create (skipped due to only_if)
    * template[/opt/gitlab/sv/redis-exporter/finish] action create (skipped due to only_if)
    * directory[/opt/gitlab/sv/redis-exporter/control] action create (up to date)
    * link[/opt/gitlab/init/redis-exporter] action create (up to date)
    * file[/opt/gitlab/sv/redis-exporter/down] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/service] action create (up to date)
    * link[/opt/gitlab/service/redis-exporter] action create (up to date)
    * ruby_block[wait for redis-exporter service socket] action run (skipped due to not_if)
     (up to date)
  * consul_service[redis-exporter] action delete
    * file[/var/opt/gitlab/consul/config.d/redis-exporter-service.json] action delete (up to date)
     (up to date)
Recipe: monitoring::user
  * account[Prometheus user and group] action create (up to date)
Recipe: monitoring::prometheus
  * directory[/var/opt/gitlab/prometheus] action create (up to date)
  * directory[/var/opt/gitlab/prometheus/rules] action create (up to date)
  * directory[/var/log/gitlab/prometheus] action create (up to date)
  * directory[/opt/gitlab/etc/prometheus/env] action create (up to date)
  * env_dir[/opt/gitlab/etc/prometheus/env] action create
    * directory[/opt/gitlab/etc/prometheus/env] action create (up to date)
    * file[/opt/gitlab/etc/prometheus/env/SSL_CERT_DIR] action create (up to date)
     (up to date)
  * execute[reload prometheus] action nothing (skipped due to action :nothing)
  * file[Prometheus config] action create (up to date)
  * service[prometheus] action nothing (skipped due to action :nothing)
  * runit_service[prometheus] action enable
    * ruby_block[restart_service] action nothing (skipped due to action :nothing)
    * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/sv/prometheus] action create (up to date)
    * template[/opt/gitlab/sv/prometheus/run] action create (up to date)
    * directory[/opt/gitlab/sv/prometheus/log] action create (up to date)
    * directory[/opt/gitlab/sv/prometheus/log/main] action create (up to date)
    * template[/opt/gitlab/sv/prometheus/log/config] action create (up to date)
    * ruby_block[verify_chown_persisted_on_prometheus] action nothing (skipped due to action :nothing)
    * link[/var/log/gitlab/prometheus/config] action create (up to date)
    * template[/opt/gitlab/sv/prometheus/log/run] action create (up to date)
    * directory[/opt/gitlab/sv/prometheus/env] action create (up to date)
    * ruby_block[Delete unmanaged env files for prometheus service] action run (skipped due to only_if)
    * template[/opt/gitlab/sv/prometheus/check] action create (skipped due to only_if)
    * template[/opt/gitlab/sv/prometheus/finish] action create (skipped due to only_if)
    * directory[/opt/gitlab/sv/prometheus/control] action create (up to date)
    * link[/opt/gitlab/init/prometheus] action create (up to date)
    * file[/opt/gitlab/sv/prometheus/down] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/service] action create (up to date)
    * link[/opt/gitlab/service/prometheus] action create (up to date)
    * ruby_block[wait for prometheus service socket] action run (skipped due to not_if)
     (up to date)
  * consul_service[prometheus] action delete
    * file[/var/opt/gitlab/consul/config.d/prometheus-service.json] action delete (up to date)
     (up to date)
  * template[/var/opt/gitlab/prometheus/rules/gitlab.rules] action create (up to date)
  * template[/var/opt/gitlab/prometheus/rules/node.rules] action create (up to date)
Recipe: monitoring::alertmanager
  * directory[/var/opt/gitlab/alertmanager] action create (up to date)
  * directory[/var/log/gitlab/alertmanager] action create (up to date)
  * directory[/opt/gitlab/etc/alertmanager/env] action create (up to date)
  * env_dir[/opt/gitlab/etc/alertmanager/env] action create
    * directory[/opt/gitlab/etc/alertmanager/env] action create (up to date)
    * file[/opt/gitlab/etc/alertmanager/env/SSL_CERT_DIR] action create (up to date)
     (up to date)
  * file[Alertmanager config] action create (up to date)
  * service[alertmanager] action nothing (skipped due to action :nothing)
  * runit_service[alertmanager] action enable
    * ruby_block[restart_service] action nothing (skipped due to action :nothing)
    * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/sv/alertmanager] action create (up to date)
    * template[/opt/gitlab/sv/alertmanager/run] action create (up to date)
    * directory[/opt/gitlab/sv/alertmanager/log] action create (up to date)
    * directory[/opt/gitlab/sv/alertmanager/log/main] action create (up to date)
    * template[/opt/gitlab/sv/alertmanager/log/config] action create (up to date)
    * ruby_block[verify_chown_persisted_on_alertmanager] action nothing (skipped due to action :nothing)
    * link[/var/log/gitlab/alertmanager/config] action create (up to date)
    * template[/opt/gitlab/sv/alertmanager/log/run] action create (up to date)
    * directory[/opt/gitlab/sv/alertmanager/env] action create (up to date)
    * ruby_block[Delete unmanaged env files for alertmanager service] action run (skipped due to only_if)
    * template[/opt/gitlab/sv/alertmanager/check] action create (skipped due to only_if)
    * template[/opt/gitlab/sv/alertmanager/finish] action create (skipped due to only_if)
    * directory[/opt/gitlab/sv/alertmanager/control] action create (up to date)
    * link[/opt/gitlab/init/alertmanager] action create (up to date)
    * file[/opt/gitlab/sv/alertmanager/down] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/service] action create (up to date)
    * link[/opt/gitlab/service/alertmanager] action create (up to date)
    * ruby_block[wait for alertmanager service socket] action run (skipped due to not_if)
     (up to date)
Recipe: monitoring::postgres-exporter
  * directory[/var/log/gitlab/postgres-exporter] action create (up to date)
  * directory[/var/opt/gitlab/postgres-exporter] action create (up to date)
  * env_dir[/opt/gitlab/etc/postgres-exporter/env] action create
    * directory[/opt/gitlab/etc/postgres-exporter/env] action create (up to date)
    * file[/opt/gitlab/etc/postgres-exporter/env/SSL_CERT_DIR] action create (up to date)
    * file[/opt/gitlab/etc/postgres-exporter/env/DATA_SOURCE_NAME] action create (up to date)
     (up to date)
  * service[postgres-exporter] action nothing (skipped due to action :nothing)
  * runit_service[postgres-exporter] action enable
    * ruby_block[restart_service] action nothing (skipped due to action :nothing)
    * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/sv/postgres-exporter] action create (up to date)
    * template[/opt/gitlab/sv/postgres-exporter/run] action create (up to date)
    * directory[/opt/gitlab/sv/postgres-exporter/log] action create (up to date)
    * directory[/opt/gitlab/sv/postgres-exporter/log/main] action create (up to date)
    * template[/opt/gitlab/sv/postgres-exporter/log/config] action create (up to date)
    * ruby_block[verify_chown_persisted_on_postgres-exporter] action nothing (skipped due to action :nothing)
    * link[/var/log/gitlab/postgres-exporter/config] action create (up to date)
    * template[/opt/gitlab/sv/postgres-exporter/log/run] action create (up to date)
    * directory[/opt/gitlab/sv/postgres-exporter/env] action create (up to date)
    * ruby_block[Delete unmanaged env files for postgres-exporter service] action run (skipped due to only_if)
    * template[/opt/gitlab/sv/postgres-exporter/check] action create (skipped due to only_if)
    * template[/opt/gitlab/sv/postgres-exporter/finish] action create (skipped due to only_if)
    * directory[/opt/gitlab/sv/postgres-exporter/control] action create (up to date)
    * link[/opt/gitlab/init/postgres-exporter] action create (up to date)
    * file[/opt/gitlab/sv/postgres-exporter/down] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/service] action create (up to date)
    * link[/opt/gitlab/service/postgres-exporter] action create (up to date)
    * ruby_block[wait for postgres-exporter service socket] action run (skipped due to not_if)
     (up to date)
  * template[/var/opt/gitlab/postgres-exporter/queries.yaml] action create (up to date)
  * consul_service[postgres-exporter] action delete
    * file[/var/opt/gitlab/consul/config.d/postgres-exporter-service.json] action delete (up to date)
     (up to date)
Recipe: monitoring::grafana
  * directory[/var/log/gitlab/grafana] action create (up to date)
  * directory[/var/opt/gitlab/grafana] action create (up to date)
  * directory[/var/opt/gitlab/grafana/provisioning] action create (up to date)
  * directory[/var/opt/gitlab/grafana/provisioning/dashboards] action create (up to date)
  * directory[/var/opt/gitlab/grafana/provisioning/datasources] action create (up to date)
  * directory[/var/opt/gitlab/grafana/provisioning/notifiers] action create (up to date)
  * file[/var/opt/gitlab/grafana/CVE_reset_status] action delete (up to date)
  * link[/var/opt/gitlab/grafana/conf] action create (up to date)
  * link[/var/opt/gitlab/grafana/public] action create (up to date)
  * directory[/opt/gitlab/etc/grafana/env] action create (up to date)
  * ruby_block[populate Grafana configuration options] action run
    - execute the ruby block populate Grafana configuration options
  * env_dir[/opt/gitlab/etc/grafana/env] action create
    * directory[/opt/gitlab/etc/grafana/env] action create (up to date)
    * file[/opt/gitlab/etc/grafana/env/SSL_CERT_DIR] action create (up to date)
     (up to date)
  * template[/var/opt/gitlab/grafana/grafana.ini] action create
    - update content in file /var/opt/gitlab/grafana/grafana.ini from b012da to d320d8
    --- /var/opt/gitlab/grafana/grafana.ini     2022-03-17 09:51:25.070523396 +0800
    +++ /var/opt/gitlab/grafana/.chef-grafana20220317-5960-14gou95.ini  2022-03-17 10:33:12.634644042 +0800
    @@ -46,7 +46,7 @@

     # The full public facing url you use in browser, used for redirects and emails
     # If you use reverse proxy and sub path specify full url (with sub path)
    -root_url = http://da9824e0ef9d/-/grafana
    +root_url = http://192.168.56.108:8000/-/grafana

     # Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons.
     serve_from_sub_path = true
    @@ -250,9 +250,9 @@
     client_id = 6c9d94fdf4f6148325ccf3ba0883309c82d7209dcdd3ee182274229e4fd0fbf7
     client_secret = dd78db3fbdbe58735e5bdee9f6f3bfbd52867812c1212ace5612197f230561f7
     scopes = read_user
    -auth_url = http://da9824e0ef9d/oauth/authorize
    -token_url = http://da9824e0ef9d/oauth/token
    -api_url = http://da9824e0ef9d/api/v4
    +auth_url = http://192.168.56.108:8000/oauth/authorize
    +token_url = http://192.168.56.108:8000/oauth/token
    +api_url = http://192.168.56.108:8000/api/v4
     allowed_groups =

     #################################### Auth Proxy ##########################
  * file[/var/opt/gitlab/grafana/provisioning/dashboards/gitlab_dashboards.yml] action create (up to date)
  * file[/var/opt/gitlab/grafana/provisioning/datasources/gitlab_datasources.yml] action create (up to date)
  * service[grafana] action nothing (skipped due to action :nothing)
  * runit_service[grafana] action enable
    * ruby_block[restart_service] action nothing (skipped due to action :nothing)
    * ruby_block[restart_log_service] action nothing (skipped due to action :nothing)
    * ruby_block[reload_log_service] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/sv/grafana] action create (up to date)
    * template[/opt/gitlab/sv/grafana/run] action create (up to date)
    * directory[/opt/gitlab/sv/grafana/log] action create (up to date)
    * directory[/opt/gitlab/sv/grafana/log/main] action create (up to date)
    * template[/opt/gitlab/sv/grafana/log/config] action create (up to date)
    * ruby_block[verify_chown_persisted_on_grafana] action nothing (skipped due to action :nothing)
    * link[/var/log/gitlab/grafana/config] action create (up to date)
    * template[/opt/gitlab/sv/grafana/log/run] action create (up to date)
    * directory[/opt/gitlab/sv/grafana/env] action create (up to date)
    * ruby_block[Delete unmanaged env files for grafana service] action run (skipped due to only_if)
    * template[/opt/gitlab/sv/grafana/check] action create (skipped due to only_if)
    * template[/opt/gitlab/sv/grafana/finish] action create (skipped due to only_if)
    * directory[/opt/gitlab/sv/grafana/control] action create (up to date)
    * link[/opt/gitlab/init/grafana] action create (up to date)
    * file[/opt/gitlab/sv/grafana/down] action nothing (skipped due to action :nothing)
    * directory[/opt/gitlab/service] action create (up to date)
    * link[/opt/gitlab/service/grafana] action create (up to date)
    * ruby_block[wait for grafana service socket] action run (skipped due to not_if)
     (up to date)
Recipe: gitlab::database_reindexing_disable
  * crond_job[database-reindexing] action delete
    * file[/var/opt/gitlab/crond/database-reindexing] action delete (up to date)
     (up to date)
Recipe: gitlab::puma
  * runit_service[puma] action restart (up to date)
Recipe: gitlab::sidekiq
  * sidekiq_service[sidekiq] action restart
  Recipe: <Dynamically Defined Resource>
    * service[sidekiq] action nothing (skipped due to action :nothing)
    * runit_service[sidekiq] action restart (up to date)
     (up to date)
Recipe: gitlab::gitlab-rails
  * execute[clear the gitlab-rails cache] action run
    - execute /opt/gitlab/bin/gitlab-rake cache:clear
Recipe: nginx::enable
  * runit_service[nginx] action restart (up to date)
Recipe: monitoring::grafana
  * runit_service[grafana] action restart (up to date)

Running handlers:
Running handlers complete
Chef Infra Client finished, 10/739 resources updated in 01 minutes 13 seconds
gitlab Reconfigured!
root@da9824e0ef9d:/#
root@da9824e0ef9d:/#
root@da9824e0ef9d:/# gitlab-ctl restart
ok: run: alertmanager: (pid 6768) 1s
ok: run: gitaly: (pid 6778) 0s
ok: run: gitlab-exporter: (pid 6795) 0s
ok: run: gitlab-workhorse: (pid 6801) 1s
ok: run: grafana: (pid 6811) 0s
ok: run: logrotate: (pid 6821) 1s
ok: run: nginx: (pid 6829) 0s
ok: run: postgres-exporter: (pid 6837) 0s
ok: run: postgresql: (pid 6846) 0s
ok: run: prometheus: (pid 6859) 0s
ok: run: puma: (pid 6872) 0s
ok: run: redis: (pid 6879) 1s
ok: run: redis-exporter: (pid 6891) 0s
ok: run: sidekiq: (pid 6978) 0s
ok: run: sshd: (pid 6984) 1s
root@da9824e0ef9d:/#
root@da9824e0ef9d:/#

查看版本

在容器内执行:

gitlab-rake gitlab:env:info

root@da9824e0ef9d:/# gitlab-rake gitlab:env:info

System information
System:
Current User:   git
Using RVM:      no
Ruby Version:   2.7.5p203
Gem Version:    3.1.4
Bundler Version:2.1.4
Rake Version:   13.0.6
Redis Version:  6.0.16
Git Version:    2.33.1.
Sidekiq Version:6.3.1
Go Version:     unknown

GitLab information
Version:        14.7.3
Revision:       293f6bb322b
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     12.7
URL:            http://192.168.56.108:8000
HTTP Clone URL: http://192.168.56.108:8000/some-group/some-project.git
SSH Clone URL:  git@192.168.56.108:some-group/some-project.git
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers:

GitLab Shell
Version:        13.22.2
Repository storage paths:
- default:      /var/opt/gitlab/git-data/repositories
GitLab Shell path:              /opt/gitlab/embedded/service/gitlab-shell
Git:            /opt/gitlab/embedded/bin/git
root@da9824e0ef9d:/#

初次登录

第一次登录,需要查看root密码(在容器内执行):

cat /etc/gitlab/initial_root_password

[root@localhost ~]# docker exec -it gitlab /bin/bash
root@04c254b56c2d:/#
root@04c254b56c2d:/# 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: FUk6bfvLnUGrXznru9blzHULlgqpFGtPDakOvwDequ0=

# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.
root@04c254b56c2d:/#

修改密码

登录后修改密码:

关闭注册

gitlab安装后,默认是开放注册的,我们需要关闭注册:

重置密码

修改密码后,忘了密码呢。进入容器,重置 root 账户密码为 12345678 :

[root@localhost ~]# docker exec -it gitlab /bin/bash
root@da9824e0ef9d:/#
root@da9824e0ef9d:/# gitlab-rails console -e production
--------------------------------------------------------------------------------
 Ruby:         ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
 GitLab:       14.7.3 (293f6bb322b) FOSS
 GitLab Shell: 13.22.2
 PostgreSQL:   12.7
--------------------------------------------------------------------------------
Loading production environment (Rails 6.1.4.4)
irb(main):001:0> user = User.where(id: 1).first
=> #<User id:1 @root>
irb(main):002:0> user.password="12345678"
=> "12345678"
irb(main):003:0> user.password_confirmation="12345678"
=> "12345678"
irb(main):004:0> user.save!
=> true
irb(main):005:0>
irb(main):006:0> quit
root@da9824e0ef9d:/#
root@da9824e0ef9d:/#

然后,在页面登录。

新建项目

在gitlab的web页面,点击按钮 new project 新建一个项目。

权限说明

Guest(匿名用户) - 创建项目、写留言薄

Reporter(报告人)- 创建项目、写留言薄、拉项目、下载项目、创建代码片段

Developer(开发者)- 创建项目、写留言薄、拉项目、下载项目、创建代码片段、创建合并请求、创建新分支、 推送不受保护的分支、移除不受保护的分支 、创建标签、编写wiki

Master(管理者)- 创建项目、写留言薄、拉项目、下载项目、创建代码片段、创建合并请求、创建新分支、 推送不受保护的分支、移除不受保护的分支 、创建标签、编写wiki、增加团队成员、推送受保护的分支、 移除受保护的分支、编辑项目、添加部署密钥、配置项目钩子

Owner(所有者)- 创建项目、写留言薄、拉项目、下载项目、创建代码片段、创建合并请求、创建新分支、 推送不受保护的分支、移除不受保护的分支 、创建标签、编写wiki、增加团队成员、推送受保护的分支、 移除受保护的分支、编辑项目、添加部署密钥、配置项目钩子、开关公有模式、将项目转移到另一个名称空间、删除项目

Jenkins安装

搜索镜像

我们可以在 DockerHub 搜索,也可以在命令行搜索:

docker search jenkins

[root@localhost ~]# docker search jenkins
INDEX       NAME                                          DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
docker.io   docker.io/jenkins/jenkins                     The leading open source automation server       2917
docker.io   docker.io/jenkinsci/jenkins                   Jenkins Continuous Integration and Deliver...   396
docker.io   docker.io/jenkins/jnlp-slave                  a Jenkins agent which can connect to Jenki...   150                  [OK]
docker.io   docker.io/jenkinsci/jnlp-slave                A Jenkins slave using JNLP to establish co...   135                  [OK]
docker.io   docker.io/jenkins/inbound-agent                                                               59
docker.io   docker.io/bitnami/jenkins                     Bitnami Docker Image for Jenkins                48                   [OK]
docker.io   docker.io/jenkins/slave                       base image for a Jenkins Agent, which incl...   48                   [OK]
docker.io   docker.io/jenkins/jnlp-agent-maven            A JNLP-based agent with Maven 3 built in        7
docker.io   docker.io/ibmcom/jenkins-ppc64le              Jenkins docker image                            1
docker.io   docker.io/rancher/jenkins-master              Jenkins Server                                  1                    [OK]
docker.io   docker.io/rancher/jenkins-plugins                                                             1
docker.io   docker.io/rancher/jenkins-plugins-docker                                                      1
docker.io   docker.io/rancher/jenkins-swarm                                                               1
docker.io   docker.io/bitnami/jenkins-exporter                                                            0
docker.io   docker.io/ibmcom/jenkins                                                                      0
docker.io   docker.io/ibmcom/jenkins-jnlp-slave-ppc64le                                                   0
docker.io   docker.io/ibmcom/jenkins-jnlp-slave-s390x     Docker image for jenkins-jnlp-slave-s390x       0
docker.io   docker.io/ibmcom/jenkins-slave-ppc64le                                                        0
docker.io   docker.io/ibmcom/mb-jenkins                   This Jenkins image provides the 'pipeline'...   0
docker.io   docker.io/jenkins                             DEPRECATED; use "jenkins/jenkins:lts" instead   0         [OK]
docker.io   docker.io/mirantis/jenkins                                                                    0
docker.io   docker.io/rancher/jenkins-boot                                                                0
docker.io   docker.io/rancher/jenkins-jenkins                                                             0
docker.io   docker.io/rancher/jenkins-jnlp-slave                                                          0
docker.io   docker.io/rancher/jenkins-slave               Jenkins Build Slave                             0                    [OK]
[root@localhost ~]#

拉取镜像

docker pull jenkins/jenkins:lts

[root@localhost ~]# docker pull jenkins/jenkins:lts
Trying to pull repository docker.io/jenkins/jenkins ...
lts: Pulling from docker.io/jenkins/jenkins
0c6b8ff8c37e: Pull complete
3c52355f050d: Pull complete
b8b22a312d16: Pull complete
c826675c3b0b: Pull complete
3e21f2d548cc: Pull complete
24e8ce668564: Pull complete
daf736980d12: Pull complete
c125770c5921: Pull complete
f7b342b69aa6: Pull complete
4bec9b5fb343: Pull complete
a137fe02623d: Pull complete
9a7a2ceccd83: Pull complete
d557307d04e3: Pull complete
5892f12e3ade: Waiting
730f100cd71d: Download complete
f7af472115e7: Download complete
398e94ad3df8: Download complete
5892f12e3ade: Pull complete
730f100cd71d: Pull complete
f7af472115e7: Pull complete
398e94ad3df8: Pull complete
Digest: sha256:c9cc19190b123077b434dd9c77b7252c3c58c3dc1add149fa9f6e2fb490526e9
Status: Downloaded newer image for docker.io/jenkins/jenkins:lts
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# docker images
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
docker.io/gitlab/gitlab-ce   latest              6f6c9f0dd251        9 days ago          2.39 GB
docker.io/jenkins/jenkins    lts                 306e80c103c6        2 weeks ago         441 MB
docker.io/registry           latest              9c97225e83c8        2 weeks ago         24.2 MB
docker.io/nginx              latest              c316d5a335a5        4 weeks ago         142 MB
docker.io/php                7.1.30-fpm          0b13895891aa        2 years ago         391 MB
[root@localhost ~]#
[root@localhost ~]# docker pull jenkins/jenkins:lts
Trying to pull repository docker.io/jenkins/jenkins ...
lts: Pulling from docker.io/jenkins/jenkins
Digest: sha256:c9cc19190b123077b434dd9c77b7252c3c58c3dc1add149fa9f6e2fb490526e9
Status: Image is up to date for docker.io/jenkins/jenkins:lts
[root@localhost ~]#
[root@localhost ~]# docker images
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
docker.io/gitlab/gitlab-ce   latest              6f6c9f0dd251        9 days ago          2.39 GB
docker.io/jenkins/jenkins    lts                 306e80c103c6        2 weeks ago         441 MB
docker.io/registry           latest              9c97225e83c8        2 weeks ago         24.2 MB
docker.io/nginx              latest              c316d5a335a5        4 weeks ago         142 MB
docker.io/php                7.1.30-fpm          0b13895891aa        2 years ago         391 MB
[root@localhost ~]#

创建容器

docker run --name jenkins -p 8080:8080 \
-v /usr/bin/docker:/usr/bin/docker \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /home/jenkins_home:/var/jenkins_home \
--privileged=true -d jenkins/jenkins:lts

第一行:将镜像容器以后台方式运行并命名为jenkins,并对外开放8080端口映射到jenkins内部的8080端口

第二行:将宿主机上面的docker命令行挂载到容器上面,不然在执行jenkins任务时用到docker命令时会报docker:command not found

第三行:将宿主机上的docker.sock挂载到容器中的相应位置,使得容器中的docker命令行能跟宿主机的docker通信

第四行:挂载我们创建的配置文件存放目录到指定的文件夹

[root@localhost ~]# docker run --name jenkins -p 8080:8080 \
> -v /usr/bin/docker:/usr/bin/docker \
> -v /var/run/docker.sock:/var/run/docker.sock \
> -v /home/jenkins_home:/var/jenkins_home \
> --privileged=true -d jenkins/jenkins:lts
b3d1b7734937cc7fa38d444a407e7817b1fdda28ffb9990141b9b114e6f20667
[root@localhost ~]#
[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                           PORTS                               NAMES
b3d1b7734937        jenkins/jenkins:lts       "/sbin/tini -- /us..."   13 seconds ago      Up 11 seconds                    0.0.0.0:8080->8080/tcp, 50000/tcp   jenkins
388479626cad        gitlab/gitlab-ce:latest   "/assets/wrapper"        2 days ago          Exited (137) About an hour ago                                       gitlab
e8314bf2b462        registry                  "/entrypoint.sh /e..."   3 days ago          Up 2 hours                       0.0.0.0:5000->5000/tcp              registry
813daeef096d        nginx                     "/docker-entrypoin..."   8 days ago          Up 2 hours                       0.0.0.0:80->80/tcp                  server-nginx
83199b3ed9ba        php:7.1.30-fpm            "docker-php-entryp..."   8 days ago          Up 2 hours                       0.0.0.0:9000->9000/tcp              server-php
[root@localhost ~]#
[root@localhost ~]# docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword
8f5e7c32adc24698ba32a828ef193148
[root@localhost ~]#

浏览器访问:http://192.168.56.108:8080/

配置第一个用户名和密码 如 用户名:test , 密码 test,登录:

新建任务,配置 构建 执行shell,保存。

立即构建。

新增用户

在Jenkins的web管理页面,沿着菜单 系统管理 -> 安全 -> 管理用户 -> 新建用户 中可以新增指定用户:

用户名:    
密码:    
确认密码:    
全名:    
电子邮件地址:    

新建任务

在Jenkins的web管理页面,点击菜单 新建任务 可以新建一个Jenkins的任务,以后可以选择这个任务进行构建,这里的可操作空间比较大。

操作下来,放弃了,比较复杂,不好操作。

Deployer

Deployer 是一个 PHP 写的部署工具。

功能特性:

  • 通过SSH部署应用到多台服务器
  • 克隆项目git仓库
  • 安装composer依赖
  • 运行任意bash命令
  • 优雅地处理上述步骤出现的错误
  • 保持之前的部署
  • 监控cronjob的运行
  • 允许通过webhook触发部署

基于 php 的项目部署工具 deployer 介绍 https://www.muouseo.com/article/kq1ezwqerl.html






参考资料

艾编程:Jenkins持续集成安装部署到项目开发实战详细教程合集 https://www.bilibili.com/video/BV1Gi4y1472V?p=1

持续集成与持续部署.md https://github.com/liuurick/BlogBackup/blob/master/source/_posts/持续集成与持续部署.md

Jenkins持续集成安装部署到项目开发实战详细教程合集 https://www.ixigua.com/6827368436994146828?id=6826944095340986887&logTag=bf984e310528060469b9

Jenkins详细教程 https://www.jianshu.com/p/5f671aca2b5a

Jenkins 官网 https://www.jenkins.io/zh/

你知道什么是CI/CD吗?不懂?五分钟让你彻底理解! https://zhuanlan.zhihu.com/p/381514438

GitLab的安装及使用教程 https://www.cnblogs.com/niuben/p/10867877.html

基于Docker搭建私有镜像仓库 https://www.cnblogs.com/niceyoo/p/13058238.html

docker部署gitlab https://www.cnblogs.com/diaomina/p/12830449.html

Docker安装GitLab全过程详解 https://www.jianshu.com/p/0bc9b4755082

docker下gitlab安装配置使用 https://www.jianshu.com/p/080a962c35b6

正确使用 Docker 搭建 GitLab 只要半分钟 https://zhuanlan.zhihu.com/p/49499229

Linux Centos7/8安装gitlab及配置防坑指南 https://blog.csdn.net/weixin_44534057/article/details/116076342

Jenkins 用户文档中心 https://www.jenkins.io/zh/doc/

Docker安装Jenkins教程 https://www.cnblogs.com/cxt618/p/15021471.html

万字长文带你彻底搞懂什么是 DevOps https://mp.weixin.qq.com/s/IESuJb4LFaKJ1Sq3RH3EGg

jenkins执行shell命令 https://www.cnblogs.com/yitianyouyitian/p/9255098.html

B站讲的最透彻的Jenkins教程 https://www.bilibili.com/video/BV1pF411Y7tq

Jenkins持续集成安装部署到项目开发实战详细教程合集 https://www.ixigua.com/6827368436994146828

gitlab邮箱服务配置 https://www.cnblogs.com/justuntil/p/10352750.html

Deployer官网 https://deployer.org/

修改docker中gitlab的root账号的密码 https://blog.csdn.net/daqiang012/article/details/118765409

jenkins 简单实现php集成上线部署 https://www.cnblogs.com/phpworld/p/8745544.html

使用 Jenkins 自动化发布 PHP 项目 https://www.jianshu.com/p/d979ae1e7e57


返回