Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
fb0bd4eb
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fb0bd4eb
编写于
9月 16, 2015
作者:
K
Kamil Trzcinski
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added info about gitlab.yml config
上级
d3886f9d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
35 addition
and
18 deletion
+35
-18
doc/migrate_ci_to_ce/README.md
doc/migrate_ci_to_ce/README.md
+35
-18
未找到文件。
doc/migrate_ci_to_ce/README.md
浏览文件 @
fb0bd4eb
...
...
@@ -11,7 +11,7 @@ Make sure to plan it ahead.
If you are running older version please follow the upgrade guide first:
https://gitlab.com/gitlab-org/gitlab-ci/blob/master/doc/update/7.13-to-7.14.md
The migration is d
one in
two parts:
The migration is d
ivided into a
two parts:
1.
**[CI]**
You will be making a changes to GitLab CI instance.
1.
**[CE]**
You will be making a changes to GitLab CE/EE instance.
...
...
@@ -22,7 +22,7 @@ The migration is done in two parts:
### 2. Backup [CI]
**
The migration procedure is database breaking.
You need to create backup if you still want to access
CI data
in case of failure.
**
You need to create backup if you still want to access
GitLab CI
in case of failure.
**
```
bash
cd
/home/gitlab_ci/gitlab-ci
...
...
@@ -65,7 +65,6 @@ First check used database and credentials on GitLab CI and GitLab CE/EE:
cat /home/git/gitlab/config/database.yml
Please first check the database engine used for GitLab CI and GitLab CE/EE.
There's great chance that you will also need to convert MySQL to PostgreSQL:
1.
If your GitLab CI uses
**mysql2**
and GitLab CE/EE uses it too.
Please follow
**Dump MySQL**
guide.
...
...
@@ -76,7 +75,8 @@ Please follow **Dump PostgreSQL** guide.
1.
If your GitLab CI uses
**mysql2**
and GitLab CE/EE uses
**postgres**
.
Please follow
**Dump MySQL and migrate to PostgreSQL**
guide.
**Remember credentials stored for GitLab CI. You will need to put the credentials into commands executed below.**
**
Remember credentials stored for accessing GitLab CI.
You will need to put these credentials into commands executed below.
**
$ cat config/database.yml [10:06:55]
#
...
...
@@ -128,18 +128,18 @@ Please follow **Dump MySQL and migrate to PostgreSQL** guide.
### 5. Make sure that your GitLab CE/EE is 8.0 [CE]
Please verify that you use GitLab CE/EE 8.0.
If not, please follow update guide: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/7.14-to-8.0.md
If not, please follow
the
update guide: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/7.14-to-8.0.md
### 6. Stop GitLab CE/EE [CE]
Before you can migrate
actual
data you need to stop GitLab CE/EE first.
Before you can migrate data you need to stop GitLab CE/EE first.
sudo service gitlab stop
### 7. Backup GitLab CE/EE [CE]
This migration poses a
**significant risk**
of breaking your GitLab CE/EE.
You should create a backup before doing it.
**You should create the GitLab CI/EE backup before doing it.**
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
...
...
@@ -153,8 +153,19 @@ You need to copy the content of `config/secrets.yml` to the same file in GitLab
sudo cp /home/gitlab_ci/gitlab-ci/config/secrets.yml /home/git/gitlab/config/secrets.yml
sudo chown git:git /home/git/gitlab/config/secrets.yml
sudo chown 0600 /home/git/gitlab/config/secrets.yml
### 9. New configuration options for `gitlab.yml` [CE]
There are new configuration options available for
[
`gitlab.yml`
](
config/gitlab.yml.example
)
.
View them with the command below and apply them manually to your current
`gitlab.yml`
:
```
sh
git diff origin/7-14-stable:config/gitlab.yml.example origin/8-0-stable:config/gitlab.yml.example
```
### 9. Copy build logs [CE]
The new options include configuration of GitLab CI that are now being part of GitLab CE and EE.
### 10. Copy build logs [CE]
You need to copy the contents of
`builds/`
to the same directory in GitLab CE/EE.
...
...
@@ -163,7 +174,7 @@ You need to copy the contents of `builds/` to the same directory in GitLab CE/EE
The build traces are usually quite big so it will take a significant amount of time.
### 1
0
. Import GitLab CI database [CE]
### 1
1
. Import GitLab CI database [CE]
The one of the last steps is to import existing GitLab CI database.
...
...
@@ -171,21 +182,23 @@ The one of the last steps is to import existing GitLab CI database.
sudo chown git:git /home/git/gitlab/gitlab_ci.sql
sudo -u git -H bundle exec rake ci:migrate CI_DUMP=/home/git/gitlab/gitlab_ci.sql RAILS_ENV=production
Th
is will take a significant amount of time. The GitLab CE/EE
task does:
1.
Delete
s
data from all existing CI tables
Th
e
task does:
1.
Delete data from all existing CI tables
1.
Import database data
1.
Fixes database auto increments
1.
Fixes tags assigned to Builds and Runners
1.
Fixes services used by CI
1.
Fix database auto increments
1.
Fix tags assigned to Builds and Runners
1.
Fix services used by CI
### 12. Start GitLab [CE]
### 11. Start GitLab [CE]
You can start GitLab CI/EE now and see if everything is working.
sudo service gitlab start
### 1
2
. Update nginx [CI]
### 1
3
. Update nginx [CI]
Now get back to GitLab CI and update
**Nginx**
configuration in order to:
1.
Have all existing runners able to communicate with
GitLab
.
1.
Have all existing runners able to communicate with
a migrated GitLab CI
.
1.
Have GitLab able send build triggers to CI address specified in Project's settings -> Services -> GitLab CI.
You need to edit
`/etc/nginx/sites-available/gitlab_ci`
and paste:
...
...
@@ -226,6 +239,10 @@ Make sure to fill the blanks to match your setup:
**Make sure to not remove the `/ci$request_uri`. This is required to properly forward the requests.**
You should also make sure that you can do:
1.
`curl https://YOUR_GITLAB_SERVER_FQDN/`
from your previous GitLab CI server.
1.
`curl https://YOUR_CI_SERVER_FQDN/`
from your GitLab CE/EE server.
## Check your configuration
sudo nginx -t
...
...
@@ -234,7 +251,7 @@ Make sure to fill the blanks to match your setup:
sudo /etc/init.d/nginx restart
### Done!
###
14.
Done!
If everything went OK you should be able to access all your GitLab CI data by pointing your browser to:
https://gitlab.example.com/ci/.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录