Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Strokov <pstrokov@gitlab.com>2021-01-22 13:31:45 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2021-01-22 13:31:45 +0300
commit34e7fc836a06b1144769bfe7152c9cf7724c344e (patch)
tree3a48fe403baff1b4787423d25f5ea8e349234c80
parent7126dd77f843fc6fd14c7fd24824be46ea21405a (diff)
parentcd1f35eda4cc065d81021006968eb4906f5a968e (diff)
Merge branch 'zj-remove-docker-image-gen' into 'master'
docker: Remove image generation See merge request gitlab-org/gitaly!3039
-rw-r--r--.gitlab-ci.yml39
-rw-r--r--Dockerfile22
-rw-r--r--_support/build-images/versioned/Dockerfile11
-rw-r--r--_support/instrumented-cluster/docker-compose.yml66
-rw-r--r--_support/instrumented-cluster/gitaly1/config.toml29
-rw-r--r--_support/instrumented-cluster/gitaly1repos/setup.sh3
-rw-r--r--_support/instrumented-cluster/prom/prometheus.yml15
-rw-r--r--_support/test-cluster/.gitignore3
-rw-r--r--_support/test-cluster/README.md15
-rw-r--r--_support/test-cluster/app1/etc-gitlab/gitlab.rb19
-rw-r--r--_support/test-cluster/docker-compose.yml28
-rw-r--r--_support/test-cluster/gitaly1/etc-gitlab/gitlab.rb25
-rw-r--r--_support/test-cluster/gitaly2/etc-gitlab/gitlab.rb28
13 files changed, 0 insertions, 303 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6dd413357..0480fcd34 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -193,45 +193,6 @@ cover:
reports:
cobertura: _build/cover/cobertura.xml
-.build_image: &build_image
- stage: publish
- image: docker:latest
- tags:
- - gitlab-org-docker
- services:
- - docker:dind
-
-docker:
- <<: *build_image
- script:
- - mkdir -p _support/build-images/$CI_JOB_NAME/
- - cp ruby/Gemfile ruby/Gemfile.lock _support/build-images/$CI_JOB_NAME/
- - cp _support/build-images/versioned/Dockerfile _support/build-images/$CI_JOB_NAME/
- - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- - docker build -t $CI_REGISTRY_IMAGE/gitaly:latest --build-arg CUSTOM_IMAGE_VERSION=$CUSTOM_IMAGE_VERSION _support/build-images/$CI_JOB_NAME
- - docker push $CI_REGISTRY_IMAGE/gitaly:latest
- only:
- refs:
- - master@gitlab-org/gitaly
- variables:
- - $CI_PIPELINE_SOURCE != "schedule"
- except:
-
-docker-tag:
- <<: *build_image
- script:
- - mkdir -p _support/build-images/$CI_JOB_NAME/
- - cp ruby/Gemfile ruby/Gemfile.lock _support/build-images/$CI_JOB_NAME/
- - cp _support/build-images/versioned/Dockerfile _support/build-images/$CI_JOB_NAME/
- - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- - docker build -t $CI_REGISTRY_IMAGE/gitaly:$CI_COMMIT_TAG --build-arg CUSTOM_IMAGE_VERSION=$CUSTOM_IMAGE_VERSION _support/build-images/$CI_JOB_NAME
- - docker push $CI_REGISTRY_IMAGE/gitaly:$CI_COMMIT_TAG
- only:
- refs:
- - tags@gitlab-org/gitaly
- variables:
- - $CI_PIPELINE_SOURCE != "schedule"
-
gosec-sast:
before_script:
- apk add pkgconfig libgit2-dev gcc libc-dev
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index ad5f1904e..000000000
--- a/Dockerfile
+++ /dev/null
@@ -1,22 +0,0 @@
-# This will create a docker image for Gitaly that is suitable for testing, but
-# is not expected to be used in a production environment, yet.
-#
-# See the _support/load-cluster/docker-compose.yml for an example of how to use
-# this image
-#
-FROM registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7-golang-1.14-git-2.29
-
-RUN mkdir -p /app/ruby
-
-COPY ./ruby/Gemfile /app/ruby/
-COPY ./ruby/Gemfile.lock /app/ruby/
-
-ENV DEBIAN_FRONTEND noninteractive
-RUN apt-get update -qq && \
- apt-get install -qq -y rubygems bundler cmake build-essential libicu-dev && \
- cd /app/ruby && bundle install --path vendor/bundle && \
- rm -rf /var/lib/apt/lists/*
-
-COPY . /app
-
-CMD ["/app/bin/gitaly", "/app/config/config.toml"]
diff --git a/_support/build-images/versioned/Dockerfile b/_support/build-images/versioned/Dockerfile
deleted file mode 100644
index ca25a8dc6..000000000
--- a/_support/build-images/versioned/Dockerfile
+++ /dev/null
@@ -1,11 +0,0 @@
-ARG CUSTOM_IMAGE_VERSION
-FROM registry.gitlab.com/gitlab-org/gitlab-build-images:${CUSTOM_IMAGE_VERSION}
-
-RUN mkdir -p /bundle-cache
-
-COPY ./Gemfile /bundle-cache
-COPY ./Gemfile.lock /bundle-cache
-
-RUN DEBIAN_FRONTEND=noninteractive apt-get update -qq && \
- DEBIAN_FRONTEND=noninteractive apt-get install -qq -y rubygems bundler cmake build-essential libicu-dev && \
- cd /bundle-cache && bundle install --path vendor/bundle
diff --git a/_support/instrumented-cluster/docker-compose.yml b/_support/instrumented-cluster/docker-compose.yml
deleted file mode 100644
index c711d3dc6..000000000
--- a/_support/instrumented-cluster/docker-compose.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-version: "2.4"
-
-services:
- gitaly1repos:
- image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7-golang-1.14-git-2.27
- volumes:
- - gitalydata1:/repositories
- - ./gitaly1repos/setup.sh:/setup.sh
- restart: 'no'
- command: bash /setup.sh
-
- gitaly1:
- image: gitlab/gitaly:latest
- ports:
- - "9999:9999"
- - "9236:9236"
- environment:
- - TZ=UTC
- volumes:
- - ./gitaly1/config.toml:/app/config/config.toml
- volumes_from:
- - gitaly1repos
- cpus: 0.5
- mem_limit: 200m
- restart: unless-stopped
-
- cadvisor:
- image: google/cadvisor:latest
- volumes:
- - /:/rootfs:ro
- - /var/run:/var/run:rw
- - /sys:/sys:ro
- - /var/lib/docker/:/var/lib/docker:ro
- ports:
- - 8080:8080
- restart: unless-stopped
-
- prometheus:
- image: prom/prometheus
- volumes:
- - promdata:/prometheus
- - ./prom/prometheus.yml:/etc/prometheus/prometheus.yml
- ports:
- - 9090:9090
- links:
- - gitaly1
- - cadvisor
- restart: unless-stopped
-
- grafana:
- image: grafana/grafana
- volumes:
- - grafdata:/var/lib/grafana
- ports:
- - 3000:3000
- links:
- - prometheus
- restart: unless-stopped
-
-volumes:
- gitalydata1:
- driver: local
- grafdata:
- driver: local
- promdata:
- driver: local
diff --git a/_support/instrumented-cluster/gitaly1/config.toml b/_support/instrumented-cluster/gitaly1/config.toml
deleted file mode 100644
index 73a4ed7c7..000000000
--- a/_support/instrumented-cluster/gitaly1/config.toml
+++ /dev/null
@@ -1,29 +0,0 @@
-listen_addr = ":9999"
-prometheus_listen_addr = ":9236"
-bin_dir = "/app/bin"
-
-# # Git executable settings
-[git]
-bin_path = "/usr/local/bin/git"
-
-[[storage]]
-name = "default"
-path = "/repositories/"
-
-# # You can optionally configure Gitaly to record histogram latencies on GRPC method calls
-[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]
-
-[gitaly-ruby]
-# The directory where gitaly-ruby is installed
-dir = "/app/ruby"
-
-[gitlab-shell]
-# The directory where gitlab-shell is installed
-dir = "/app/gitlab-shell"
-
-[[concurrency]]
-rpc = "/gitaly.RepositoryService/GarbageCollect"
-max_per_repo = 1
-
-
diff --git a/_support/instrumented-cluster/gitaly1repos/setup.sh b/_support/instrumented-cluster/gitaly1repos/setup.sh
deleted file mode 100644
index 101b1bee9..000000000
--- a/_support/instrumented-cluster/gitaly1repos/setup.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-git clone --bare https://gitlab.com/gitlab-org/gitlab-ce.git /repositories/gitlab-org/gitlab-ce.git
diff --git a/_support/instrumented-cluster/prom/prometheus.yml b/_support/instrumented-cluster/prom/prometheus.yml
deleted file mode 100644
index 5cb6c61d8..000000000
--- a/_support/instrumented-cluster/prom/prometheus.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-scrape_configs:
- - job_name: 'cadvisor'
- scrape_interval: 10s
- scrape_timeout: 5s
- metrics_path: /metrics
- scheme: http
- static_configs:
- - targets: ['cadvisor:8080']
- - job_name: 'gitaly1'
- scrape_interval: 10s
- scrape_timeout: 5s
- metrics_path: /metrics
- scheme: http
- static_configs:
- - targets: ['gitaly1:9236']
diff --git a/_support/test-cluster/.gitignore b/_support/test-cluster/.gitignore
deleted file mode 100644
index fd330b7a2..000000000
--- a/_support/test-cluster/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-ssh_host*
-gitlab-secrets.json
-/gitaly1/data/
diff --git a/_support/test-cluster/README.md b/_support/test-cluster/README.md
deleted file mode 100644
index 0da46b576..000000000
--- a/_support/test-cluster/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Test cluster with multiple Gitaly servers
-
-This directory contains a
-[docker-compose.yml](https://docs.docker.com/compose/) and Omnibus
-GitLab configuration files to boot GitLab with multiple Gitaly servers
-behind it. This setup is meant for testing purposes only and SHOULD NOT be used
-in production environments because it handles secrets in an unsafe way.
-
-Boot the cluster with `docker-compose up`. After some time you can log
-in to your GitLab instance at `localhost:8080`.
-
-This template uses nightly docker images. To see what GitLab version you are
-currently running, run
-`docker-compose exec app1 grep gitlab-ce /opt/gitlab/version-manifest.txt`. To
-update to the latest nightly images run `docker-compose pull`.
diff --git a/_support/test-cluster/app1/etc-gitlab/gitlab.rb b/_support/test-cluster/app1/etc-gitlab/gitlab.rb
deleted file mode 100644
index 0bce8c475..000000000
--- a/_support/test-cluster/app1/etc-gitlab/gitlab.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# This is not strictly necessary but it makes the logs a little 'quieter'
-prometheus_monitoring['enable'] = false
-
-# Disable the local Gitaly instance
-gitaly['enable'] = false
-
-# Don't disable Gitaly altogether
-gitlab_rails['gitaly_enabled'] = true
-
-redis['port'] = 6379
-redis['bind'] = '0.0.0.0'
-
-git_data_dirs({
- 'default' => { 'path' => '/mnt/data1', 'gitaly_address' => 'tcp://gitaly1:6666' },
- 'gitaly2' => { 'path' => '/mnt/data2', 'gitaly_address' => 'tcp://gitaly2:6666' }
-})
-
-# We have to use the same token in all hosts for internal API authentication
-gitlab_shell['secret_token'] = 'f4kef1xedt0ken'
diff --git a/_support/test-cluster/docker-compose.yml b/_support/test-cluster/docker-compose.yml
deleted file mode 100644
index 12e392196..000000000
--- a/_support/test-cluster/docker-compose.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-version: "3"
-services:
- app1:
- image: gitlab/gitlab-ce:nightly
- ports:
- - "8080:80"
- - "2222:22"
- links:
- - gitaly1
- - gitaly2
- volumes:
- - ./app1/etc-gitlab:/etc/gitlab
- - ./gitaly1/data:/mnt/data1
- - ./gitaly2/data:/mnt/data2
- gitaly1:
- image: gitlab/gitlab-ce:nightly
- expose:
- - 6666
- volumes:
- - ./gitaly1/data:/var/opt/gitlab/git-data
- - ./gitaly1/etc-gitlab:/etc/gitlab
- gitaly2:
- image: gitlab/gitlab-ce:nightly
- expose:
- - 6666
- volumes:
- - ./gitaly2/data:/var/opt/gitlab/git-data-2
- - ./gitaly2/etc-gitlab:/etc/gitlab
diff --git a/_support/test-cluster/gitaly1/etc-gitlab/gitlab.rb b/_support/test-cluster/gitaly1/etc-gitlab/gitlab.rb
deleted file mode 100644
index 97fd512da..000000000
--- a/_support/test-cluster/gitaly1/etc-gitlab/gitlab.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-gitaly['enable'] = true
-gitaly['listen_addr'] = ':6666'
-
-# This instance will be serving the 'default' repository storage
-
-# Disable as many Omnibus services as we can
-unicorn['enable'] = false
-sidekiq['enable'] = false
-gitlab_workhorse['enable'] = false
-gitlab_monitor['enable'] = false
-prometheus_monitoring['enable'] = false
-redis['enable'] = false
-postgresql['enable']=false
-nginx['enable'] = false
-
-# We need these settings to prevent Omnibus from erroring out because
-# Postgres/Redis are unavailable
-gitlab_rails['rake_cache_clear'] = false
-gitlab_rails['auto_migrate'] = false
-
-# Use the remote internal API
-gitlab_rails['internal_api_url'] = 'http://app1:80'
-
-# We have to use the same token in all hosts for internal API authentication
-gitlab_shell['secret_token'] = 'f4kef1xedt0ken'
diff --git a/_support/test-cluster/gitaly2/etc-gitlab/gitlab.rb b/_support/test-cluster/gitaly2/etc-gitlab/gitlab.rb
deleted file mode 100644
index be06496b6..000000000
--- a/_support/test-cluster/gitaly2/etc-gitlab/gitlab.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-gitaly['enable'] = true
-gitaly['listen_addr'] = ':6666'
-
-# This instance will be serving the 'gitaly2' repository storage
-git_data_dirs({
- 'gitaly2' => { 'path' => '/var/opt/gitlab/git-data-2' }
-})
-
-# Disable as many Omnibus services as we can
-unicorn['enable'] = false
-sidekiq['enable'] = false
-gitlab_workhorse['enable'] = false
-gitlab_monitor['enable'] = false
-prometheus_monitoring['enable'] = false
-redis['enable'] = false
-postgresql['enable']=false
-nginx['enable'] = false
-
-# We need these settings to prevent Omnibus from erroring out because
-# Postgres/Redis are unavailable
-gitlab_rails['rake_cache_clear'] = false
-gitlab_rails['auto_migrate'] = false
-
-# Use the remote internal API
-gitlab_rails['internal_api_url'] = 'http://app1:80'
-
-# We have to use the same token in all hosts for internal API authentication
-gitlab_shell['secret_token'] = 'f4kef1xedt0ken'