summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2019-08-01 15:03:08 +0300
committerValery Sizov <valery@gitlab.com>2019-08-01 20:38:07 +0300
commitf519a4b72f81a1e3c81e5e684d236bbe30e0dd2d (patch)
tree469cbc073884f0a8f30ae7fd474b699c4ac47c13 /config
parentbeb7d8922746942f1f4108108b04859ba61ea1ea (diff)
downloadgitlab-ce-f519a4b72f81a1e3c81e5e684d236bbe30e0dd2d.tar.gz
Backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3809ce-docker_image_replication
Introducing Docker Registry replication
Diffstat (limited to 'config')
-rw-r--r--config/gitlab.yml.example5
-rw-r--r--config/initializers/0_inflections.rb1
-rw-r--r--config/initializers/1_settings.rb9
3 files changed, 15 insertions, 0 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index dd53127ac2c..39b719a5978 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -427,6 +427,11 @@ production: &base
# If it is blank, it defaults to external_url.
node_name: ''
+ registry_replication:
+ # enabled: true
+ # primary_api_url: http://localhost:5000/ # internal address to the primary registry, will be used by GitLab to directly communicate with primary registry API
+
+
#
# 2. GitLab CI settings
# ==========================
diff --git a/config/initializers/0_inflections.rb b/config/initializers/0_inflections.rb
index 4d1f4917275..d317825c1b8 100644
--- a/config/initializers/0_inflections.rb
+++ b/config/initializers/0_inflections.rb
@@ -19,6 +19,7 @@ ActiveSupport::Inflector.inflections do |inflect|
project_registry
file_registry
job_artifact_registry
+ container_repository_registry
vulnerability_feedback
vulnerabilities_feedback
group_view
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 32fec7c3d22..659801f787d 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -296,6 +296,12 @@ Gitlab.ee do
Settings['geo'] ||= Settingslogic.new({})
# For backwards compatibility, default to gitlab_url and if so, ensure it ends with "/"
Settings.geo['node_name'] = Settings.geo['node_name'].presence || Settings.gitlab['url'].chomp('/').concat('/')
+
+ #
+ # Registry replication
+ #
+ Settings.geo['registry_replication'] ||= Settingslogic.new({})
+ Settings.geo.registry_replication['enabled'] ||= false
end
#
@@ -473,6 +479,9 @@ Gitlab.ee do
Settings.cron_jobs['geo_repository_verification_secondary_scheduler_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['geo_repository_verification_secondary_scheduler_worker']['cron'] ||= '*/1 * * * *'
Settings.cron_jobs['geo_repository_verification_secondary_scheduler_worker']['job_class'] ||= 'Geo::RepositoryVerification::Secondary::SchedulerWorker'
+ Settings.cron_jobs['geo_container_repository_sync_worker'] ||= Settingslogic.new({})
+ Settings.cron_jobs['geo_container_repository_sync_worker']['cron'] ||= '*/1 * * * *'
+ Settings.cron_jobs['geo_container_repository_sync_worker']['job_class'] ||= 'Geo::ContainerRepositorySyncDispatchWorker'
Settings.cron_jobs['historical_data_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['historical_data_worker']['cron'] ||= '0 12 * * *'
Settings.cron_jobs['historical_data_worker']['job_class'] = 'HistoricalDataWorker'