mirror of
https://github.com/YunoHost-Apps/gitlab_ynh.git
synced 2024-09-03 18:36:35 +02:00
commit
8029eb7a64
13 changed files with 250 additions and 144 deletions
32
README.md
32
README.md
|
@ -1,46 +1,50 @@
|
|||
# Gitlab for Yunohost
|
||||
# GitLab for YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/gitlab)  
|
||||
[](https://install-app.yunohost.org/?app=gitlab)
|
||||
[](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
|
||||
|
||||
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.4
|
||||
**Shipped version:** 13.1.0
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||

|
||||
|
||||
## 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 - [](https://ci-apps.yunohost.org/ci/apps/gitlab/)
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/gitlab/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/gitlab/)
|
||||
* Jessie x86-64b - [](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
|
||||
|
|
68
README_fr.md
Normal file
68
README_fr.md
Normal file
|
@ -0,0 +1,68 @@
|
|||
# GitLab pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/gitlab)  
|
||||
[](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.1.0
|
||||
|
||||
## Captures d'écran
|
||||
|
||||

|
||||
|
||||
## 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 - [](https://ci-apps.yunohost.org/ci/apps/gitlab/)
|
||||
* ARMv8-A - [](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
|
||||
```
|
|
@ -103,6 +103,17 @@ external_url '__GENERATED_EXTERNAL_URL__'
|
|||
# gitlab_rails['gitlab_username_changing_enabled'] = true
|
||||
|
||||
### Default Theme
|
||||
### Available values:
|
||||
##! `1` for Indigo
|
||||
##! `2` for Dark
|
||||
##! `3` for Light
|
||||
##! `4` for Blue
|
||||
##! `5` for Green
|
||||
##! `6` for Light Indigo
|
||||
##! `7` for Light Blue
|
||||
##! `8` for Light Green
|
||||
##! `9` for Red
|
||||
##! `10` for Light Red
|
||||
# gitlab_rails['gitlab_default_theme'] = 2
|
||||
|
||||
### Default project feature settings
|
||||
|
@ -792,7 +803,7 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__
|
|||
##! Long polling duration for job requesting for runners
|
||||
# gitlab_workhorse['api_ci_long_polling_duration'] = "60s"
|
||||
|
||||
##! Log format: default is text, can also be json or none.
|
||||
##! Log format: default is json, can also be text or none.
|
||||
# gitlab_workhorse['log_format'] = "json"
|
||||
|
||||
# gitlab_workhorse['env_directory'] = "/opt/gitlab/etc/gitlab-workhorse/env"
|
||||
|
@ -827,7 +838,7 @@ gitlab_rails['gitlab_shell_ssh_port'] = __SSH_PORT__
|
|||
##! Docs: https://docs.gitlab.com/omnibus/settings/unicorn.html
|
||||
################################################################################
|
||||
|
||||
unicorn['enable'] = false
|
||||
# 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
|
||||
|
@ -960,6 +971,12 @@ sidekiq['listen_port'] = __SIDEKIQ_PORT__
|
|||
# postgresql['enable'] = true
|
||||
# postgresql['listen_address'] = nil
|
||||
# postgresql['port'] = 5432
|
||||
|
||||
## Only used when Patroni is enabled. This is the port that PostgreSQL responds to other
|
||||
## cluster members. This port is used by Patroni to advertize the PostgreSQL connection
|
||||
## endpoint to the cluster. By default it is the same as postgresql['port'].
|
||||
# postgresql['connect_port'] = 5432
|
||||
|
||||
# postgresql['data_dir'] = "/var/opt/gitlab/postgresql/data"
|
||||
|
||||
##! **recommend value is 1/4 of total RAM, up to 14GB.**
|
||||
|
@ -1286,7 +1303,7 @@ nginx['listen_https'] = false
|
|||
# nginx['gzip_http_version'] = "1.0"
|
||||
# nginx['gzip_comp_level'] = "2"
|
||||
# nginx['gzip_proxied'] = "any"
|
||||
# nginx['gzip_types'] = [ "text/html", "text/plain", "text/css", "application/x-javascript", "text/xml", "application/xml", "application/xml+rss", "text/javascript", "application/json" ]
|
||||
# nginx['gzip_types'] = [ "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
|
||||
|
@ -1437,9 +1454,6 @@ nginx['listen_https'] = false
|
|||
##! Listen for requests forwarded by reverse proxy
|
||||
# gitlab_pages['listen_proxy'] = "localhost:8090"
|
||||
|
||||
##! Configure GitLab Pages to use an HTTP Proxy
|
||||
# gitlab_pages['http_proxy'] = "http://example:8080"
|
||||
|
||||
# gitlab_pages['redirect_http'] = true
|
||||
# gitlab_pages['use_http2'] = true
|
||||
# gitlab_pages['dir'] = "/var/opt/gitlab/gitlab-pages"
|
||||
|
@ -1917,11 +1931,11 @@ nginx['listen_https'] = false
|
|||
# praefect['wrapper_path'] = "/opt/gitlab/embedded/bin/gitaly-wrapper"
|
||||
# praefect['virtual_storage_name'] = "praefect"
|
||||
# praefect['failover_enabled'] = false
|
||||
# praefect['failover_election_strategy'] = 'local'
|
||||
# praefect['failover_election_strategy'] = 'sql'
|
||||
# praefect['failover_read_only_after_failover'] = true
|
||||
# praefect['auth_token'] = ""
|
||||
# praefect['auth_transitioning'] = false
|
||||
# praefect['listen_addr'] = "localhost:2305"
|
||||
# praefect['postgres_queue_enabled'] = false
|
||||
# praefect['prometheus_listen_addr'] = "localhost:9652"
|
||||
# praefect['prometheus_grpc_latency_buckets'] = "[0.001, 0.005, 0.025, 0.1, 0.5, 1.0, 10.0, 30.0, 60.0, 300.0, 1500.0]"
|
||||
# praefect['logging_level'] = "warn"
|
||||
|
@ -2168,7 +2182,7 @@ nginx['listen_https'] = false
|
|||
# gitlab_rails['geo_node_name'] = nil
|
||||
|
||||
# gitlab_rails['geo_registry_replication_enabled'] = true
|
||||
# gitlab_rails['geo_registry_replication_primary_api_url'] = 'https://example.com:5000'
|
||||
# gitlab_rails['geo_registry_replication_primary_api_url'] = 'https://example.com:5050'
|
||||
|
||||
|
||||
################################################################################
|
||||
|
@ -2372,6 +2386,63 @@ nginx['listen_https'] = false
|
|||
# repmgr['daemon'] = true
|
||||
# repmgrd['enable'] = true
|
||||
|
||||
################################################################################
|
||||
# Patroni (EE only)
|
||||
#
|
||||
# NOTICE: Patroni is an experimental feature and subject to change.
|
||||
#
|
||||
################################################################################
|
||||
# patroni['enable'] = false
|
||||
|
||||
# patroni['dir'] = '/var/opt/gitlab/patroni'
|
||||
# patroni['data_dir'] = '/var/opt/gitlab/patroni/data'
|
||||
# patroni['ctl_command'] = '/opt/gitlab/embedded/bin/patronictl'
|
||||
|
||||
# patroni['scope'] = 'gitlab-postgresql-ha'
|
||||
# patroni['name'] = nil
|
||||
|
||||
# patroni['log_directory'] = '/var/log/gitlab/patroni'
|
||||
# patroni['log_level'] = 'INFO'
|
||||
|
||||
# patroni['consul']['url'] = 'http://127.0.0.1:8500'
|
||||
# patroni['consul']['service_check_interval'] = '10s'
|
||||
# patroni['consul']['register_service'] = false
|
||||
# patroni['consul']['checks'] = []
|
||||
|
||||
## Bootstrap settings
|
||||
# patroni['loop_wait'] = 10
|
||||
# patroni['ttl'] = 30
|
||||
# patroni['retry_timeout'] = 10
|
||||
# patroni['maximum_lag_on_failover'] = 1_048_576
|
||||
# patroni['max_timelines_history'] = 0
|
||||
# patroni['master_start_timeout'] = 300
|
||||
|
||||
## PostgreSQL configuration override
|
||||
# patroni['postgresql']['wal_level'] = 'replica'
|
||||
# patroni['postgresql']['hot_standby'] = 'on'
|
||||
# patroni['postgresql']['wal_keep_segments'] = 8
|
||||
# patroni['postgresql']['max_wal_senders'] = 5
|
||||
# patroni['postgresql']['max_replication_slots'] = 5
|
||||
# patroni['postgresql']['checkpoint_timeout'] = 30
|
||||
|
||||
# patroni['use_pg_rewind'] = false
|
||||
# patroni['use_slots'] = true
|
||||
|
||||
## The address and port that Patroni API binds to and listens on.
|
||||
# patroni['listen_address'] = nil
|
||||
# patroni['port'] = '8008'
|
||||
|
||||
## The address of the Patroni node that is advertized to other cluster
|
||||
## members to communicate with its API and PostgreSQL. If it is not specified,
|
||||
## it tries to use the first available private IP and falls back to the default
|
||||
## network interface.
|
||||
# patroni['connect_address'] = nil
|
||||
|
||||
## The port that Patroni API responds to other cluster members. This port is
|
||||
## advertized and by default is the same as patroni['port'].
|
||||
# patroni['connect_port'] = '8008'
|
||||
|
||||
|
||||
################################################################################
|
||||
# Consul (EEP only)
|
||||
################################################################################
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "Gitlab",
|
||||
"id": "gitlab",
|
||||
"packaging_format": 1,
|
||||
"version": "13.0.4~ynh1",
|
||||
"version": "13.1.0~ynh1",
|
||||
"description": {
|
||||
"en": "Git-repository manager.",
|
||||
"fr": "Gestionnaire de dépôts Git."
|
||||
|
@ -14,7 +14,7 @@
|
|||
"email": "pierre@kayou.io"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.6.0"
|
||||
"yunohost": ">= 3.8.1"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
|
|
|
@ -101,74 +101,3 @@ ynh_is_main_device_a_sd_card () {
|
|||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Check the amount of available RAM
|
||||
#
|
||||
# usage: ynh_check_ram [--required=RAM required in Mb] [--no_swap|--only_swap] [--free_ram]
|
||||
# | arg: -r, --required= - Amount of RAM required in Mb. The helper will return 0 is there's enough RAM, or 1 otherwise.
|
||||
# If --required isn't set, the helper will print the amount of RAM, in Mb.
|
||||
# | arg: -s, --no_swap - Ignore swap
|
||||
# | arg: -o, --only_swap - Ignore real RAM, consider only swap.
|
||||
# | arg: -f, --free_ram - Count only free RAM, not the total amount of RAM available.
|
||||
ynh_check_ram () {
|
||||
# Declare an array to define the options of this helper.
|
||||
declare -Ar args_array=( [r]=required= [s]=no_swap [o]=only_swap [f]=free_ram )
|
||||
local required
|
||||
local no_swap
|
||||
local only_swap
|
||||
# Manage arguments with getopts
|
||||
ynh_handle_getopts_args "$@"
|
||||
required=${required:-}
|
||||
no_swap=${no_swap:-0}
|
||||
only_swap=${only_swap:-0}
|
||||
|
||||
local total_ram=$(vmstat --stats --unit M | grep "total memory" | awk '{print $1}')
|
||||
local total_swap=$(vmstat --stats --unit M | grep "total swap" | awk '{print $1}')
|
||||
local total_ram_swap=$(( total_ram + total_swap ))
|
||||
|
||||
local free_ram=$(vmstat --stats --unit M | grep "free memory" | awk '{print $1}')
|
||||
local free_swap=$(vmstat --stats --unit M | grep "free swap" | awk '{print $1}')
|
||||
local free_ram_swap=$(( free_ram + free_swap ))
|
||||
|
||||
# Use the total amount of ram
|
||||
local ram=$total_ram_swap
|
||||
if [ $free_ram -eq 1 ]
|
||||
then
|
||||
# Use the total amount of free ram
|
||||
ram=$free_ram_swap
|
||||
if [ $no_swap -eq 1 ]
|
||||
then
|
||||
# Use only the amount of free ram
|
||||
ram=$free_ram
|
||||
elif [ $only_swap -eq 1 ]
|
||||
then
|
||||
# Use only the amount of free swap
|
||||
ram=$free_swap
|
||||
fi
|
||||
else
|
||||
if [ $no_swap -eq 1 ]
|
||||
then
|
||||
# Use only the amount of free ram
|
||||
ram=$total_ram
|
||||
elif [ $only_swap -eq 1 ]
|
||||
then
|
||||
# Use only the amount of free swap
|
||||
ram=$total_swap
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$required" ]
|
||||
then
|
||||
# Return 1 if the amount of ram isn't enough.
|
||||
if [ $ram -lt $required ]
|
||||
then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
|
||||
# If no RAM is required, return the amount of available ram.
|
||||
else
|
||||
echo $ram
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
puma_worker_processes=$(( $(nproc) > 2 ? $(nproc) : 2 ))
|
||||
|
||||
# If the server has less than 2GB of RAM
|
||||
if [ $(ynh_check_ram --no_swap) -lt 2000 ]; then
|
||||
if [ $(ynh_get_ram --total --ignore_swap) -lt 2000 ]; then
|
||||
puma_min_threads=1
|
||||
puma_max_threads=1
|
||||
else
|
||||
|
@ -123,8 +123,8 @@ ynh_app_setting_set --app=$app --key=puma_min_threads --value=$puma_min_threads
|
|||
# ADD SWAP IF NEEDED
|
||||
#=================================================
|
||||
|
||||
total_memory=$(ynh_check_ram)
|
||||
total_swap=$(ynh_check_ram --only_swap)
|
||||
total_memory=$(ynh_get_ram --total)
|
||||
total_swap=$(ynh_get_ram --total --only_swap)
|
||||
swap_needed=0
|
||||
|
||||
# https://docs.gitlab.com/ce/install/requirements.html#memory
|
||||
|
|
|
@ -66,8 +66,8 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
# ADD SWAP IF NEEDED
|
||||
#=================================================
|
||||
|
||||
total_memory=$(ynh_check_ram)
|
||||
total_swap=$(ynh_check_ram --only_swap)
|
||||
total_memory=$(ynh_get_ram --total)
|
||||
total_swap=$(ynh_get_ram --total --only_swap)
|
||||
swap_needed=0
|
||||
|
||||
# https://docs.gitlab.com/ce/install/requirements.html#memory
|
||||
|
|
|
@ -67,7 +67,7 @@ if [ -z "$puma_worker_processes" ]; then
|
|||
puma_worker_processes=$(( $(nproc) > 2 ? $(nproc) : 2 ))
|
||||
|
||||
# If the server has less than 2GB of RAM
|
||||
if [ $(ynh_check_ram --no_swap) -lt 2000 ]; then
|
||||
if [ $(ynh_get_ram --total --ignore_swap) -lt 2000 ]; then
|
||||
puma_min_threads=1
|
||||
puma_max_threads=1
|
||||
else
|
||||
|
@ -191,8 +191,8 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
# ADD SWAP IF NEEDED
|
||||
#=================================================
|
||||
|
||||
total_memory=$(ynh_check_ram)
|
||||
total_swap=$(ynh_check_ram --only_swap)
|
||||
total_memory=$(ynh_get_ram --total)
|
||||
total_swap=$(ynh_get_ram --total --only_swap)
|
||||
swap_needed=0
|
||||
|
||||
# https://docs.gitlab.com/ce/install/requirements.html#memory
|
||||
|
@ -209,34 +209,6 @@ fi
|
|||
ynh_script_progression --message="Adding $swap_needed Mo to swap..." --weight=1
|
||||
ynh_add_swap --size=$swap_needed
|
||||
|
||||
#=================================================
|
||||
# PRECONFIGURE GITLAB
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Preconfigure gitlab..." --weight=1
|
||||
|
||||
ynh_backup_if_checksum_is_different --file="$config_path/gitlab.rb"
|
||||
|
||||
mkdir -p $config_path
|
||||
|
||||
cp -f ../conf/gitlab.rb "$config_path/gitlab.rb"
|
||||
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="__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"
|
||||
|
||||
ynh_store_file_checksum --file="$config_path/gitlab.rb"
|
||||
|
||||
touch "$config_path/gitlab-persistent.rb"
|
||||
chown admin: "$config_path/gitlab-persistent.rb"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
@ -320,6 +292,35 @@ then
|
|||
done
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# RECONFIGURE GITLAB
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reconfigure gitlab..." --weight=13
|
||||
|
||||
ynh_backup_if_checksum_is_different --file="$config_path/gitlab.rb"
|
||||
|
||||
mkdir -p $config_path
|
||||
|
||||
cp -f ../conf/gitlab.rb "$config_path/gitlab.rb"
|
||||
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="__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"
|
||||
|
||||
ynh_store_file_checksum --file="$config_path/gitlab.rb"
|
||||
|
||||
touch "$config_path/gitlab-persistent.rb"
|
||||
chown admin: "$config_path/gitlab-persistent.rb"
|
||||
|
||||
gitlab-ctl reconfigure
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
gitlab_version="11.11.5"
|
||||
|
||||
# There is no buster version for gitlab 11.X
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# It's required to upgrade to the latest 12.0.x version before to another 12.X verion.
|
||||
gitlab_version="12.0.12"
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
gitlab_version="12.10.9"
|
||||
#!/bin/bash
|
||||
|
||||
gitlab_version="12.10.11"
|
||||
|
||||
# sha256sum found here: https://packages.gitlab.com/gitlab
|
||||
|
||||
|
@ -6,12 +8,12 @@ gitlab_x86_64_debian_version="$(lsb_release -sc)"
|
|||
|
||||
if [ "$gitlab_x86_64_debian_version" = "buster" ]
|
||||
then
|
||||
gitlab_x86_64_source_sha256="09b87fa74ee1c0c6fec6b01fea1dfe76f31be89bb3fc761c89552250b462cd49"
|
||||
gitlab_x86_64_source_sha256="1e5564604ddeb6bd8b152856e81a01230b5c66e41e1c07ac9f9f7c4593245b3c"
|
||||
else
|
||||
gitlab_x86_64_source_sha256="c80a72d87cbc1c0f0acb919afa2930b1b1b016b1e0478d09e03bbedc12948960"
|
||||
gitlab_x86_64_source_sha256="75bff35148b64cf08cd428103c5fc90b597b5f20b4feede38019bdcaa33a3fda"
|
||||
fi
|
||||
|
||||
gitlab_arm_source_sha256="c8632f81b94bec91caf8e912070d846a4f9e165f46d7a84ecae83a4ae12d5cda"
|
||||
gitlab_arm_source_sha256="07581f11cf2c76fe00afb7577df14fec86af1aa9c5ea6b3aea4997397e5915c6"
|
||||
|
||||
gitlab_filename="gitlab-ce-${gitlab_version}.deb"
|
||||
|
||||
|
|
27
scripts/upgrade.d/upgrade.13.first.sh
Normal file
27
scripts/upgrade.d/upgrade.13.first.sh
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
gitlab_version="13.0.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="91a3486de88d1f0ce108d0f0c9adafc83e24c678e5ce2750ec8d52d75e467c1d"
|
||||
else
|
||||
gitlab_x86_64_source_sha256="175df478d80d15cbc19b69dee0c312058ba0530bed34f13050a25bb5b280315c"
|
||||
fi
|
||||
|
||||
gitlab_arm_source_sha256="cfd4f0f72ec2068d1566dd8699adedef210ada30644885e0d74beded3dd1b2b3"
|
||||
|
||||
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
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
gitlab_version="13.0.4"
|
||||
#!/bin/bash
|
||||
|
||||
gitlab_version="13.1.0"
|
||||
|
||||
# sha256sum found here: https://packages.gitlab.com/gitlab
|
||||
|
||||
|
@ -6,12 +8,14 @@ gitlab_x86_64_debian_version="$(lsb_release -sc)"
|
|||
|
||||
if [ "$gitlab_x86_64_debian_version" = "buster" ]
|
||||
then
|
||||
gitlab_x86_64_source_sha256="a98cdf17d2231b4ef1b4a4e2b743b0701aab6702552fad9c60d92e2c2928fc43"
|
||||
else
|
||||
gitlab_x86_64_source_sha256="e806c80281f7b5b7c00a7c342072b137aa1fdf06db934855babee4d168c2fd2b"
|
||||
fi
|
||||
gitlab_x86_64_source_sha256="0ea54906b2f29f0bfcc9d4cad99ea399966055b1418633d0f62d46aea020877d"
|
||||
|
||||
gitlab_arm_source_sha256="5e85e991bb1554ce5fa967e978c0b6870675df3cec2a99e8c4c5dabc28b94967"
|
||||
gitlab_arm_source_sha256="2f7b2cc169a6de6152abf927214ee47f26634a5fa24ee55535ba7bb5074fd2b5"
|
||||
else
|
||||
gitlab_x86_64_source_sha256="c16d69de22fa701dbb4755756544c839ae82a519ac3516901f644add89ff1767"
|
||||
|
||||
gitlab_arm_source_sha256="f24b6f085b1b1a426a277085b51f17d6821aaca8ff12dd888b4d294ecb9fef68"
|
||||
fi
|
||||
|
||||
gitlab_filename="gitlab-ce-${gitlab_version}.deb"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue