Skip to content

Commit

Permalink
hub.docker.com now builds images from git tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sameer Naik committed Nov 7, 2015
1 parent 6893b16 commit c3fbbb5
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 63 deletions.
30 changes: 15 additions & 15 deletions CI_MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Since version `8.0.0`, CI is now a part of GitLab. You no longer need to run a separate instance of the CI server. This guide walks you through the procedure of migrating your existing CI data into GitLab.

This guide assumes that you are currently using `quay.io/sameersbn/gitlab` and `quay.io/sameersbn/gitlab-ci` for setting up your GitLab and CI requirements.
This guide assumes that you are currently using `sameersbn/gitlab` and `sameersbn/gitlab-ci` for setting up your GitLab and CI requirements.

> **Note:**
>
Expand All @@ -21,18 +21,18 @@ docker rm gitlab-ci gitlab

Migration to GitLab `8.0` can only be done from version `7.14.3`. As a result we need to first migrate to the most recent versions of these images.

### Upgrade to `quay.io/sameersbn/gitlab:7.14.3`
### Upgrade to `sameersbn/gitlab:7.14.3`

```bash
docker run -it --rm [OPTIONS] \
quay.io/sameersbn/gitlab:7.14.3 app:init
sameersbn/gitlab:7.14.3 app:init
```

### Upgrade to `quay.io/sameersbn/gitlab-ci:7.14.3-1`
### Upgrade to `sameersbn/gitlab-ci:7.14.3-1`

```bash
docker run -it --rm [OPTIONS] \
quay.io/sameersbn/gitlab-ci:7.14.3-1 app:init
sameersbn/gitlab-ci:7.14.3-1 app:init
```

## Step 3 - Generate Backups
Expand All @@ -43,7 +43,7 @@ Create backups to ensure that we can rollback in case you face issues during the

```bash
docker run -it --rm [OPTIONS] \
quay.io/sameersbn/gitlab:7.14.3 app:rake gitlab:backup:create
sameersbn/gitlab:7.14.3 app:rake gitlab:backup:create
```

Make a note of the backup archive `xxxxxxxxxx_gitlab_backup.tar` as it is the backup you will have to rollback to in case of errors.
Expand All @@ -52,7 +52,7 @@ Make a note of the backup archive `xxxxxxxxxx_gitlab_backup.tar` as it is the ba

```bash
docker run -it --rm [OPTIONS] \
quay.io/sameersbn/gitlab-ci:7.14.3-1 app:rake backup:create
sameersbn/gitlab-ci:7.14.3-1 app:rake backup:create
```

Make a note of the backup archive `xxxxxxxxxx_gitlab_ci_backup.tar.gz` as it is the backup you will have to rollback to in case of errors.
Expand All @@ -63,11 +63,11 @@ Make a note of the backup archive `xxxxxxxxxx_gitlab_ci_backup.tar.gz` as it is

CI `8.x.x` is only meant for the purpose of migrating to GitLab `8.0`. Here we need to upgrade to version `8.x.x` and generate a backup that will be imported into GitLab.

### Upgrade to `quay.io/sameersbn/gitlab-ci:8.0.5`
### Upgrade to `sameersbn/gitlab-ci:8.0.5`

```bash
docker run -it --rm [OPTIONS] \
quay.io/sameersbn/gitlab-ci:8.0.5 app:init
sameersbn/gitlab-ci:8.0.5 app:init
```

### Create CI backup
Expand All @@ -76,7 +76,7 @@ docker run -it --rm [OPTIONS] \

```bash
docker run -it --rm [OPTIONS] \
quay.io/sameersbn/gitlab-ci:8.0.5 app:rake backup:create
sameersbn/gitlab-ci:8.0.5 app:rake backup:create
```

Copy the generated backup archive `xxxxxxxxxx_gitlab_ci_backup.tar` into the `backups/` directory of the GitLab server.
Expand All @@ -85,28 +85,28 @@ Copy the generated backup archive `xxxxxxxxxx_gitlab_ci_backup.tar` into the `ba
cp <gitlab-ci-host-volume-path>/backups/xxxxxxxxxx_gitlab_ci_backup.tar <gitlab-ce-host-volume-path>/backups/
```

We are done with CI. If the rest of the migration goes was planned you will not need to start `quay.io/sameersbn/gitlab-ci` ever again.
We are done with CI. If the rest of the migration goes was planned you will not need to start `sameersbn/gitlab-ci` ever again.

## Step 5 - Upgrade GitLab

Before we can upgrade to `quay.io/sameersbn/gitlab:8.0.5-1`, we need to assign the value of `GITLAB_CI_SECRETS_DB_KEY_BASE` (from CI) to `GITLAB_SECRETS_DB_KEY_BASE` in GitLab's environment.
Before we can upgrade to `sameersbn/gitlab:8.0.5-1`, we need to assign the value of `GITLAB_CI_SECRETS_DB_KEY_BASE` (from CI) to `GITLAB_SECRETS_DB_KEY_BASE` in GitLab's environment.

Next you also need to set the environment variable `GITLAB_CI_HOST` to the address of your CI server, eg. `ci.example.com`. This will make sure that your existing runners will be able to communicate to GitLab with the old url.

### Upgrade to `quay.io/sameersbn/gitlab:8.0.5-1`
### Upgrade to `sameersbn/gitlab:8.0.5-1`

```bash
docker run -it --rm [OPTIONS] \
--env GITLAB_CI_HOST=ci.example.com --env GITLAB_SECRETS_DB_KEY_BASE=xxxxxx \
quay.io/sameersbn/gitlab:8.0.5-1 app:init
sameersbn/gitlab:8.0.5-1 app:init
```

### Migrate CI data

```bash
docker run -it --rm [OPTIONS] \
--env GITLAB_CI_HOST=ci.example.com --env GITLAB_SECRETS_DB_KEY_BASE=xxxxxx \
quay.io/sameersbn/gitlab:8.0.5-1 app:rake ci:migrate
sameersbn/gitlab:8.0.5-1 app:rake ci:migrate
```

## Step 6 - Fix DNS and reverse proxy configurations
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/sameersbn/ubuntu:14.04.20151023
FROM sameersbn/ubuntu:14.04.20151023
MAINTAINER [email protected]

ENV GITLAB_VERSION=8.1.3 \
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ help:
@echo " 5. make purge - stop and remove the container"

build:
@docker build --tag=quay.io/sameersbn/gitlab .
@docker build --tag=sameersbn/gitlab .

release: build
@docker build --tag=quay.io/sameersbn/gitlab:$(shell cat VERSION) .
@docker build --tag=sameersbn/gitlab:$(shell cat VERSION) .

quickstart:
@echo "Starting postgresql container..."
@docker run --name=gitlab-postgresql -d \
--env='DB_NAME=gitlabhq_production' \
--env='DB_USER=gitlab' --env='DB_PASS=password' \
quay.io/sameersbn/postgresql:latest
sameersbn/postgresql:latest
@echo "Starting redis container..."
@docker run --name=gitlab-redis -d \
quay.io/sameersbn/redis:latest
sameersbn/redis:latest
@echo "Starting gitlab container..."
@docker run --name='gitlab-demo' -d \
--link=gitlab-postgresql:postgresql --link=gitlab-redis:redisio \
--publish=10022:22 --publish=10080:80 \
--env='GITLAB_PORT=10080' --env='GITLAB_SSH_PORT=10022' \
quay.io/sameersbn/gitlab:latest
sameersbn/gitlab:latest
@echo "Please be patient. This could take a while..."
@echo "GitLab will be available at http://localhost:10080"
@echo "Type 'make logs' for the logs"
Expand Down
Loading

0 comments on commit c3fbbb5

Please sign in to comment.