1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00

Merge branch 'testing' into use-ynh_get_ram

This commit is contained in:
Kayou 2020-06-23 12:30:13 +02:00 committed by GitHub
commit 8a8d4a6a9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 364 additions and 184 deletions

View file

@ -1,46 +1,50 @@
# Gitlab for Yunohost # GitLab for YunoHost
[![Integration level](https://dash.yunohost.org/integration/gitlab.svg)](https://dash.yunohost.org/appci/app/gitlab) ![](https://ci-apps.yunohost.org/ci/badges/gitlab.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/gitlab.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/gitlab.svg)](https://dash.yunohost.org/appci/app/gitlab) ![](https://ci-apps.yunohost.org/ci/badges/gitlab.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/gitlab.maintain.svg)
[![Install gitlab with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=gitlab) [![Install GitLab with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=gitlab)
> *This package allow you to install gitlab quickly and simply on a YunoHost server. *[Lire ce readme en français.](./README_fr.md)*
> *This package allow you to install GitLab quickly and simply on a YunoHost server.
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
## Overview ## Overview
GitLab is a web-based Git-repository manager providing wiki, issue-tracking and CI/CD pipeline features, using an open-source license, developed by GitLab Inc. GitLab is a web-based Git-repository manager providing wiki, issue-tracking and CI/CD pipeline features, using an open-source license, developed by GitLab Inc.
**Shipped version:** 12.10.1 **Shipped version:** 13.0.4
## Screenshots ## Screenshots
![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/GitLab_running_11.0_%282018-07%29.png/300px-GitLab_running_11.0_%282018-07%29.png) ![](https://upload.wikimedia.org/wikipedia/commons/9/9a/GitLab_running_11.0_%282018-07%29.png)
## Configuration ## Configuration
How to configure this app: How to configure GitLab:
- An admin panel
- The file: `/etc/gitlab/gitlab-persistent.rb` (use `sudo gitlab-ctl reconfigure` after any modification of this file) - With the GitLab admin panel.
- By editing the configuration file `/etc/gitlab/gitlab-persistent.rb` (use `sudo gitlab-ctl reconfigure` after any modification of this file).
## Documentation ## Documentation
* Official documentation: https://docs.gitlab.com/ce/README.html * Official documentation: https://docs.gitlab.com/ce/README.html
* YunoHost documentation: https://yunohost.org/#/app_gitlab
## YunoHost specific features ## YunoHost specific features
#### Multi-users support #### Multi-users support
Yes with LDAP support. * Are LDAP and HTTP auth supported? **Yes**
* Can the app be used by multiple users? **Yes**
#### Supported architectures #### Supported architectures
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/gitlab%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/gitlab/) * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/gitlab%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/gitlab/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/gitlab%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/gitlab/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/gitlab%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/gitlab/)
* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/gitlab%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/gitlab/)
## Limitations ## Limitations
* Not compatible with a 32-bit architecture. * GitLab is not compatible with 32-bit architectures.
## Links ## Links
@ -54,7 +58,6 @@ Yes with LDAP support.
Developers info Developers info
---------------- ----------------
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/gitlab_ynh/tree/testing). Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/gitlab_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.
@ -63,6 +66,3 @@ sudo yunohost app install https://github.com/YunoHost-Apps/gitlab_ynh/tree/testi
or or
sudo yunohost app upgrade gitlab -u https://github.com/YunoHost-Apps/gitlab_ynh/tree/testing --debug sudo yunohost app upgrade gitlab -u https://github.com/YunoHost-Apps/gitlab_ynh/tree/testing --debug
``` ```
**More information on the documentation page:**
https://yunohost.org/packaging_apps

68
README_fr.md Normal file
View file

@ -0,0 +1,68 @@
# GitLab pour YunoHost
[![Integration level](https://dash.yunohost.org/integration/gitlab.svg)](https://dash.yunohost.org/appci/app/gitlab) ![](https://ci-apps.yunohost.org/ci/badges/gitlab.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/gitlab.maintain.svg)
[![Installer GitLab pour YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=gitlab)
*[Read this readme in english.](./README.md)*
> *Ce package vous permet d'installer GitLab rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
## Vue d'ensemble
GitLab est un gestionnaire Web de dépôt Git fournissant des fonctionnalités de wiki, de rapports de bugs et de pipeline CI/CD. GitLab est une application open source développée par GitLab Inc.
**Version incluse :** 13.0.4
## Captures d'écran
![](https://upload.wikimedia.org/wikipedia/commons/9/9a/GitLab_running_11.0_%282018-07%29.png)
## Configuration
Comment configurer GitLab :
- Avec le panneau d'administration de GitLab.
- En éditant le fichier de configuration `/etc/gitlab/gitlab-persistent.rb` et en éxécutant la commande `sudo gitlab-ctl reconfigure` pour réactualiser la configuration.
## Documentation
* Documentation officielle : https://docs.gitlab.com/ce/README.html
* Documentation YunoHost : https://yunohost.org/#/app_gitlab_fr
## Caractéristiques spécifiques YunoHost
#### Support multi-utilisateurs
* L'authentification LDAP et HTTP est-elle prise en charge ? **Oui**
* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui**
#### Architectures supportées
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/gitlab%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/gitlab/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/gitlab%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/gitlab/)
## Limitations
* L'application GitLab n'est pas compatible avec les architectures 32-bit.
## Liens
* Signaler un bug : https://github.com/YunoHost-Apps/gitlab_ynh/issues
* Site de l'application : https://gitlab.com
* Dépôt de l'application principale : https://gitlab.com/gitlab-org/omnibus-gitlab - https://gitlab.com/gitlab-org/gitlab-ce
* Site web YunoHost : https://yunohost.org/
---
Informations pour les développeurs
----------------
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/gitlab_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.
```
sudo yunohost app install https://github.com/YunoHost-Apps/gitlab_ynh/tree/testing --debug
or
sudo yunohost app upgrade gitlab -u https://github.com/YunoHost-Apps/gitlab_ynh/tree/testing --debug
```

View file

@ -16,6 +16,7 @@
setup_public=1 setup_public=1
upgrade=1 upgrade=1
upgrade=1 from_commit=2cc84310aeff7055342b445c1aee01d4183d5ae2 upgrade=1 from_commit=2cc84310aeff7055342b445c1aee01d4183d5ae2
upgrade=1 from_commit=7c352aff3fb13fc425d76716477c28db5d54ac99
backup_restore=1 backup_restore=1
multi_instance=0 multi_instance=0
port_already_use=1 (8080) port_already_use=1 (8080)
@ -25,3 +26,8 @@
;;; Options ;;; Options
Email= Email=
Notification=none Notification=none
;;; Upgrade options
; commit=2cc84310aeff7055342b445c1aee01d4183d5ae2
name=11.6.3
; commit=7c352aff3fb13fc425d76716477c28db5d54ac99
name=12.9.2

View file

@ -48,7 +48,8 @@ external_url '__GENERATED_EXTERNAL_URL__'
## Roles for multi-instance GitLab ## Roles for multi-instance GitLab
##! The default is to have no roles enabled, which results in GitLab running as an all-in-one instance. ##! The default is to have no roles enabled, which results in GitLab running as an all-in-one instance.
##! Options: ##! Options:
##! redis_sentinel_role redis_master_role redis_slave_role geo_primary_role geo_secondary_role ##! redis_sentinel_role redis_master_role redis_replica_role geo_primary_role geo_secondary_role
##! postgres_role consul_role application_role monitoring_role
##! For more details on each role, see: ##! For more details on each role, see:
##! https://docs.gitlab.com/omnibus/roles/README.html#roles ##! https://docs.gitlab.com/omnibus/roles/README.html#roles
##! ##!
@ -95,6 +96,7 @@ external_url '__GENERATED_EXTERNAL_URL__'
# gitlab_rails['gitlab_email_smime_enabled'] = false # gitlab_rails['gitlab_email_smime_enabled'] = false
# gitlab_rails['gitlab_email_smime_key_file'] = '/etc/gitlab/ssl/gitlab_smime.key' # gitlab_rails['gitlab_email_smime_key_file'] = '/etc/gitlab/ssl/gitlab_smime.key'
# gitlab_rails['gitlab_email_smime_cert_file'] = '/etc/gitlab/ssl/gitlab_smime.crt' # gitlab_rails['gitlab_email_smime_cert_file'] = '/etc/gitlab/ssl/gitlab_smime.crt'
# gitlab_rails['gitlab_email_smime_ca_certs_file'] = '/etc/gitlab/ssl/gitlab_smime_cas.crt'
### GitLab user privileges ### GitLab user privileges
# gitlab_rails['gitlab_default_can_create_group'] = true # gitlab_rails['gitlab_default_can_create_group'] = true
@ -237,6 +239,8 @@ external_url '__GENERATED_EXTERNAL_URL__'
# gitlab_rails['incoming_email_idle_timeout'] = 60 # gitlab_rails['incoming_email_idle_timeout'] = 60
####! The file name for internal `mail_room` JSON logfile ####! The file name for internal `mail_room` JSON logfile
# gitlab_rails['incoming_email_log_file'] = "/var/log/gitlab/mailroom/mail_room_json.log" # gitlab_rails['incoming_email_log_file'] = "/var/log/gitlab/mailroom/mail_room_json.log"
####! Permanently remove messages from the mailbox when they are deleted after delivery
# gitlab_rails['incoming_email_expunge_deleted'] = false
####! The format of mail_room crash logs ####! The format of mail_room crash logs
# mailroom['exit_log_format'] = "plain" # mailroom['exit_log_format'] = "plain"
@ -476,7 +480,9 @@ EOS
# 'provider' => 'AWS', # 'provider' => 'AWS',
# 'region' => 'eu-west-1', # 'region' => 'eu-west-1',
# 'aws_access_key_id' => 'AKIAKIAKI', # 'aws_access_key_id' => 'AKIAKIAKI',
# 'aws_secret_access_key' => 'secret123' # 'aws_secret_access_key' => 'secret123',
# # # If IAM profile use is enabled, remove aws_access_key_id and aws_secret_access_key
# 'use_iam_profile' => false
# } # }
# gitlab_rails['backup_upload_remote_directory'] = 'my.s3.bucket' # gitlab_rails['backup_upload_remote_directory'] = 'my.s3.bucket'
# gitlab_rails['backup_multipart_chunk_size'] = 104857600 # gitlab_rails['backup_multipart_chunk_size'] = 104857600
@ -554,21 +560,12 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__
# 'bantime' => 3600 # 'bantime' => 3600
# } # }
# Prioritize the Admin Area protected paths throttle settings over the
# deprecated Omnibus-managed protected paths throttle. This allows you to keep
# gitlab_rails['rack_attack_git_basic_auth'] enabled to run the Git and
# container registry failed authentication ban.
# See https://gitlab.com/gitlab-org/gitlab/issues/37093
# gitlab_rails['rack_attack_admin_area_protected_paths_enabled'] = true
###! **We do not recommend changing these directories.** ###! **We do not recommend changing these directories.**
# gitlab_rails['dir'] = "/var/opt/gitlab/gitlab-rails" # gitlab_rails['dir'] = "/var/opt/gitlab/gitlab-rails"
# gitlab_rails['log_directory'] = "/var/log/gitlab/gitlab-rails" # gitlab_rails['log_directory'] = "/var/log/gitlab/gitlab-rails"
### GitLab application settings ### GitLab application settings
# gitlab_rails['uploads_directory'] = "/var/opt/gitlab/gitlab-rails/uploads" # gitlab_rails['uploads_directory'] = "/var/opt/gitlab/gitlab-rails/uploads"
# gitlab_rails['rate_limit_requests_per_period'] = 10
# gitlab_rails['rate_limit_period'] = 60
#### Change the initial default admin password and shared runner registration tokens. #### Change the initial default admin password and shared runner registration tokens.
####! **Only applicable on initial setup, changing these settings after database ####! **Only applicable on initial setup, changing these settings after database
@ -752,6 +749,12 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__
# gitlab_rails['sentry_clientside_dsn'] = 'https://<key>@sentry.io/<project>' # gitlab_rails['sentry_clientside_dsn'] = 'https://<key>@sentry.io/<project>'
# gitlab_rails['sentry_environment'] = 'production' # gitlab_rails['sentry_environment'] = 'production'
################################################################################
## CI_JOB_JWT
################################################################################
##! RSA private key used to sign CI_JOB_JWT
# gitlab_rails['ci_jwt_signing_key'] = nil # Will be generated if not set.
################################################################################ ################################################################################
## GitLab Workhorse ## GitLab Workhorse
##! Docs: https://gitlab.com/gitlab-org/gitlab-workhorse/blob/master/README.md ##! Docs: https://gitlab.com/gitlab-org/gitlab-workhorse/blob/master/README.md
@ -824,15 +827,15 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__
##! Docs: https://docs.gitlab.com/omnibus/settings/unicorn.html ##! Docs: https://docs.gitlab.com/omnibus/settings/unicorn.html
################################################################################ ################################################################################
# unicorn['enable'] = true unicorn['enable'] = false
# unicorn['worker_timeout'] = 60 # unicorn['worker_timeout'] = 60
###! Minimum worker_processes is 2 at this moment ###! Minimum worker_processes is 2 at this moment
###! See https://gitlab.com/gitlab-org/gitlab-foss/issues/18771 ###! See https://gitlab.com/gitlab-org/gitlab-foss/issues/18771
unicorn['worker_processes'] = __UNICORN_WORKER_PROCESSES__ # unicorn['worker_processes'] = 2
### Advanced settings ### Advanced settings
# unicorn['listen'] = 'localhost' # unicorn['listen'] = 'localhost'
unicorn['port'] = __UNICORN_PORT__ # unicorn['port'] = 8080
# unicorn['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket' # unicorn['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket'
# unicorn['pidfile'] = '/opt/gitlab/var/unicorn/unicorn.pid' # unicorn['pidfile'] = '/opt/gitlab/var/unicorn/unicorn.pid'
# unicorn['tcp_nopush'] = true # unicorn['tcp_nopush'] = true
@ -860,16 +863,16 @@ unicorn['port'] = __UNICORN_PORT__
##! Docs: https://docs.gitlab.com/omnibus/settings/puma.html ##! Docs: https://docs.gitlab.com/omnibus/settings/puma.html
################################################################################ ################################################################################
# puma['enable'] = false puma['enable'] = true
# puma['ha'] = false # puma['ha'] = false
# puma['worker_timeout'] = 60 # puma['worker_timeout'] = 60
# puma['worker_processes'] = 2 puma['worker_processes'] = __PUMA_WORKER_PROCESSES__
# puma['min_threads'] = 4 puma['min_threads'] = __PUMA_MIN_THREADS__
# puma['max_threads'] = 4 puma['max_threads'] = __PUMA_MAX_THREADS__
### Advanced settings ### Advanced settings
# puma['listen'] = '127.0.0.1' # puma['listen'] = '127.0.0.1'
# puma['port'] = 8080 puma['port'] = __PUMA_PORT__
# puma['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket' # puma['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket'
# puma['pidfile'] = '/opt/gitlab/var/puma/puma.pid' # puma['pidfile'] = '/opt/gitlab/var/puma/puma.pid'
# puma['state_path'] = '/opt/gitlab/var/puma/puma.state' # puma['state_path'] = '/opt/gitlab/var/puma/puma.state'
@ -889,25 +892,35 @@ unicorn['port'] = __UNICORN_PORT__
## GitLab Sidekiq ## GitLab Sidekiq
################################################################################ ################################################################################
##! GitLab allows one to start multiple sidekiq processes. These
##! processes can be used to consume a dedicated set of queues. This
##! can be used to ensure certain queues are able to handle additional workload.
##! https://docs.gitlab.com/ee/administration/operations/extra_sidekiq_processes.html
# sidekiq['log_directory'] = "/var/log/gitlab/sidekiq" # sidekiq['log_directory'] = "/var/log/gitlab/sidekiq"
# sidekiq['log_format'] = "json" # sidekiq['log_format'] = "json"
# sidekiq['shutdown_timeout'] = 4 # sidekiq['shutdown_timeout'] = 4
# sidekiq['concurrency'] = 25 # sidekiq['cluster'] = true
# sidekiq['experimental_queue_selector'] = false
# sidekiq['interval'] = nil
# sidekiq['max_concurrency'] = 50
# sidekiq['min_concurrency'] = nil
##! Each entry in the queue_groups array denotes a group of queues that have to be processed by a
##! Sidekiq process. Multiple queues can be processed by the same process by
##! separating them with a comma within the group entry, a `*` will process all queues
# sidekiq['queue_groups'] = ['*']
##! If negate is enabled then sidekiq-cluster will process all the queues that
##! don't match those in queue_groups.
# sidekiq['negate'] = false
# sidekiq['metrics_enabled'] = true # sidekiq['metrics_enabled'] = true
# sidekiq['listen_address'] = "localhost" # sidekiq['listen_address'] = "localhost"
sidekiq['listen_port'] = __SIDEKIQ_PORT__ sidekiq['listen_port'] = __SIDEKIQ_PORT__
### Experimental Sidekiq Cluster settings
###! These settings allow starting `sidekiq-cluster` instead of sidekiq.
###! Docs: https://docs.gitlab.com/ee/administration/operations/extra_sidekiq_processes.html#using-sidekiq-cluster-by-default-experimental
# sidekiq['cluster'] = false
# sidekiq['experimental_queue_selector'] = false
# sidekiq['interval'] = nil
# sidekiq['max_concurrency'] = nil
# sidekiq['min_concurrency'] = nil
# sidekiq['negate'] = false
# sidekiq['queue_groups'] = ['*']
################################################################################ ################################################################################
## gitlab-shell ## gitlab-shell
################################################################################ ################################################################################
@ -984,7 +997,7 @@ sidekiq['listen_port'] = __SIDEKIQ_PORT__
# postgresql['hot_standby'] = "off" # postgresql['hot_standby'] = "off"
### SSL settings ### SSL settings
# See https://www.postgresql.org/docs/9.6/static/runtime-config-connection.html#GUC-SSL-CERT-FILE for more details # See https://www.postgresql.org/docs/11/static/runtime-config-connection.html#GUC-SSL-CERT-FILE for more details
# postgresql['ssl'] = 'on' # postgresql['ssl'] = 'on'
# postgresql['ssl_ciphers'] = 'HIGH:MEDIUM:+3DES:!aNULL:!SSLv3:!TLSv1' # postgresql['ssl_ciphers'] = 'HIGH:MEDIUM:+3DES:!aNULL:!SSLv3:!TLSv1'
# postgresql['ssl_cert_file'] = 'server.crt' # postgresql['ssl_cert_file'] = 'server.crt'
@ -1066,7 +1079,7 @@ sidekiq['listen_port'] = __SIDEKIQ_PORT__
# } # }
# ] # ]
# } # }
# See https://www.postgresql.org/docs/9.6/static/auth-pg-hba-conf.html for an explanation # See https://www.postgresql.org/docs/11/static/auth-pg-hba-conf.html for an explanation
# of the values # of the values
### Version settings ### Version settings
@ -1107,11 +1120,11 @@ sidekiq['listen_port'] = __SIDEKIQ_PORT__
# #
###! **To enable only Redis service in this machine, uncomment ###! **To enable only Redis service in this machine, uncomment
###! one of the lines below (choose master or slave instance types).** ###! one of the lines below (choose master or replica instance types).**
###! Docs: https://docs.gitlab.com/omnibus/settings/redis.html ###! Docs: https://docs.gitlab.com/omnibus/settings/redis.html
###! https://docs.gitlab.com/ee/administration/high_availability/redis.html ###! https://docs.gitlab.com/ee/administration/high_availability/redis.html
# redis_master_role['enable'] = true # redis_master_role['enable'] = true
# redis_slave_role['enable'] = true # redis_replica_role['enable'] = true
### Redis TCP support (will disable UNIX socket transport) ### Redis TCP support (will disable UNIX socket transport)
# redis['bind'] = '0.0.0.0' # or specify an IP to bind to a single one # redis['bind'] = '0.0.0.0' # or specify an IP to bind to a single one
@ -1119,35 +1132,35 @@ sidekiq['listen_port'] = __SIDEKIQ_PORT__
# redis['password'] = 'redis-password-goes-here' # redis['password'] = 'redis-password-goes-here'
### Redis Sentinel support ### Redis Sentinel support
###! **You need a master slave Redis replication to be able to do failover** ###! **You need a master replica Redis replication to be able to do failover**
###! **Please read the documentation before enabling it to understand the ###! **Please read the documentation before enabling it to understand the
###! caveats:** ###! caveats:**
###! Docs: https://docs.gitlab.com/ee/administration/high_availability/redis.html ###! Docs: https://docs.gitlab.com/ee/administration/high_availability/redis.html
### Replication support ### Replication support
#### Slave Redis instance #### Replica Redis instance
# redis['master'] = false # by default this is true # redis['master'] = false # by default this is true
#### Slave and Sentinel shared configuration #### Replica and Sentinel shared configuration
####! **Both need to point to the master Redis instance to get replication and ####! **Both need to point to the master Redis instance to get replication and
####! heartbeat monitoring** ####! heartbeat monitoring**
# redis['master_name'] = 'gitlab-redis' # redis['master_name'] = 'gitlab-redis'
# redis['master_ip'] = nil # redis['master_ip'] = nil
# redis['master_port'] = 6379 # redis['master_port'] = 6379
#### Support to run redis slaves in a Docker or NAT environment #### Support to run redis replicas in a Docker or NAT environment
####! Docs: https://redis.io/topics/replication#configuring-replication-in-docker-and-nat ####! Docs: https://redis.io/topics/replication#configuring-replication-in-docker-and-nat
# redis['announce_ip'] = nil # redis['announce_ip'] = nil
# redis['announce_port'] = nil # redis['announce_port'] = nil
####! **Master password should have the same value defined in ####! **Master password should have the same value defined in
####! redis['password'] to enable the instance to transition to/from ####! redis['password'] to enable the instance to transition to/from
####! master/slave in a failover event.** ####! master/replica in a failover event.**
# redis['master_password'] = 'redis-password-goes-here' # redis['master_password'] = 'redis-password-goes-here'
####! Increase these values when your slaves can't catch up with master ####! Increase these values when your replicas can't catch up with master
# redis['client_output_buffer_limit_normal'] = '0 0 0' # redis['client_output_buffer_limit_normal'] = '0 0 0'
# redis['client_output_buffer_limit_slave'] = '256mb 64mb 60' # redis['client_output_buffer_limit_replica'] = '256mb 64mb 60'
# redis['client_output_buffer_limit_pubsub'] = '32mb 8mb 60' # redis['client_output_buffer_limit_pubsub'] = '32mb 8mb 60'
#####! Redis snapshotting frequency #####! Redis snapshotting frequency
@ -1265,7 +1278,7 @@ nginx['listen_https'] = false
# nginx['log_directory'] = "/var/log/gitlab/nginx" # nginx['log_directory'] = "/var/log/gitlab/nginx"
# nginx['worker_processes'] = 4 # nginx['worker_processes'] = 4
# nginx['worker_connections'] = 10240 # nginx['worker_connections'] = 10240
# nginx['log_format'] = '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"' # nginx['log_format'] = '$remote_addr - $remote_user [$time_local] "$request_method $filtered_request_uri $server_protocol" $status $body_bytes_sent "$filtered_http_referer" "$http_user_agent" $gzip_ratio'
# nginx['sendfile'] = 'on' # nginx['sendfile'] = 'on'
# nginx['tcp_nopush'] = 'on' # nginx['tcp_nopush'] = 'on'
# nginx['tcp_nodelay'] = 'on' # nginx['tcp_nodelay'] = 'on'
@ -1273,7 +1286,7 @@ nginx['listen_https'] = false
# nginx['gzip_http_version'] = "1.0" # nginx['gzip_http_version'] = "1.0"
# nginx['gzip_comp_level'] = "2" # nginx['gzip_comp_level'] = "2"
# nginx['gzip_proxied'] = "any" # nginx['gzip_proxied'] = "any"
# nginx['gzip_types'] = [ "text/plain", "text/css", "application/x-javascript", "text/xml", "application/xml", "application/xml+rss", "text/javascript", "application/json" ] # nginx['gzip_types'] = [ "text/html", "text/plain", "text/css", "application/x-javascript", "text/xml", "application/xml", "application/xml+rss", "text/javascript", "application/json" ]
# nginx['keepalive_timeout'] = 65 # nginx['keepalive_timeout'] = 65
# nginx['cache_max_size'] = '5000m' # nginx['cache_max_size'] = '5000m'
# nginx['server_names_hash_bucket_size'] = 64 # nginx['server_names_hash_bucket_size'] = 64
@ -1455,6 +1468,7 @@ nginx['listen_https'] = false
# gitlab_pages['gitlab_secret'] = nil # Generated if not present # gitlab_pages['gitlab_secret'] = nil # Generated if not present
# gitlab_pages['auth_redirect_uri'] = nil # Defaults to projects subdomain of pages_external_url and + '/auth' # gitlab_pages['auth_redirect_uri'] = nil # Defaults to projects subdomain of pages_external_url and + '/auth'
# gitlab_pages['gitlab_server'] = nil # Defaults to external_url # gitlab_pages['gitlab_server'] = nil # Defaults to external_url
# gitlab_pages['internal_gitlab_server'] = nil # defaults to gitlab_server, can be changed to internal load balancer
# gitlab_pages['auth_secret'] = nil # Generated if not present # gitlab_pages['auth_secret'] = nil # Generated if not present
##! GitLab API HTTP client connection timeout ##! GitLab API HTTP client connection timeout
@ -1787,6 +1801,7 @@ nginx['listen_https'] = false
# grafana['metrics_enabled'] = false # grafana['metrics_enabled'] = false
# grafana['metrics_basic_auth_username'] = 'grafana_metrics' # default: nil # grafana['metrics_basic_auth_username'] = 'grafana_metrics' # default: nil
# grafana['metrics_basic_auth_password'] = 'please_set_a_unique_password' # default: nil # grafana['metrics_basic_auth_password'] = 'please_set_a_unique_password' # default: nil
# grafana['alerting_enabled'] = false
### Dashboards ### Dashboards
# #
@ -1841,7 +1856,12 @@ nginx['listen_https'] = false
# gitaly['env_directory'] = "/opt/gitlab/etc/gitaly/env" # gitaly['env_directory'] = "/opt/gitlab/etc/gitaly/env"
# gitaly['env'] = { # gitaly['env'] = {
# 'PATH' => "/opt/gitlab/bin:/opt/gitlab/embedded/bin:/bin:/usr/bin", # 'PATH' => "/opt/gitlab/bin:/opt/gitlab/embedded/bin:/bin:/usr/bin",
# 'HOME' => '/var/opt/gitlab' # 'HOME' => '/var/opt/gitlab',
# 'TZ' => ':/etc/localtime',
# 'PYTHONPATH' => "/opt/gitlab/embedded/lib/python3.7/site-packages",
# 'ICU_DATA' => "/opt/gitlab/embedded/share/icu/current",
# 'SSL_CERT_DIR' => "/opt/gitlab/embedded/ssl/certs/",
# 'WRAPPER_JSON_LOGGING' => true
# } # }
##! internal_socket_dir is the directory that will contain internal gitaly sockets, ##! internal_socket_dir is the directory that will contain internal gitaly sockets,
@ -1886,6 +1906,15 @@ nginx['listen_https'] = false
################################################################################ ################################################################################
# praefect['enable'] = false # praefect['enable'] = false
# praefect['dir'] = "/var/opt/gitlab/praefect"
# praefect['log_directory'] = "/var/log/gitlab/praefect"
# praefect['env_directory'] = "/opt/gitlab/etc/praefect/env"
# praefect['env'] = {
# 'SSL_CERT_DIR' => "/opt/gitlab/embedded/ssl/certs/",
# 'GITALY_PID_FILE' => "/var/opt/gitlab/praefect/praefect.pid",
# 'WRAPPER_JSON_LOGGING' => true
# }
# praefect['wrapper_path'] = "/opt/gitlab/embedded/bin/gitaly-wrapper"
# praefect['virtual_storage_name'] = "praefect" # praefect['virtual_storage_name'] = "praefect"
# praefect['failover_enabled'] = false # praefect['failover_enabled'] = false
# praefect['failover_election_strategy'] = 'local' # praefect['failover_election_strategy'] = 'local'
@ -1921,6 +1950,7 @@ nginx['listen_https'] = false
# } # }
# praefect['sentry_dsn'] = "https://<key>:<secret>@sentry.io/<project>" # praefect['sentry_dsn'] = "https://<key>:<secret>@sentry.io/<project>"
# praefect['sentry_environment'] = "production" # praefect['sentry_environment'] = "production"
# praefect['auto_migrate'] = true
# praefect['database_host'] = 'postgres.internal' # praefect['database_host'] = 'postgres.internal'
# praefect['database_port'] = 5432 # praefect['database_port'] = 5432
# praefect['database_user'] = 'praefect' # praefect['database_user'] = 'praefect'
@ -2102,52 +2132,21 @@ nginx['listen_https'] = false
##! already tried against the same master by a given Sentinel, is two ##! already tried against the same master by a given Sentinel, is two
##! times the failover timeout. ##! times the failover timeout.
##! ##!
##! - The time needed for a slave replicating to a wrong master according ##! - The time needed for a replica replicating to a wrong master according
##! to a Sentinel current configuration, to be forced to replicate ##! to a Sentinel current configuration, to be forced to replicate
##! with the right master, is exactly the failover timeout (counting since ##! with the right master, is exactly the failover timeout (counting since
##! the moment a Sentinel detected the misconfiguration). ##! the moment a Sentinel detected the misconfiguration).
##! ##!
##! - The time needed to cancel a failover that is already in progress but ##! - The time needed to cancel a failover that is already in progress but
##! did not produced any configuration change (SLAVEOF NO ONE yet not ##! did not produced any configuration change (REPLICAOF NO ONE yet not
##! acknowledged by the promoted slave). ##! acknowledged by the promoted replica).
##! ##!
##! - The maximum time a failover in progress waits for all the slaves to be ##! - The maximum time a failover in progress waits for all the replicas to be
##! reconfigured as slaves of the new master. However even after this time ##! reconfigured as replicas of the new master. However even after this time
##! the slaves will be reconfigured by the Sentinels anyway, but not with ##! the replicas will be reconfigured by the Sentinels anyway, but not with
##! the exact parallel-syncs progression as specified. ##! the exact parallel-syncs progression as specified.
# sentinel['failover_timeout'] = 60000 # sentinel['failover_timeout'] = 60000
################################################################################
## GitLab Sidekiq Cluster (EE only)
################################################################################
##! GitLab Enterprise Edition allows one to start an extra set of Sidekiq processes
##! besides the default one. These processes can be used to consume a dedicated set
##! of queues. This can be used to ensure certain queues always have dedicated
##! workers, no matter the amount of jobs that need to be processed.
# sidekiq_cluster['enable'] = false
# sidekiq_cluster['ha'] = false
# sidekiq_cluster['log_directory'] = "/var/log/gitlab/sidekiq-cluster"
# sidekiq_cluster['interval'] = 5 # The number of seconds to wait between worker checks
# sidekiq_cluster['max_concurrency'] = 50 # The maximum number of threads each Sidekiq process should run
# sidekiq_cluster['min_concurrency'] = 0 # The minimum number of threads each Sidekiq process should run
##! Each entry in the queue_groups array denotes a group of queues that have to be processed by a
##! Sidekiq process. Multiple queues can be processed by the same process by
##! separating them with a comma within the group entry
# sidekiq_cluster['queue_groups'] = [
# "process_commit,post_receive",
# "gitlab_shell"
# ]
#
##! If negate is enabled then sidekiq-cluster will process all the queues that
##! don't match those in queue_groups.
# sidekiq_cluster['negate'] = false
################################################################################ ################################################################################
## Additional Database Settings (EE only) ## Additional Database Settings (EE only)
##! Docs: https://docs.gitlab.com/ee/administration/database_load_balancing.html ##! Docs: https://docs.gitlab.com/ee/administration/database_load_balancing.html
@ -2158,8 +2157,8 @@ nginx['listen_https'] = false
## GitLab Geo ## GitLab Geo
##! Docs: https://docs.gitlab.com/ee/gitlab-geo ##! Docs: https://docs.gitlab.com/ee/gitlab-geo
################################################################################ ################################################################################
# geo_primary_role['enable'] = false ##! Geo roles 'geo_primary_role' and 'geo_secondary_role' are set above with
# geo_secondary_role['enable'] = false ##! other roles. For more information, see: https://docs.gitlab.com/omnibus/roles/README.html#roles.
# This is an optional identifier which Geo nodes can use to identify themselves. # This is an optional identifier which Geo nodes can use to identify themselves.
# For example, if external_url is the same for two secondaries, you must specify # For example, if external_url is the same for two secondaries, you must specify
@ -2207,7 +2206,9 @@ nginx['listen_https'] = false
################################################################################ ################################################################################
## Unleash ## Unleash
##! Docs: https://docs.gitlab.com/ee/user/project/operations/feature_flags.html ##! These settings are for GitLab internal use.
##! They are used to control feature flags during GitLab development.
##! Docs: https://docs.gitlab.com/ee/development/feature_flags
################################################################################ ################################################################################
# gitlab_rails['feature_flags_unleash_enabled'] = false # gitlab_rails['feature_flags_unleash_enabled'] = false
# gitlab_rails['feature_flags_unleash_url'] = nil # gitlab_rails['feature_flags_unleash_url'] = nil
@ -2417,5 +2418,43 @@ nginx['listen_https'] = false
# handler: 'failover_pgbouncer' # handler: 'failover_pgbouncer'
# } # }
# } # }
################################################################################
# Service desk email settings (EEP only)
################################################################################
### Service desk email
###! Allow users to create new service desk issues by sending an email to
###! service desk address.
###! Docs: https://docs.gitlab.com/ee/administration/reply_by_email.html
# gitlab_rails['service_desk_email_enabled'] = false
#### Service Desk Mailbox Settings (via `mail_room`)
#### Service Desk Email Address
####! The email address including the `%{key}` placeholder that will be replaced
####! to reference the item being replied to.
####! **The placeholder can be omitted but if present, it must appear in the
####! "user" part of the address (before the `@`).**
# gitlab_rails['service_desk_email_address'] = "contact_project+%{key}@gmail.com"
#### Service Desk Email account username
####! **With third party providers, this is usually the full email address.**
####! **With self-hosted email servers, this is usually the user part of the
####! email address.**
# gitlab_rails['service_desk_email_email'] = "contact_project@gmail.com"
#### Service Desk Email account password
# gitlab_rails['service_desk_email_password'] = "[REDACTED]"
####! The mailbox where service desk mail will end up. Usually "inbox".
# gitlab_rails['service_desk_email_mailbox_name'] = "inbox"
####! The IDLE command timeout.
# gitlab_rails['service_desk_email_idle_timeout'] = 60
####! The file name for internal `mail_room` JSON logfile
# gitlab_rails['service_desk_email_log_file'] = "/var/log/gitlab/mailroom/mail_room_json.log"
#### Service Desk IMAP Settings
# gitlab_rails['service_desk_email_host'] = "imap.gmail.com"
# gitlab_rails['service_desk_email_port'] = 993
# gitlab_rails['service_desk_email_ssl'] = true
# gitlab_rails['service_desk_email_start_tls'] = false
from_file '/etc/gitlab/gitlab-persistent.rb' from_file '/etc/gitlab/gitlab-persistent.rb'

View file

@ -2,7 +2,7 @@
"name": "Gitlab", "name": "Gitlab",
"id": "gitlab", "id": "gitlab",
"packaging_format": 1, "packaging_format": 1,
"version": "12.10.1~ynh1", "version": "13.0.4~ynh1",
"description": { "description": {
"en": "Git-repository manager.", "en": "Git-repository manager.",
"fr": "Gestionnaire de dépôts Git." "fr": "Gestionnaire de dépôts Git."
@ -38,8 +38,8 @@
"en": "Choose a path for gitlab", "en": "Choose a path for gitlab",
"fr": "Choisissez un chemin pour gitlab" "fr": "Choisissez un chemin pour gitlab"
}, },
"example": "/", "example": "/gitlab",
"default": "/" "default": "/gitlab"
}, },
{ {
"name": "admin", "name": "admin",

View file

@ -4,7 +4,7 @@
# SET ALL CONSTANTS # SET ALL CONSTANTS
#================================================= #=================================================
pkg_dependencies="openssh-server bc" pkg_dependencies="openssh-server"
#================================================= #=================================================
# EXPERIMENTAL HELPERS # EXPERIMENTAL HELPERS

View file

@ -28,7 +28,6 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
config_path=$(ynh_app_setting_get --app=$app --key=config_path) config_path=$(ynh_app_setting_get --app=$app --key=config_path)
domain=$(ynh_app_setting_get --app=$app --key=domain) domain=$(ynh_app_setting_get --app=$app --key=domain)
@ -46,7 +45,7 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
ynh_script_progression --message="Backuping of Gitlab..." --weight=9 ynh_script_progression --message="Backuping of Gitlab..." --weight=9
# Use gitlab-rake to backup # Use gitlab-backup to backup
# For the complete doc: https://docs.gitlab.com/ce/raketasks/backup_restore.html # For the complete doc: https://docs.gitlab.com/ce/raketasks/backup_restore.html
# For the filename: https://docs.gitlab.com/ce/raketasks/backup_restore.html#backup-filename # For the filename: https://docs.gitlab.com/ce/raketasks/backup_restore.html#backup-filename
gitlab-backup create BACKUP=last gitlab-backup create BACKUP=last

View file

@ -27,12 +27,13 @@ app=$YNH_APP_INSTANCE_NAME
ynh_script_progression --message="Loading installation settings..." --weight=1 ynh_script_progression --message="Loading installation settings..." --weight=1
# Needed for helper "ynh_add_nginx_config" # Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
config_path=$(ynh_app_setting_get --app=$app --key=config_path) config_path=$(ynh_app_setting_get --app=$app --key=config_path)
port=$(ynh_app_setting_get --app="$app" --key=web_port) port=$(ynh_app_setting_get --app="$app" --key=web_port)
portUnicorn=$(ynh_app_setting_get --app="$app" --key=unicorn_port) portPuma=$(ynh_app_setting_get --app="$app" --key=puma_port)
portSidekiq=$(ynh_app_setting_get --app="$app" --key=sidekiq_port) portSidekiq=$(ynh_app_setting_get --app="$app" --key=sidekiq_port)
unicorn_worker_processes=$(ynh_app_setting_get --app="$app" --key=unicorn_worker_processes) puma_worker_processes=$(ynh_app_setting_get --app="$app" --key=puma_worker_processes)
puma_min_threads=$(ynh_app_setting_get --app="$app" --key=puma_min_threads)
puma_max_threads=$(ynh_app_setting_get --app="$app" --key=puma_max_threads)
client_max_body_size=$(ynh_app_setting_get --app="$app" --key=client_max_body_size) client_max_body_size=$(ynh_app_setting_get --app="$app" --key=client_max_body_size)
#================================================= #=================================================
@ -63,7 +64,7 @@ if [ $change_path -eq 1 ]; then
#doc in: https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab #doc in: https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
gitlab-ctl stop unicorn gitlab-ctl stop puma
gitlab-ctl stop sidekiq gitlab-ctl stop sidekiq
# Make a backup of the original nginx config file if modified # Make a backup of the original nginx config file if modified
@ -105,8 +106,10 @@ path_url="$new_path"
ynh_replace_string --match_string="__GENERATED_EXTERNAL_URL__" --replace_string="https://$domain${path_url%/}" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__GENERATED_EXTERNAL_URL__" --replace_string="https://$domain${path_url%/}" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__UNICORN_PORT__" --replace_string="$portUnicorn" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__PUMA_PORT__" --replace_string="$portPuma" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__UNICORN_WORKER_PROCESSES__" --replace_string="$unicorn_worker_processes" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__PUMA_WORKER_PROCESSES__" --replace_string="$puma_worker_processes" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__PUMA_MIN_THREADS__" --replace_string="$puma_min_threads" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__PUMA_MAX_THREADS__" --replace_string="$puma_max_threads" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__CLIENT_MAX_BODY_SIZE__" --replace_string="$client_max_body_size" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__CLIENT_MAX_BODY_SIZE__" --replace_string="$client_max_body_size" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__SSH_PORT__" --replace_string="$ssh_port" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__SSH_PORT__" --replace_string="$ssh_port" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__SIDEKIQ_PORT__" --replace_string="$portSidekiq" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__SIDEKIQ_PORT__" --replace_string="$portSidekiq" --target_file="$config_path/gitlab.rb"
@ -124,7 +127,7 @@ gitlab-ctl reconfigure
#================================================= #=================================================
ynh_script_progression --message="Waiting for gitlab..." --weight=15 ynh_script_progression --message="Waiting for gitlab..." --weight=15
ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/unicorn/current" --line_match="adopted" --timeout=300 ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/puma/current" --line_match="Listening on tcp://127.0.0.1:$portPuma" --timeout=300
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALISATION

View file

@ -85,11 +85,11 @@ ynh_script_progression --message="Find internal port..." --weight=1
# Find free ports # Find free ports
port=$(ynh_find_port --port=8080) port=$(ynh_find_port --port=8080)
portUnicorn=$(ynh_find_port --port=$(($port + 1))) portPuma=$(ynh_find_port --port=$(($port + 1)))
portSidekiq=$(ynh_find_port --port=$(($portUnicorn + 1))) portSidekiq=$(ynh_find_port --port=$(($portPuma + 1)))
ynh_app_setting_set --app=$app --key=web_port --value=$port ynh_app_setting_set --app=$app --key=web_port --value=$port
ynh_app_setting_set --app=$app --key=unicorn_port --value=$portUnicorn ynh_app_setting_set --app=$app --key=puma_port --value=$portPuma
ynh_app_setting_set --app=$app --key=sidekiq_port --value=$portSidekiq ynh_app_setting_set --app=$app --key=sidekiq_port --value=$portSidekiq
#================================================= #=================================================
@ -103,19 +103,21 @@ ynh_install_app_dependencies $pkg_dependencies
# DEFINE THE NUMBER OF WORKERS USED # DEFINE THE NUMBER OF WORKERS USED
#================================================= #=================================================
# https://docs.gitlab.com/ce/install/requirements.html#unicorn-workers #https://docs.gitlab.com/ce/install/requirements.html#puma-workers
unicorn_worker_processes=$(bc <<< "($(nproc) * 1.5 + 1) / 1") puma_worker_processes=$(( $(nproc) > 2 ? $(nproc) : 2 ))
# If the server has at least 2GB of RAM # If the server has at least 2GB of RAM
if [ $(ynh_get_ram --total --ignore_swap) -ge 2000 ]; then if [ $(ynh_get_ram --total --ignore_swap) -ge 2000 ]; then
# Min 3 worker processes puma_min_threads=1
unicorn_worker_processes=$(($unicorn_worker_processes>3?$unicorn_worker_processes:3)) puma_max_threads=1
else else
# 2 worker processes puma_min_threads=2
unicorn_worker_processes=2 puma_max_threads=4
fi fi
ynh_app_setting_set --app=$app --key=unicorn_worker_processes --value=$unicorn_worker_processes ynh_app_setting_set --app=$app --key=puma_workers --value=$puma_worker_processes
ynh_app_setting_set --app=$app --key=puma_max_threads --value=$puma_max_threads
ynh_app_setting_set --app=$app --key=puma_min_threads --value=$puma_min_threads
#================================================= #=================================================
# ADD SWAP IF NEEDED # ADD SWAP IF NEEDED
@ -136,8 +138,10 @@ if [ $(($total_swap + $swap_needed)) -lt 2048 ]; then
swap_needed=$((2048 - $total_swap)) swap_needed=$((2048 - $total_swap))
fi fi
ynh_script_progression --message="Adding $swap_needed Mo to swap..." --weight=1 if [ $swap_needed -gt 0 ]; then
ynh_add_swap --size=$swap_needed ynh_script_progression --message="Adding $swap_needed Mo to swap..."
ynh_add_swap --size=$swap_needed
fi
#================================================= #=================================================
# PRECONFIGURE GITLAB # PRECONFIGURE GITLAB
@ -154,8 +158,10 @@ ssh_port=$(grep -P "Port\s+\d+" /etc/ssh/sshd_config | grep -P -o "\d+")
ynh_replace_string --match_string="__GENERATED_EXTERNAL_URL__" --replace_string="https://$domain${path_url%/}" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__GENERATED_EXTERNAL_URL__" --replace_string="https://$domain${path_url%/}" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__UNICORN_PORT__" --replace_string="$portUnicorn" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__PUMA_PORT__" --replace_string="$portPuma" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__UNICORN_WORKER_PROCESSES__" --replace_string="$unicorn_worker_processes" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__PUMA_WORKER_PROCESSES__" --replace_string="$puma_worker_processes" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__PUMA_MIN_THREADS__" --replace_string="$puma_min_threads" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__PUMA_MAX_THREADS__" --replace_string="$puma_max_threads" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__CLIENT_MAX_BODY_SIZE__" --replace_string="$client_max_body_size" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__CLIENT_MAX_BODY_SIZE__" --replace_string="$client_max_body_size" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__SSH_PORT__" --replace_string="$ssh_port" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__SSH_PORT__" --replace_string="$ssh_port" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__SIDEKIQ_PORT__" --replace_string="$portSidekiq" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__SIDEKIQ_PORT__" --replace_string="$portSidekiq" --target_file="$config_path/gitlab.rb"
@ -231,7 +237,7 @@ gitlab-ctl reconfigure
# ADVERTISE SERVICE IN ADMIN PANEL # ADVERTISE SERVICE IN ADMIN PANEL
#================================================= #=================================================
yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/application.log" "/var/log/$app/gitlab-rails/api_json.log" "/var/log/$app/gitlab-rails/production.log" "/var/log/$app/gitlab-rails/production_json.log" "/var/log/$app/gitlab-rails/sidekiq.log" "/var/log/$app/unicorn/unicorn_stderr.log" "/var/log/$app/unicorn/current" "/var/log/$app/alertmanager/current" "/var/log/$app/gitaly/current" "/var/log/$app/gitlab-monitor/current" "/var/log/$app/gitlab-shell/gitlab-shell.log" "/var/log/$app/gitlab-workhorse/current" "/var/log/$app/logrotate/current" "/var/log/$app/nginx/current" "/var/log/$app/nginx/access.log" "/var/log/$app/nginx/error.log" "/var/log/$app/nginx/gitlab_access.log" "/var/log/$app/nginx/gitlab_error.log" "/var/log/$app/node-exporter/current" "/var/log/$app/postgres-exporter/current" "/var/log/$app/postgresql/current" "/var/log/$app/prometheus/current" "/var/log/$app/redis/current" "/var/log/$app/redis-exporter/current" yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/application.log" "/var/log/$app/gitlab-rails/api_json.log" "/var/log/$app/gitlab-rails/production.log" "/var/log/$app/gitlab-rails/production_json.log" "/var/log/$app/gitlab-rails/sidekiq.log" "/var/log/$app/puma/puma_stderr.log" "/var/log/$app/puma/current" "/var/log/$app/alertmanager/current" "/var/log/$app/gitaly/current" "/var/log/$app/gitlab-monitor/current" "/var/log/$app/gitlab-shell/gitlab-shell.log" "/var/log/$app/gitlab-workhorse/current" "/var/log/$app/logrotate/current" "/var/log/$app/nginx/current" "/var/log/$app/nginx/access.log" "/var/log/$app/nginx/error.log" "/var/log/$app/nginx/gitlab_access.log" "/var/log/$app/nginx/gitlab_error.log" "/var/log/$app/node-exporter/current" "/var/log/$app/postgres-exporter/current" "/var/log/$app/postgresql/current" "/var/log/$app/prometheus/current" "/var/log/$app/redis/current" "/var/log/$app/redis-exporter/current"
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
@ -256,7 +262,7 @@ ynh_systemd_action --action=reload --service_name=nginx
#================================================= #=================================================
ynh_script_progression --message="Restarting gitlab..." --weight=15 ynh_script_progression --message="Restarting gitlab..." --weight=15
ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/unicorn/current" --line_match="adopted" --timeout=300 ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/puma/current" --line_match="Listening on tcp://127.0.0.1:$portPuma" --timeout=300
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT

View file

@ -16,12 +16,14 @@ ynh_script_progression --message="Loading installation settings..." --weight=2
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app="$app" --key=domain)
port=$(ynh_app_setting_get --app="$app" --key=web_port) port=$(ynh_app_setting_get --app="$app" --key=web_port)
portUnicorn=$(ynh_app_setting_get --app="$app" --key=unicorn_port) portPuma=$(ynh_app_setting_get --app="$app" --key=puma_port)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
config_path=$(ynh_app_setting_get --app=$app --key=config_path) config_path=$(ynh_app_setting_get --app=$app --key=config_path)
# Used by ynh_remove_nginx_config
domain=$(ynh_app_setting_get --app="$app" --key=domain)
#================================================= #=================================================
# STANDARD REMOVE # STANDARD REMOVE
#================================================= #=================================================
@ -84,9 +86,9 @@ if yunohost firewall list | grep -q "\- $port$"; then
ynh_exec_warn_less yunohost firewall disallow TCP $port ynh_exec_warn_less yunohost firewall disallow TCP $port
fi fi
if yunohost firewall list | grep -q "\- $portUnicorn$"; then if yunohost firewall list | grep -q "\- $portPuma$"; then
ynh_script_progression --message="Closing port $portUnicorn" --weight=1 ynh_script_progression --message="Closing port $portPuma" --weight=1
ynh_exec_warn_less yunohost firewall disallow TCP $portUnicorn ynh_exec_warn_less yunohost firewall disallow TCP $portPuma
fi fi
#================================================= #=================================================

View file

@ -33,8 +33,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path) path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
config_path=$(ynh_app_setting_get --app=$app --key=config_path) config_path=$(ynh_app_setting_get --app=$app --key=config_path)
port=$(ynh_app_setting_get --app="$app" --key=web_port) portPuma=$(ynh_app_setting_get --app="$app" --key=puma_port)
portUnicorn=$(ynh_app_setting_get --app="$app" --key=unicorn_port)
architecture=$(ynh_app_setting_get --app="$app" --key=architecture) architecture=$(ynh_app_setting_get --app="$app" --key=architecture)
#================================================= #=================================================
@ -133,7 +132,7 @@ ynh_restore_file --origin_path="/var/opt/$app/backups/last_gitlab_backup.tar"
last_backup="last" last_backup="last"
gitlab-ctl stop unicorn gitlab-ctl stop puma
gitlab-ctl stop sidekiq gitlab-ctl stop sidekiq
# Use gitlab-rake to backup # Use gitlab-rake to backup
@ -151,14 +150,14 @@ fi
# ADVERTISE SERVICE IN ADMIN PANEL # ADVERTISE SERVICE IN ADMIN PANEL
#================================================= #=================================================
yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/application.log" "/var/log/$app/gitlab-rails/api_json.log" "/var/log/$app/gitlab-rails/production.log" "/var/log/$app/gitlab-rails/production_json.log" "/var/log/$app/gitlab-rails/sidekiq.log" "/var/log/$app/unicorn/unicorn_stderr.log" "/var/log/$app/unicorn/current" "/var/log/$app/alertmanager/current" "/var/log/$app/gitaly/current" "/var/log/$app/gitlab-monitor/current" "/var/log/$app/gitlab-shell/gitlab-shell.log" "/var/log/$app/gitlab-workhorse/current" "/var/log/$app/logrotate/current" "/var/log/$app/nginx/current" "/var/log/$app/nginx/access.log" "/var/log/$app/nginx/error.log" "/var/log/$app/nginx/gitlab_access.log" "/var/log/$app/nginx/gitlab_error.log" "/var/log/$app/node-exporter/current" "/var/log/$app/postgres-exporter/current" "/var/log/$app/postgresql/current" "/var/log/$app/prometheus/current" "/var/log/$app/redis/current" "/var/log/$app/redis-exporter/current" yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/application.log" "/var/log/$app/gitlab-rails/api_json.log" "/var/log/$app/gitlab-rails/production.log" "/var/log/$app/gitlab-rails/production_json.log" "/var/log/$app/gitlab-rails/sidekiq.log" "/var/log/$app/puma/puma_stderr.log" "/var/log/$app/puma/current" "/var/log/$app/alertmanager/current" "/var/log/$app/gitaly/current" "/var/log/$app/gitlab-monitor/current" "/var/log/$app/gitlab-shell/gitlab-shell.log" "/var/log/$app/gitlab-workhorse/current" "/var/log/$app/logrotate/current" "/var/log/$app/nginx/current" "/var/log/$app/nginx/access.log" "/var/log/$app/nginx/error.log" "/var/log/$app/nginx/gitlab_access.log" "/var/log/$app/nginx/gitlab_error.log" "/var/log/$app/node-exporter/current" "/var/log/$app/postgres-exporter/current" "/var/log/$app/postgresql/current" "/var/log/$app/prometheus/current" "/var/log/$app/redis/current" "/var/log/$app/redis-exporter/current"
#================================================= #=================================================
# WAITING GITLAB # WAITING GITLAB
#================================================= #=================================================
ynh_script_progression --message="Waiting for gitlab..." --weight=14 ynh_script_progression --message="Waiting for gitlab..." --weight=14
ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/unicorn/current" --line_match="adopted" --timeout=300 ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/puma/current" --line_match="Listening on tcp://127.0.0.1:$portPuma" --timeout=300
#================================================= #=================================================
# CHECK THE RESTORED DATA # CHECK THE RESTORED DATA

View file

@ -18,15 +18,16 @@ app=$YNH_APP_INSTANCE_NAME
# Retrieve app settings # Retrieve app settings
domain=$(ynh_app_setting_get --app="$app" --key=domain) domain=$(ynh_app_setting_get --app="$app" --key=domain)
path_url=$(ynh_app_setting_get --app="$app" --key=path) path_url=$(ynh_app_setting_get --app="$app" --key=path)
admin=$(ynh_app_setting_get --app="$app" --key=admin)
is_public=$(ynh_app_setting_get --app="$app" --key=is_public) is_public=$(ynh_app_setting_get --app="$app" --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
config_path=$(ynh_app_setting_get --app=$app --key=config_path) config_path=$(ynh_app_setting_get --app=$app --key=config_path)
port=$(ynh_app_setting_get --app="$app" --key=web_port) port=$(ynh_app_setting_get --app="$app" --key=web_port)
portUnicorn=$(ynh_app_setting_get --app="$app" --key=unicorn_port) portPuma=$(ynh_app_setting_get --app="$app" --key=puma_port)
portSidekiq=$(ynh_app_setting_get --app="$app" --key=sidekiq_port) portSidekiq=$(ynh_app_setting_get --app="$app" --key=sidekiq_port)
architecture=$(ynh_app_setting_get --app="$app" --key=architecture) architecture=$(ynh_app_setting_get --app="$app" --key=architecture)
unicorn_worker_processes=$(ynh_app_setting_get --app="$app" --key=unicorn_worker_processes) puma_worker_processes=$(ynh_app_setting_get --app="$app" --key=puma_worker_processes)
puma_min_threads=$(ynh_app_setting_get --app="$app" --key=puma_min_threads)
puma_max_threads=$(ynh_app_setting_get --app="$app" --key=puma_max_threads)
client_max_body_size=$(ynh_app_setting_get --app="$app" --key=client_max_body_size) client_max_body_size=$(ynh_app_setting_get --app="$app" --key=client_max_body_size)
overwrite_nginx=$(ynh_app_setting_get --app="$app" --key=overwrite_nginx) overwrite_nginx=$(ynh_app_setting_get --app="$app" --key=overwrite_nginx)
@ -61,25 +62,24 @@ if [ -z "$config_path" ]; then
ynh_app_setting_set --app=$app --key=config_path --value=$config_path ynh_app_setting_set --app=$app --key=config_path --value=$config_path
fi fi
if [ -z "$unicorn_worker_processes" ]; then if [ -z "$puma_worker_processes" ]; then
# https://docs.gitlab.com/ce/install/requirements.html#unicorn-workers #https://docs.gitlab.com/ce/install/requirements.html#puma-workers
unicorn_worker_processes=$(($(nproc) + 1 )) puma_worker_processes=$(( $(nproc) > 2 ? $(nproc) : 2 ))
# If the server has at least 2GB of RAM # If the server has less than 2GB of RAM
if [ $(free -g --si | grep Mem: | awk '{print $2}') -ge 2 ]; then if [ $(ynh_check_ram --no_swap) -lt 2000 ]; then
# Min 3 worker processes puma_min_threads=1
unicorn_worker_processes=$(($unicorn_worker_processes>3?$unicorn_worker_processes:3)) puma_max_threads=1
else else
# 2 worker processes puma_min_threads=2
unicorn_worker_processes=2 puma_max_threads=4
fi fi
ynh_app_setting_set --app=$app --key=unicorn_worker_processes --value=$unicorn_worker_processes
fi
if [ -z "$portSidekiq" ]; then ynh_app_setting_set --app=$app --key=puma_workers --value=$puma_worker_processes
portSidekiq=$(ynh_find_port $(($portUnicorn + 1))) ynh_app_setting_set --app=$app --key=puma_max_threads --value=$puma_max_threads
ynh_app_setting_set --app=$app --key=puma_min_threads --value=$puma_min_threads
ynh_app_setting_set --app=$app --key=sidekiq_port --value=$portSidekiq ynh_app_setting_delete --app=$app --key=unicorn_worker_processes
fi fi
# If architecture doesn't exist, create it # If architecture doesn't exist, create it
@ -133,9 +133,19 @@ if [ -z "$port" ]; then
fi fi
# If port doesn't exist, retrieve it # If port doesn't exist, retrieve it
if [ -z "$portUnicorn" ]; then if [ -z "$portPuma" ]; then
portUnicorn=$(grep -F "unicorn['port']" "/etc/gitlab/gitlab.rb" | cut -d' ' -f3) if [ -z "$(ynh_app_setting_get --app="$app" --key=unicorn_port)" ]; then
ynh_app_setting_set --app=$app --key=unicorn_port --value=$portUnicorn portPuma=$(grep -F "unicorn['port']" "/etc/gitlab/gitlab.rb" | cut -d' ' -f3)
else
portPuma=$(ynh_app_setting_get --app="$app" --key=unicorn_port)
fi
ynh_app_setting_set --app=$app --key=puma_port --value=$portPuma
ynh_app_setting_delete --app=$app --key=unicorn_port
fi
if [ -z "$portSidekiq" ]; then
portSidekiq=$(ynh_find_port $(($portPuma + 1)))
ynh_app_setting_set --app=$app --key=sidekiq_port --value=$portSidekiq
fi fi
# if this source file exist, remove it # if this source file exist, remove it
@ -214,8 +224,10 @@ ssh_port=$(grep -P "Port\s+\d+" /etc/ssh/sshd_config | grep -P -o "\d+")
ynh_replace_string --match_string="__GENERATED_EXTERNAL_URL__" --replace_string="https://$domain${path_url%/}" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__GENERATED_EXTERNAL_URL__" --replace_string="https://$domain${path_url%/}" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__UNICORN_PORT__" --replace_string="$portUnicorn" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__PUMA_PORT__" --replace_string="$portPuma" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__UNICORN_WORKER_PROCESSES__" --replace_string="$unicorn_worker_processes" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__PUMA_WORKER_PROCESSES__" --replace_string="$puma_worker_processes" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__PUMA_MIN_THREADS__" --replace_string="$puma_min_threads" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__PUMA_MAX_THREADS__" --replace_string="$puma_max_threads" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__CLIENT_MAX_BODY_SIZE__" --replace_string="$client_max_body_size" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__CLIENT_MAX_BODY_SIZE__" --replace_string="$client_max_body_size" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__SSH_PORT__" --replace_string="$ssh_port" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__SSH_PORT__" --replace_string="$ssh_port" --target_file="$config_path/gitlab.rb"
ynh_replace_string --match_string="__SIDEKIQ_PORT__" --replace_string="$portSidekiq" --target_file="$config_path/gitlab.rb" ynh_replace_string --match_string="__SIDEKIQ_PORT__" --replace_string="$portSidekiq" --target_file="$config_path/gitlab.rb"
@ -241,7 +253,22 @@ then
# Load the last available version # Load the last available version
source ./upgrade.d/upgrade.last.sh source ./upgrade.d/upgrade.last.sh
last_version=$gitlab_version last_version=$gitlab_version
last_major_version=${gitlab_version%%.*}
source_current_major_version () {
if [ -e "./upgrade.d/upgrade.$current_major_version.first.sh" ]; then
source ./upgrade.d/upgrade.$current_major_version.first.sh
elif [ -e "./upgrade.d/upgrade.$current_major_version.last.sh" ]; then
source ./upgrade.d/upgrade.$current_major_version.last.sh
# Finish with the last migration if the file doesn't exist
else
source ./upgrade.d/upgrade.last.sh
fi
}
# To update gitlab from major version A to B, we have to go to the last minor version
# of the major version A and then go to the first minor version of the major version B
# to finally go to the current minor version of the major version B
# A.last -> B.first -> B.last
# While the current version is not the last version, do an upgrade # While the current version is not the last version, do an upgrade
while [ "$last_version" != "$current_version" ] while [ "$last_version" != "$current_version" ]
@ -249,17 +276,23 @@ then
current_major_version=${current_version%%.*} current_major_version=${current_version%%.*}
# If the current version is equal to the last minor version of upgrade.$current_major_version.sh, increment the major version source_current_major_version
if [ "$gitlab_version" = "$current_version" ]; then
current_major_version=$(($current_major_version + 1)) # if the version stored in the upgrade.$current_major_version.first.sh file is less than or equal
# to the current version, and if the version stored in the upgrade.$current_major_version.last.sh file
# increment the major version to upgrade to the next version
if dpkg --compare-versions "$gitlab_version" "le" "$current_version"; then
if [ -e "./upgrade.d/upgrade.$current_major_version.last.sh" ]; then
source ./upgrade.d/upgrade.$current_major_version.last.sh
else
source ./upgrade.d/upgrade.last.sh
fi
if dpkg --compare-versions "$gitlab_version" "le" "$current_version"; then
current_major_version=$(($current_major_version + 1))
source_current_major_version
fi
fi fi
# Finish with the last migration if the file doesn't exist
if [ ! -e "./upgrade.d/upgrade.$current_major_version.sh" ]; then
current_major_version=last
fi
source ./upgrade.d/upgrade.$current_major_version.sh
cp ../conf/$architecture.src.default ../conf/$architecture.src cp ../conf/$architecture.src.default ../conf/$architecture.src
ynh_replace_string --match_string="__VERSION__" --replace_string="$gitlab_version" --target_file="../conf/$architecture.src" ynh_replace_string --match_string="__VERSION__" --replace_string="$gitlab_version" --target_file="../conf/$architecture.src"
ynh_replace_string --match_string="__SOURCE_FILENAME__" --replace_string="$gitlab_filename" --target_file="../conf/$architecture.src" ynh_replace_string --match_string="__SOURCE_FILENAME__" --replace_string="$gitlab_filename" --target_file="../conf/$architecture.src"
@ -305,7 +338,7 @@ fi
# ADVERTISE SERVICE IN ADMIN PANEL # ADVERTISE SERVICE IN ADMIN PANEL
#================================================= #=================================================
yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/application.log" "/var/log/$app/gitlab-rails/api_json.log" "/var/log/$app/gitlab-rails/production.log" "/var/log/$app/gitlab-rails/production_json.log" "/var/log/$app/gitlab-rails/sidekiq.log" "/var/log/$app/unicorn/unicorn_stderr.log" "/var/log/$app/unicorn/current" "/var/log/$app/alertmanager/current" "/var/log/$app/gitaly/current" "/var/log/$app/gitlab-monitor/current" "/var/log/$app/gitlab-shell/gitlab-shell.log" "/var/log/$app/gitlab-workhorse/current" "/var/log/$app/logrotate/current" "/var/log/$app/nginx/current" "/var/log/$app/nginx/access.log" "/var/log/$app/nginx/error.log" "/var/log/$app/nginx/gitlab_access.log" "/var/log/$app/nginx/gitlab_error.log" "/var/log/$app/node-exporter/current" "/var/log/$app/postgres-exporter/current" "/var/log/$app/postgresql/current" "/var/log/$app/prometheus/current" "/var/log/$app/redis/current" "/var/log/$app/redis-exporter/current" yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/application.log" "/var/log/$app/gitlab-rails/api_json.log" "/var/log/$app/gitlab-rails/production.log" "/var/log/$app/gitlab-rails/production_json.log" "/var/log/$app/gitlab-rails/sidekiq.log" "/var/log/$app/puma/puma_stderr.log" "/var/log/$app/puma/current" "/var/log/$app/alertmanager/current" "/var/log/$app/gitaly/current" "/var/log/$app/gitlab-monitor/current" "/var/log/$app/gitlab-shell/gitlab-shell.log" "/var/log/$app/gitlab-workhorse/current" "/var/log/$app/logrotate/current" "/var/log/$app/nginx/current" "/var/log/$app/nginx/access.log" "/var/log/$app/nginx/error.log" "/var/log/$app/nginx/gitlab_access.log" "/var/log/$app/nginx/gitlab_error.log" "/var/log/$app/node-exporter/current" "/var/log/$app/postgres-exporter/current" "/var/log/$app/postgresql/current" "/var/log/$app/prometheus/current" "/var/log/$app/redis/current" "/var/log/$app/redis-exporter/current"
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
@ -325,7 +358,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Restarting gitlab..." --weight=15 ynh_script_progression --message="Restarting gitlab..." --weight=15
ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/unicorn/current" --line_match="adopted" --timeout=300 ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/puma/current" --line_match="Listening on tcp://127.0.0.1:$portPuma" --timeout=300
fi fi
#================================================= #=================================================

View file

@ -0,0 +1,25 @@
gitlab_version="12.10.9"
# sha256sum found here: https://packages.gitlab.com/gitlab
gitlab_x86_64_debian_version="$(lsb_release -sc)"
if [ "$gitlab_x86_64_debian_version" = "buster" ]
then
gitlab_x86_64_source_sha256="09b87fa74ee1c0c6fec6b01fea1dfe76f31be89bb3fc761c89552250b462cd49"
else
gitlab_x86_64_source_sha256="c80a72d87cbc1c0f0acb919afa2930b1b1b016b1e0478d09e03bbedc12948960"
fi
gitlab_arm_source_sha256="c8632f81b94bec91caf8e912070d846a4f9e165f46d7a84ecae83a4ae12d5cda"
gitlab_filename="gitlab-ce-${gitlab_version}.deb"
# Action to do in case of failure of the package_check
package_check_action() {
local sysctl_file="$final_path/embedded/cookbooks/package/resources/gitlab_sysctl.rb"
ynh_replace_string --match_string="command \"sysctl -e \(.*\)\"" --replace_string="command \"sysctl -e \1 || true\"" --target_file=$sysctl_file
sysctl_file="/opt/gitlab/embedded/cookbooks/package/recipes/sysctl.rb"
ynh_replace_string --match_string="command \"sysctl -e \(.*\)\"" --replace_string="command \"sysctl -e \1 || true\"" --target_file=$sysctl_file
}

View file

@ -1,17 +1,17 @@
gitlab_version="12.10.1" gitlab_version="13.0.4"
# sha256sum found here: https://packages.gitlab.com/gitlab # sha256sum found here: https://packages.gitlab.com/gitlab
if [ "$(lsb_release -sc)" = "buster" ]
then
gitlab_x86_64_source_sha256="4efd4599cecbcdbe4c03acabf8a678da7a1c0f3fe44270dc115128f87704a29c"
else
gitlab_x86_64_source_sha256="114e616b8fad94efcd7bcecd7b69d49c42384d6599ff49809c1951e3007afc9c"
fi
gitlab_x86_64_debian_version="$(lsb_release -sc)" gitlab_x86_64_debian_version="$(lsb_release -sc)"
gitlab_arm_source_sha256="cc52de7777e0a970be20bc3386144a2d2bb0e9aaaa8906e567a4ab0cd638288e" if [ "$gitlab_x86_64_debian_version" = "buster" ]
then
gitlab_x86_64_source_sha256="a98cdf17d2231b4ef1b4a4e2b743b0701aab6702552fad9c60d92e2c2928fc43"
else
gitlab_x86_64_source_sha256="e806c80281f7b5b7c00a7c342072b137aa1fdf06db934855babee4d168c2fd2b"
fi
gitlab_arm_source_sha256="5e85e991bb1554ce5fa967e978c0b6870675df3cec2a99e8c4c5dabc28b94967"
gitlab_filename="gitlab-ce-${gitlab_version}.deb" gitlab_filename="gitlab-ce-${gitlab_version}.deb"