From 38ad738d716e097564d8a4f06ad9da21db1e2b63 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 6 May 2020 11:08:54 +0200 Subject: [PATCH 01/13] 12.10.3 --- README.md | 2 +- conf/gitlab.rb | 50 +++++++++++++++++++++++++++---- manifest.json | 2 +- scripts/upgrade.d/upgrade.last.sh | 18 +++++------ 4 files changed, 56 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index a37597e..3419ec6 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to 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:** 12.10.3 ## Screenshots diff --git a/conf/gitlab.rb b/conf/gitlab.rb index 66c2677..129e484 100644 --- a/conf/gitlab.rb +++ b/conf/gitlab.rb @@ -95,6 +95,7 @@ external_url '__GENERATED_EXTERNAL_URL__' # 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_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_rails['gitlab_default_can_create_group'] = true @@ -476,7 +477,9 @@ EOS # 'provider' => 'AWS', # 'region' => 'eu-west-1', # '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_multipart_chunk_size'] = 104857600 @@ -567,8 +570,6 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__ ### GitLab application settings # 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. ####! **Only applicable on initial setup, changing these settings after database @@ -1921,6 +1922,7 @@ nginx['listen_https'] = false # } # praefect['sentry_dsn'] = "https://:@sentry.io/" # praefect['sentry_environment'] = "production" +# praefect['auto_migrate'] = true # praefect['database_host'] = 'postgres.internal' # praefect['database_port'] = 5432 # praefect['database_user'] = 'praefect' @@ -2158,8 +2160,8 @@ nginx['listen_https'] = false ## GitLab Geo ##! Docs: https://docs.gitlab.com/ee/gitlab-geo ################################################################################ -# geo_primary_role['enable'] = false -# geo_secondary_role['enable'] = false +##! Geo roles 'geo_primary_role' and 'geo_secondary_role' are set above with +##! 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. # For example, if external_url is the same for two secondaries, you must specify @@ -2417,5 +2419,43 @@ nginx['listen_https'] = false # 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' diff --git a/manifest.json b/manifest.json index cc75e7c..da6d722 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name": "Gitlab", "id": "gitlab", "packaging_format": 1, - "version": "12.10.1~ynh1", + "version": "12.10.3~ynh1", "description": { "en": "Git-repository manager.", "fr": "Gestionnaire de dépôts Git." diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index cbe4d72..c173b3f 100644 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -1,17 +1,17 @@ -gitlab_version="12.10.1" +gitlab_version="12.10.3" # 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_arm_source_sha256="cc52de7777e0a970be20bc3386144a2d2bb0e9aaaa8906e567a4ab0cd638288e" +if [ "$gitlab_x86_64_debian_version" = "buster" ] +then + gitlab_x86_64_source_sha256="dcb8b3b770aa7645f6485d877915e4075da214185f631560df270cfe6de89f0d" +else + gitlab_x86_64_source_sha256="f25c1b15a64eb74209185074363f58cc9082102210c7ef7434a6c82f39b1ffb6" +fi + +gitlab_arm_source_sha256="898bd6492f04846113babe7db95b82dfcf1cf6974fe63482231d8a723e2928fb" gitlab_filename="gitlab-ce-${gitlab_version}.deb" From f41f3b2bb17c37b724aedf9380e6462d2e04ee66 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 12 May 2020 14:11:01 +0200 Subject: [PATCH 02/13] Fix upgrade --- check_process | 6 ++++++ manifest.json | 2 +- scripts/upgrade | 7 ++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/check_process b/check_process index 45a2323..a42a051 100644 --- a/check_process +++ b/check_process @@ -16,6 +16,7 @@ setup_public=1 upgrade=1 upgrade=1 from_commit=2cc84310aeff7055342b445c1aee01d4183d5ae2 + upgrade=1 from_commit=7c352aff3fb13fc425d76716477c28db5d54ac99 backup_restore=1 multi_instance=0 port_already_use=1 (8080) @@ -25,3 +26,8 @@ ;;; Options Email= Notification=none +;;; Upgrade options + ; commit=2cc84310aeff7055342b445c1aee01d4183d5ae2 + name=Upgrade 11.6.3 + ; commit=7c352aff3fb13fc425d76716477c28db5d54ac99 + name=Upgrade 12.9.2 \ No newline at end of file diff --git a/manifest.json b/manifest.json index da6d722..ba01a3b 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name": "Gitlab", "id": "gitlab", "packaging_format": 1, - "version": "12.10.3~ynh1", + "version": "12.10.3~ynh2", "description": { "en": "Git-repository manager.", "fr": "Gestionnaire de dépôts Git." diff --git a/scripts/upgrade b/scripts/upgrade index 8d8bc37..502e13d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -241,7 +241,6 @@ then # Load the last available version source ./upgrade.d/upgrade.last.sh last_version=$gitlab_version - last_major_version=${gitlab_version%%.*} # While the current version is not the last version, do an upgrade while [ "$last_version" != "$current_version" ] @@ -249,8 +248,10 @@ then 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 - if [ "$gitlab_version" = "$current_version" ]; then + source ./upgrade.d/upgrade.$current_major_version.sh + + # f the current version is higher than the version stored in upgrade.$current_major_version.sh, increment the major version + if dpkg --compare-versions "$gitlab_version" "le" "$current_version"; then current_major_version=$(($current_major_version + 1)) fi From 64ed0b32f015d0cf9ff5a189422f2291ccaee503 Mon Sep 17 00:00:00 2001 From: Kayou Date: Tue, 12 May 2020 17:16:46 +0200 Subject: [PATCH 03/13] Update check_process --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index a42a051..a4705b6 100644 --- a/check_process +++ b/check_process @@ -28,6 +28,6 @@ Email= Notification=none ;;; Upgrade options ; commit=2cc84310aeff7055342b445c1aee01d4183d5ae2 - name=Upgrade 11.6.3 + name=11.6.3 ; commit=7c352aff3fb13fc425d76716477c28db5d54ac99 - name=Upgrade 12.9.2 \ No newline at end of file + name=12.9.2 From 677037d02507dc519d1f6c538adce5200764df76 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 13 May 2020 10:14:20 +0200 Subject: [PATCH 04/13] improves comments --- scripts/upgrade | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 502e13d..226be90 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -250,7 +250,8 @@ then source ./upgrade.d/upgrade.$current_major_version.sh - # f the current version is higher than the version stored in upgrade.$current_major_version.sh, increment the major version + # if the version stored in the upgrade.$current_major_version.sh file is less than or equal + # to the current version, increment the major version to upgrade to the next version if dpkg --compare-versions "$gitlab_version" "le" "$current_version"; then current_major_version=$(($current_major_version + 1)) fi From ea67cf647f815d890787cfa9c55fb72100efa1f4 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sat, 23 May 2020 01:04:34 +0200 Subject: [PATCH 05/13] [WIP] 13.0.0 --- README.md | 2 +- conf/gitlab.rb | 161 ++++++++++++++++++++++----------------------- manifest.json | 6 +- scripts/_common.sh | 2 +- scripts/backup | 3 +- scripts/change_url | 17 +++-- scripts/install | 42 +++++++----- scripts/remove | 9 ++- scripts/restore | 9 ++- 9 files changed, 128 insertions(+), 123 deletions(-) diff --git a/README.md b/README.md index 3419ec6..56bdaee 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to 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.3 +**Shipped version:** 13.0.0 ## Screenshots diff --git a/conf/gitlab.rb b/conf/gitlab.rb index 129e484..520295e 100644 --- a/conf/gitlab.rb +++ b/conf/gitlab.rb @@ -48,7 +48,8 @@ external_url '__GENERATED_EXTERNAL_URL__' ## Roles for multi-instance GitLab ##! The default is to have no roles enabled, which results in GitLab running as an all-in-one instance. ##! 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: ##! https://docs.gitlab.com/omnibus/roles/README.html#roles ##! @@ -238,6 +239,8 @@ external_url '__GENERATED_EXTERNAL_URL__' # gitlab_rails['incoming_email_idle_timeout'] = 60 ####! The file name for internal `mail_room` JSON logfile # 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 # mailroom['exit_log_format'] = "plain" @@ -557,13 +560,6 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__ # '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.** # gitlab_rails['dir'] = "/var/opt/gitlab/gitlab-rails" # gitlab_rails['log_directory'] = "/var/log/gitlab/gitlab-rails" @@ -753,6 +749,12 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__ # gitlab_rails['sentry_clientside_dsn'] = 'https://@sentry.io/' # 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 ##! Docs: https://gitlab.com/gitlab-org/gitlab-workhorse/blob/master/README.md @@ -825,15 +827,15 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__ ##! Docs: https://docs.gitlab.com/omnibus/settings/unicorn.html ################################################################################ -# unicorn['enable'] = true +unicorn['enable'] = false # unicorn['worker_timeout'] = 60 ###! Minimum worker_processes is 2 at this moment ###! See https://gitlab.com/gitlab-org/gitlab-foss/issues/18771 -unicorn['worker_processes'] = __UNICORN_WORKER_PROCESSES__ +# unicorn['worker_processes'] = 2 ### Advanced settings # unicorn['listen'] = 'localhost' -unicorn['port'] = __UNICORN_PORT__ +# unicorn['port'] = 8080 # unicorn['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket' # unicorn['pidfile'] = '/opt/gitlab/var/unicorn/unicorn.pid' # unicorn['tcp_nopush'] = true @@ -861,16 +863,16 @@ unicorn['port'] = __UNICORN_PORT__ ##! Docs: https://docs.gitlab.com/omnibus/settings/puma.html ################################################################################ -# puma['enable'] = false +puma['enable'] = true # puma['ha'] = false # puma['worker_timeout'] = 60 -# puma['worker_processes'] = 2 -# puma['min_threads'] = 4 -# puma['max_threads'] = 4 +puma['worker_processes'] = __PUMA_WORKER_PROCESSES__ +puma['min_threads'] = __PUMA_MIN_THREADS__ +puma['max_threads'] = __PUMA_MAX_THREADS__ ### Advanced settings # puma['listen'] = '127.0.0.1' -# puma['port'] = 8080 +puma['port'] = __PUMA_PORT__ # puma['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket' # puma['pidfile'] = '/opt/gitlab/var/puma/puma.pid' # puma['state_path'] = '/opt/gitlab/var/puma/puma.state' @@ -890,25 +892,35 @@ unicorn['port'] = __UNICORN_PORT__ ## 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_format'] = "json" # 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['listen_address'] = "localhost" 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 ################################################################################ @@ -985,7 +997,7 @@ sidekiq['listen_port'] = __SIDEKIQ_PORT__ # postgresql['hot_standby'] = "off" ### 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_ciphers'] = 'HIGH:MEDIUM:+3DES:!aNULL:!SSLv3:!TLSv1' # postgresql['ssl_cert_file'] = 'server.crt' @@ -1067,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 ### Version settings @@ -1108,11 +1120,11 @@ sidekiq['listen_port'] = __SIDEKIQ_PORT__ # ###! **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 ###! https://docs.gitlab.com/ee/administration/high_availability/redis.html # redis_master_role['enable'] = true -# redis_slave_role['enable'] = true +# redis_replica_role['enable'] = true ### Redis TCP support (will disable UNIX socket transport) # redis['bind'] = '0.0.0.0' # or specify an IP to bind to a single one @@ -1120,35 +1132,35 @@ sidekiq['listen_port'] = __SIDEKIQ_PORT__ # redis['password'] = 'redis-password-goes-here' ### 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 ###! caveats:** ###! Docs: https://docs.gitlab.com/ee/administration/high_availability/redis.html ### Replication support -#### Slave Redis instance +#### Replica Redis instance # 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 ####! heartbeat monitoring** # redis['master_name'] = 'gitlab-redis' # redis['master_ip'] = nil # 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 # redis['announce_ip'] = nil # redis['announce_port'] = nil ####! **Master password should have the same value defined in ####! 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' -####! 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_slave'] = '256mb 64mb 60' +# redis['client_output_buffer_limit_replica'] = '256mb 64mb 60' # redis['client_output_buffer_limit_pubsub'] = '32mb 8mb 60' #####! Redis snapshotting frequency @@ -1266,7 +1278,7 @@ nginx['listen_https'] = false # nginx['log_directory'] = "/var/log/gitlab/nginx" # nginx['worker_processes'] = 4 # 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['tcp_nopush'] = 'on' # nginx['tcp_nodelay'] = 'on' @@ -1274,7 +1286,7 @@ nginx['listen_https'] = false # nginx['gzip_http_version'] = "1.0" # nginx['gzip_comp_level'] = "2" # 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['cache_max_size'] = '5000m' # nginx['server_names_hash_bucket_size'] = 64 @@ -1456,6 +1468,7 @@ nginx['listen_https'] = false # 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['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 API HTTP client connection timeout @@ -1788,6 +1801,7 @@ nginx['listen_https'] = false # grafana['metrics_enabled'] = false # grafana['metrics_basic_auth_username'] = 'grafana_metrics' # default: nil # grafana['metrics_basic_auth_password'] = 'please_set_a_unique_password' # default: nil +# grafana['alerting_enabled'] = false ### Dashboards # @@ -1842,7 +1856,12 @@ nginx['listen_https'] = false # gitaly['env_directory'] = "/opt/gitlab/etc/gitaly/env" # gitaly['env'] = { # '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, @@ -1887,6 +1906,15 @@ nginx['listen_https'] = 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['failover_enabled'] = false # praefect['failover_election_strategy'] = 'local' @@ -2104,52 +2132,21 @@ nginx['listen_https'] = false ##! already tried against the same master by a given Sentinel, is two ##! 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 ##! with the right master, is exactly the failover timeout (counting since ##! the moment a Sentinel detected the misconfiguration). ##! ##! - The time needed to cancel a failover that is already in progress but -##! did not produced any configuration change (SLAVEOF NO ONE yet not -##! acknowledged by the promoted slave). +##! did not produced any configuration change (REPLICAOF NO ONE yet not +##! acknowledged by the promoted replica). ##! -##! - The maximum time a failover in progress waits for all the slaves to be -##! reconfigured as slaves of the new master. However even after this time -##! the slaves will be reconfigured by the Sentinels anyway, but not with +##! - The maximum time a failover in progress waits for all the replicas to be +##! reconfigured as replicas of the new master. However even after this time +##! the replicas will be reconfigured by the Sentinels anyway, but not with ##! the exact parallel-syncs progression as specified. # 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) ##! Docs: https://docs.gitlab.com/ee/administration/database_load_balancing.html @@ -2161,7 +2158,7 @@ nginx['listen_https'] = false ##! Docs: https://docs.gitlab.com/ee/gitlab-geo ################################################################################ ##! Geo roles 'geo_primary_role' and 'geo_secondary_role' are set above with -##! other roles. For more information, see: https://docs.gitlab.com/omnibus/roles/README.html#roles. +##! 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. # For example, if external_url is the same for two secondaries, you must specify @@ -2209,7 +2206,9 @@ nginx['listen_https'] = false ################################################################################ ## 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_url'] = nil diff --git a/manifest.json b/manifest.json index ba01a3b..20feff5 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name": "Gitlab", "id": "gitlab", "packaging_format": 1, - "version": "12.10.3~ynh2", + "version": "13.0.0~ynh1", "description": { "en": "Git-repository manager.", "fr": "Gestionnaire de dépôts Git." @@ -38,8 +38,8 @@ "en": "Choose a path for gitlab", "fr": "Choisissez un chemin pour gitlab" }, - "example": "/", - "default": "/" + "example": "/gitlab", + "default": "/gitlab" }, { "name": "admin", diff --git a/scripts/_common.sh b/scripts/_common.sh index a7ba0f4..3bf74f9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # SET ALL CONSTANTS #================================================= -pkg_dependencies="openssh-server bc" +pkg_dependencies="openssh-server" #================================================= # EXPERIMENTAL HELPERS diff --git a/scripts/backup b/scripts/backup index 895d95e..32523cb 100644 --- a/scripts/backup +++ b/scripts/backup @@ -28,7 +28,6 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 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) 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 -# 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 filename: https://docs.gitlab.com/ce/raketasks/backup_restore.html#backup-filename gitlab-backup create BACKUP=last diff --git a/scripts/change_url b/scripts/change_url index b30f1e3..80c4f41 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -27,12 +27,13 @@ app=$YNH_APP_INSTANCE_NAME ynh_script_progression --message="Loading installation settings..." --weight=1 # 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) 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) -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) #================================================= @@ -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 - gitlab-ctl stop unicorn + gitlab-ctl stop puma gitlab-ctl stop sidekiq # 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="__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="__UNICORN_WORKER_PROCESSES__" --replace_string="$unicorn_worker_processes" --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="__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="__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" @@ -124,7 +127,7 @@ gitlab-ctl reconfigure #================================================= 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 diff --git a/scripts/install b/scripts/install index 5d59fc5..ae14bb8 100644 --- a/scripts/install +++ b/scripts/install @@ -85,11 +85,11 @@ ynh_script_progression --message="Find internal port..." --weight=1 # Find free ports port=$(ynh_find_port --port=8080) -portUnicorn=$(ynh_find_port --port=$(($port + 1))) -portSidekiq=$(ynh_find_port --port=$(($portUnicorn + 1))) +portPuma=$(ynh_find_port --port=$(($port + 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=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 #================================================= @@ -103,19 +103,21 @@ ynh_install_app_dependencies $pkg_dependencies # DEFINE THE NUMBER OF WORKERS USED #================================================= -# https://docs.gitlab.com/ce/install/requirements.html#unicorn-workers -unicorn_worker_processes=$(bc <<< "($(nproc) * 1.5 + 1) / 1") +#https://docs.gitlab.com/ce/install/requirements.html#puma-workers +puma_worker_processes=$(( $(nproc) > 2 ? $(nproc) : 2 )) -# If the server has at least 2GB of RAM -if [ $(ynh_check_ram --no_swap) -ge 2000 ]; then - # Min 3 worker processes - unicorn_worker_processes=$(($unicorn_worker_processes>3?$unicorn_worker_processes:3)) +# If the server has less than 2GB of RAM +if [ $(ynh_check_ram --no_swap) -lt 2000 ]; then + puma_min_threads=1 + puma_max_threads=1 else - # 2 worker processes - unicorn_worker_processes=2 + puma_min_threads=2 + puma_max_threads=4 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 @@ -136,8 +138,10 @@ if [ $(($total_swap + $swap_needed)) -lt 2048 ]; then swap_needed=$((2048 - $total_swap)) fi -ynh_script_progression --message="Adding $swap_needed Mo to swap..." --weight=1 -ynh_add_swap --size=$swap_needed +if [ $swap_needed -gt 0 ]; then + ynh_script_progression --message="Adding $swap_needed Mo to swap..." + ynh_add_swap --size=$swap_needed +fi #================================================= # 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="__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="__UNICORN_WORKER_PROCESSES__" --replace_string="$unicorn_worker_processes" --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="__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="__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" @@ -231,7 +237,7 @@ gitlab-ctl reconfigure # 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 @@ -256,7 +262,7 @@ ynh_systemd_action --action=reload --service_name=nginx #================================================= 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 diff --git a/scripts/remove b/scripts/remove index c79bc79..c2c8ba3 100644 --- a/scripts/remove +++ b/scripts/remove @@ -16,9 +16,8 @@ ynh_script_progression --message="Loading installation settings..." --weight=2 app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app="$app" --key=domain) 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) config_path=$(ynh_app_setting_get --app=$app --key=config_path) @@ -84,9 +83,9 @@ if yunohost firewall list | grep -q "\- $port$"; then ynh_exec_warn_less yunohost firewall disallow TCP $port fi -if yunohost firewall list | grep -q "\- $portUnicorn$"; then - ynh_script_progression --message="Closing port $portUnicorn" --weight=1 - ynh_exec_warn_less yunohost firewall disallow TCP $portUnicorn +if yunohost firewall list | grep -q "\- $portPuma$"; then + ynh_script_progression --message="Closing port $portPuma" --weight=1 + ynh_exec_warn_less yunohost firewall disallow TCP $portPuma fi #================================================= diff --git a/scripts/restore b/scripts/restore index 2e78b15..adc9e3b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -33,8 +33,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) config_path=$(ynh_app_setting_get --app=$app --key=config_path) -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) 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" -gitlab-ctl stop unicorn +gitlab-ctl stop puma gitlab-ctl stop sidekiq # Use gitlab-rake to backup @@ -151,14 +150,14 @@ fi # 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 #================================================= 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 From 21c6f76ef2a815796d784b8cf0cafbb125f981ae Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sat, 23 May 2020 02:07:01 +0200 Subject: [PATCH 06/13] Upgrade to 13.0.0 --- scripts/upgrade | 90 ++++++++++++------- .../{upgrade.11.sh => upgrade.11.last.sh} | 0 .../{upgrade.12.sh => upgrade.12.first.sh} | 0 scripts/upgrade.d/upgrade.12.last.sh | 25 ++++++ scripts/upgrade.d/upgrade.last.sh | 8 +- 5 files changed, 87 insertions(+), 36 deletions(-) rename scripts/upgrade.d/{upgrade.11.sh => upgrade.11.last.sh} (100%) rename scripts/upgrade.d/{upgrade.12.sh => upgrade.12.first.sh} (100%) create mode 100644 scripts/upgrade.d/upgrade.12.last.sh diff --git a/scripts/upgrade b/scripts/upgrade index 226be90..c702141 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,15 +18,16 @@ app=$YNH_APP_INSTANCE_NAME # Retrieve app settings domain=$(ynh_app_setting_get --app="$app" --key=domain) 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) final_path=$(ynh_app_setting_get --app=$app --key=final_path) config_path=$(ynh_app_setting_get --app=$app --key=config_path) 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) 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) 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 fi -if [ -z "$unicorn_worker_processes" ]; then - # https://docs.gitlab.com/ce/install/requirements.html#unicorn-workers - unicorn_worker_processes=$(($(nproc) + 1 )) +if [ -z "$puma_worker_processes" ]; then + #https://docs.gitlab.com/ce/install/requirements.html#puma-workers + puma_worker_processes=$(( $(nproc) > 2 ? $(nproc) : 2 )) - # If the server has at least 2GB of RAM - if [ $(free -g --si | grep Mem: | awk '{print $2}') -ge 2 ]; then - # Min 3 worker processes - unicorn_worker_processes=$(($unicorn_worker_processes>3?$unicorn_worker_processes:3)) + # If the server has less than 2GB of RAM + if [ $(ynh_check_ram --no_swap) -lt 2000 ]; then + puma_min_threads=1 + puma_max_threads=1 else - # 2 worker processes - unicorn_worker_processes=2 + puma_min_threads=2 + puma_max_threads=4 fi - ynh_app_setting_set --app=$app --key=unicorn_worker_processes --value=$unicorn_worker_processes -fi -if [ -z "$portSidekiq" ]; then - portSidekiq=$(ynh_find_port $(($portUnicorn + 1))) - - ynh_app_setting_set --app=$app --key=sidekiq_port --value=$portSidekiq + 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 + + ynh_app_setting_delete --app=$app --key=unicorn_worker_processes fi # If architecture doesn't exist, create it @@ -133,9 +133,17 @@ if [ -z "$port" ]; then fi # If port doesn't exist, retrieve it -if [ -z "$portUnicorn" ]; then - portUnicorn=$(grep -F "unicorn['port']" "/etc/gitlab/gitlab.rb" | cut -d' ' -f3) - ynh_app_setting_set --app=$app --key=unicorn_port --value=$portUnicorn +if [ -z "$portPuma" ]; then + if [ -z "$(ynh_app_setting_get --app="$app" --key=unicorn_port)" ]; then + portPuma=$(grep -F "unicorn['port']" "/etc/gitlab/gitlab.rb" | cut -d' ' -f3) + 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 # if this source file exist, remove it @@ -214,8 +222,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="__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="__UNICORN_WORKER_PROCESSES__" --replace_string="$unicorn_worker_processes" --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="__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="__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" @@ -242,26 +252,42 @@ then source ./upgrade.d/upgrade.last.sh last_version=$gitlab_version + # 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 [ "$last_version" != "$current_version" ] do current_major_version=${current_version%%.*} - source ./upgrade.d/upgrade.$current_major_version.sh + 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 + fi - # if the version stored in the upgrade.$current_major_version.sh file is less than or equal - # to the current version, increment the major version to upgrade to the next version + # 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 - current_major_version=$(($current_major_version + 1)) + 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)) + 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 + if [ ! -e "./upgrade.d/upgrade.$current_major_version.first.sh" ] && [ ! -e "./upgrade.d/upgrade.$current_major_version.last.sh" ]; then + source ./upgrade.d/upgrade.last.sh fi - source ./upgrade.d/upgrade.$current_major_version.sh 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="__SOURCE_FILENAME__" --replace_string="$gitlab_filename" --target_file="../conf/$architecture.src" @@ -307,7 +333,7 @@ fi # 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 @@ -327,7 +353,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then 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 #================================================= diff --git a/scripts/upgrade.d/upgrade.11.sh b/scripts/upgrade.d/upgrade.11.last.sh similarity index 100% rename from scripts/upgrade.d/upgrade.11.sh rename to scripts/upgrade.d/upgrade.11.last.sh diff --git a/scripts/upgrade.d/upgrade.12.sh b/scripts/upgrade.d/upgrade.12.first.sh similarity index 100% rename from scripts/upgrade.d/upgrade.12.sh rename to scripts/upgrade.d/upgrade.12.first.sh diff --git a/scripts/upgrade.d/upgrade.12.last.sh b/scripts/upgrade.d/upgrade.12.last.sh new file mode 100644 index 0000000..f0eca8a --- /dev/null +++ b/scripts/upgrade.d/upgrade.12.last.sh @@ -0,0 +1,25 @@ +gitlab_version="12.10.6" + +# 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="8305869246a70fb033fda3ba533f7b3459e7a044c0777dbc0215d868d73a22e6" +else + gitlab_x86_64_source_sha256="f7c5a76bbb3cd192328be09832cce81d85847f22e97677c46087d5d1b8234cba" +fi + +gitlab_arm_source_sha256="2e44c2c96cb6f381565f68814657b2ac73f11609601d16d4de6c539a53bb358f" + +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 +} diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index c173b3f..28da331 100644 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -1,4 +1,4 @@ -gitlab_version="12.10.3" +gitlab_version="13.0.0" # sha256sum found here: https://packages.gitlab.com/gitlab @@ -6,12 +6,12 @@ gitlab_x86_64_debian_version="$(lsb_release -sc)" if [ "$gitlab_x86_64_debian_version" = "buster" ] then - gitlab_x86_64_source_sha256="dcb8b3b770aa7645f6485d877915e4075da214185f631560df270cfe6de89f0d" + gitlab_x86_64_source_sha256="4322ea81b30118a1616765abf34bf6ed9442675bac91d027babfc31d97938fe9" else - gitlab_x86_64_source_sha256="f25c1b15a64eb74209185074363f58cc9082102210c7ef7434a6c82f39b1ffb6" + gitlab_x86_64_source_sha256="71bf1a95739f78131eb23e016d663e18954758d00a8960ec811067287e5bd797" fi -gitlab_arm_source_sha256="898bd6492f04846113babe7db95b82dfcf1cf6974fe63482231d8a723e2928fb" +gitlab_arm_source_sha256="bb98a9a282c3c712abc4f5f45d761e949a0347afd9288cfd24ce7529182de30e" gitlab_filename="gitlab-ce-${gitlab_version}.deb" From 20c097738250453eee582bbd15f353342fab0b3f Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sat, 23 May 2020 20:33:47 +0200 Subject: [PATCH 07/13] fix upgrade --- scripts/upgrade | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index c702141..31fb681 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -252,6 +252,14 @@ then source ./upgrade.d/upgrade.last.sh last_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 + 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 @@ -263,11 +271,7 @@ then current_major_version=${current_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 - fi + source_current_major_version # 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 @@ -280,6 +284,7 @@ then fi if dpkg --compare-versions "$gitlab_version" "le" "$current_version"; then current_major_version=$(($current_major_version + 1)) + source_current_major_version fi fi From b1a3ac3c6ddd7f501c7b52ae6c4b696895b5011d Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sat, 23 May 2020 23:08:49 +0200 Subject: [PATCH 08/13] fix portPuma migration --- scripts/upgrade | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 31fb681..e5c1a2e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -136,6 +136,8 @@ fi if [ -z "$portPuma" ]; then if [ -z "$(ynh_app_setting_get --app="$app" --key=unicorn_port)" ]; then 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 @@ -259,7 +261,7 @@ then source ./upgrade.d/upgrade.$current_major_version.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 From a1ea2bac5dc7a08c0e8a334deb3a9793a2bf8d0c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sat, 30 May 2020 17:07:36 +0200 Subject: [PATCH 09/13] simplify upgrade script --- scripts/upgrade | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e5c1a2e..0605a7e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -259,6 +259,9 @@ 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 } @@ -290,11 +293,6 @@ then fi fi - # Finish with the last migration if the file doesn't exist - if [ ! -e "./upgrade.d/upgrade.$current_major_version.first.sh" ] && [ ! -e "./upgrade.d/upgrade.$current_major_version.last.sh" ]; then - source ./upgrade.d/upgrade.last.sh - fi - 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="__SOURCE_FILENAME__" --replace_string="$gitlab_filename" --target_file="../conf/$architecture.src" From f40845e5ab65e22255a36e43b8fd10e3edbf10c6 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 4 Jun 2020 10:05:13 +0200 Subject: [PATCH 10/13] 13.0.4 --- README.md | 2 +- manifest.json | 2 +- scripts/upgrade.d/upgrade.12.last.sh | 8 ++++---- scripts/upgrade.d/upgrade.last.sh | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 56bdaee..e3ab117 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to 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:** 13.0.0 +**Shipped version:** 13.0.4 ## Screenshots diff --git a/manifest.json b/manifest.json index 20feff5..7034e4d 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name": "Gitlab", "id": "gitlab", "packaging_format": 1, - "version": "13.0.0~ynh1", + "version": "13.0.4~ynh1", "description": { "en": "Git-repository manager.", "fr": "Gestionnaire de dépôts Git." diff --git a/scripts/upgrade.d/upgrade.12.last.sh b/scripts/upgrade.d/upgrade.12.last.sh index f0eca8a..0e1e218 100644 --- a/scripts/upgrade.d/upgrade.12.last.sh +++ b/scripts/upgrade.d/upgrade.12.last.sh @@ -1,4 +1,4 @@ -gitlab_version="12.10.6" +gitlab_version="12.10.9" # sha256sum found here: https://packages.gitlab.com/gitlab @@ -6,12 +6,12 @@ gitlab_x86_64_debian_version="$(lsb_release -sc)" if [ "$gitlab_x86_64_debian_version" = "buster" ] then - gitlab_x86_64_source_sha256="8305869246a70fb033fda3ba533f7b3459e7a044c0777dbc0215d868d73a22e6" + gitlab_x86_64_source_sha256="09b87fa74ee1c0c6fec6b01fea1dfe76f31be89bb3fc761c89552250b462cd49" else - gitlab_x86_64_source_sha256="f7c5a76bbb3cd192328be09832cce81d85847f22e97677c46087d5d1b8234cba" + gitlab_x86_64_source_sha256="c80a72d87cbc1c0f0acb919afa2930b1b1b016b1e0478d09e03bbedc12948960" fi -gitlab_arm_source_sha256="2e44c2c96cb6f381565f68814657b2ac73f11609601d16d4de6c539a53bb358f" +gitlab_arm_source_sha256="c8632f81b94bec91caf8e912070d846a4f9e165f46d7a84ecae83a4ae12d5cda" gitlab_filename="gitlab-ce-${gitlab_version}.deb" diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 28da331..e79c9bf 100644 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -1,4 +1,4 @@ -gitlab_version="13.0.0" +gitlab_version="13.0.4" # sha256sum found here: https://packages.gitlab.com/gitlab @@ -6,12 +6,12 @@ gitlab_x86_64_debian_version="$(lsb_release -sc)" if [ "$gitlab_x86_64_debian_version" = "buster" ] then - gitlab_x86_64_source_sha256="4322ea81b30118a1616765abf34bf6ed9442675bac91d027babfc31d97938fe9" + gitlab_x86_64_source_sha256="a98cdf17d2231b4ef1b4a4e2b743b0701aab6702552fad9c60d92e2c2928fc43" else - gitlab_x86_64_source_sha256="71bf1a95739f78131eb23e016d663e18954758d00a8960ec811067287e5bd797" + gitlab_x86_64_source_sha256="e806c80281f7b5b7c00a7c342072b137aa1fdf06db934855babee4d168c2fd2b" fi -gitlab_arm_source_sha256="bb98a9a282c3c712abc4f5f45d761e949a0347afd9288cfd24ce7529182de30e" +gitlab_arm_source_sha256="5e85e991bb1554ce5fa967e978c0b6870675df3cec2a99e8c4c5dabc28b94967" gitlab_filename="gitlab-ce-${gitlab_version}.deb" From b2819f7da8a7889daff86633f5c769eb8be98ad2 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 4 Jun 2020 13:37:12 +0200 Subject: [PATCH 11/13] fix remove script --- scripts/remove | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/remove b/scripts/remove index c2c8ba3..4665184 100644 --- a/scripts/remove +++ b/scripts/remove @@ -21,6 +21,9 @@ portPuma=$(ynh_app_setting_get --app="$app" --key=puma_port) final_path=$(ynh_app_setting_get --app=$app --key=final_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 #================================================= From 0ef8aef093ed7acaca4a47a72640fff6eef29f53 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 8 Jun 2020 17:46:46 +0200 Subject: [PATCH 12/13] update README --- README.md | 28 +++++++++++----------- README_fr.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 14 deletions(-) create mode 100644 README_fr.md diff --git a/README.md b/README.md index e3ab117..cb0d154 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ -# 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) -[![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.* ## Overview @@ -18,29 +20,31 @@ GitLab is a web-based Git-repository manager providing wiki, issue-tracking and ## Configuration -How to configure this app: -- An admin panel -- The file: `/etc/gitlab/gitlab-persistent.rb` (use `sudo gitlab-ctl reconfigure` after any modification of this file) +How to configure GitLab: + +- 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 * Official documentation: https://docs.gitlab.com/ce/README.html + * YunoHost documentation: https://yunohost.org/#/app_gitlab ## YunoHost specific features #### 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 -* 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/) -* 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 -* Not compatible with a 32-bit architecture. +* GitLab is not compatible with 32-bit architectures. ## Links @@ -54,7 +58,6 @@ Yes with LDAP support. 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). 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 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 diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..9144311 --- /dev/null +++ b/README_fr.md @@ -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/thumb/9/9a/GitLab_running_11.0_%282018-07%29.png/300px-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 +``` From 11b9744cd39669c10032d68fe5c441b81bdb2c11 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 8 Jun 2020 17:50:32 +0200 Subject: [PATCH 13/13] bigger screenshots --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cb0d154..cee6dcf 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ GitLab is a web-based Git-repository manager providing wiki, issue-tracking and ## 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 diff --git a/README_fr.md b/README_fr.md index 9144311..05cd680 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,7 +16,7 @@ GitLab est un gestionnaire Web de dépôt Git fournissant des fonctionnalités d ## Captures d'écran -![](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