原有的Gitlab
概述: 数据目录挂载在外部的/data/server/gitlab/
下,主要涉及到的有状态内容为/etc/gitlab
下的配置、/var/log/gitlab
下的日志、/var/opt/gitlab
下的数据
过程: 通过备份命令gitlab-rake gitlab:backup:create SKIP=artifacts
创建备份, 在新的服务器上拉起Gitlab后进入维护模式并解决了sql的报错与配置文件恢复
概述: 数据目录挂载在外部的/data/server/gitlab/
下,主要涉及到的有状态内容为/etc/gitlab
下的配置、/var/log/gitlab
下的日志、/var/opt/gitlab
下的数据
过程: 通过备份命令gitlab-rake gitlab:backup:create SKIP=artifacts
创建备份, 在新的服务器上拉起Gitlab后进入维护模式并解决了sql的报错与配置文件恢复
python -m SimpleHTTPServer 8000
python -m http.server 8000
helm repo add gitlab https://charts.gitlab.io
helm search repo gitlab/gitlab-runner --version 0.42.0
helm show values gitlab/gitlab-runner --version 0.42.0 > values.yaml
gitlabUrl: 'https://gitlab.xxxx.com/'
runnerRegistrationToken: 'xxxxx'
unregisterRunners: true
concurrent: 2
checkInterval: 5
image:
registry: registry.gitlab.com
image: gitlab-org/gitlab-runner
tag: alpine-v15.1.0
rbac:
create: true
rules:
- apiGroups: [ '' ] #"" indicates the core API group
resources: [ '*' ]
verbs: [ '*' ]
- apiGroups: [ 'networking.k8s.io' ]
resources: [ 'ingresses' ]
verbs: [ '*' ]
- apiGroups: [ 'apps' ]
resources: [ 'deployments' ]
verbs: [ '*' ]
clusterWideAccess: true
serviceAccountName: gitlab-runner
runners:
config: |
[[runners]]
[runners.kubernetes]
namespace = ""
image = "ubuntu:18.04"
[runners.cache]
Type = "s3"
Shared = false
[runners.cache.s3]
ServerAddress = "minio.xxx.com"
# AccessKey = "${S3_ACCESS_KEY}" # 使用环境变量存储密钥
# SecretKey = "${S3_SECRET_KEY}" # 使用环境变量存储密钥
AccessKey = "xxxx"
SecretKey = "xxxx"
BucketName = "gitlab-cache"
# 如果可能,尽量启用 HTTPS
Insecure = true
tags: 'k8s-runner'
helpers:
cpuLimit: 200m
memoryLimit: 256Mi
cpuRequests: 100m
memoryRequests: 128Mi
image: 'registry.gitlab.com/gitlab-runner-helper:arm64-76984217'
serviceAccountName: gitlab-runner
# helm template -f values.yaml --namespace gitlab-runner gitlab/gitlab-runner > gitlab-runner.yaml
helm install -f ./values.yaml gitlab-runner gitlab/gitlab-runner -n gitlab-runner --version 0.42.0
helm upgrade -f ./values.yaml gitlab-runner gitlab/gitlab-runner -n gitlab-runner --version 0.42.0
helm status gitlab-runner -n gitlab-runner
helm delete gitlab-runner -n gitlab-runner
certbot
,没有使用泛域名证书,每次新增一个服务需要手动执行一次DNS
支持泛域名证书,早期列出的DNS
域名服务商没有阿里云
而acme.sh
支持通过阿里云的API
实现的
DNS Hosting Provider | ACME Client Support | Cost |
---|---|---|
Akamai Edge DNS 443 | Certbot 339, lego 3.0k, Posh-ACME 3.0k , acme.sh 16.0k | Contract Specific |
Aliyun (CN) 251 & Alibaba Cloud DNS (EN) 127 | acme.sh 16.0k, lego 3.0k, Posh-ACME 3.0k | Bundled with domain registration or Cloud DNS pricing 132 |
Amazon Route53 | Certbot 1.8k, acme.sh 16.0k, others 2.3k | ~$0.50/mo per domain |
Azure DNS | acme.sh 16.0k, lego 3.0k, Posh-ACME 3.0k | ~$0.50/mo per domain |
Cloudflare | Certbot 3.4k, acme.sh 16.0k, others 2.3k | Free (except for Freenom domains) 3.1k Note: Cloudflare is also a Registrar. |
ClouDNS | acme.sh 16.0k, lego 3.0k, Posh-ACME 3.0k, others 2.3k | >= $2.95/mo (with API-support) |
--dns dns_ali
表示域名服务商名称为ali
docker run --rm -it -v "$(pwd)/out":/acme.sh \
-e Ali_Key=your_access_key_id \
-e Ali_Secret=your_access_key_secret \
neilpang/acme.sh --issue --dns dns_ali --server letsencrypt \
-d *.eoekun.top --dnssleep 300
解决: 多应用构建场景、依赖服务构建场景
基于docker run -it --rm -p 4000:4000 registry.gitlab.com/gitlab-org/gitlab-docs:13.11
Moved to GitLab Free in 12.8.
http://0.0.0.0:4000/13.11/ee/ci/multi_project_pipelines.html