Commit 3fb996a39fc543f3afbd5cf67149ee613daf410e
1 parent
41c2cd1b
Exists in
master
and in
4 other branches
Convert to omnibus-gitlab in-place
Showing
1 changed file
with
63 additions
and
1 deletions
Show diff stats
doc/update.md
@@ -108,11 +108,73 @@ Please be advised that you lose your settings in files such as gitlab.yml, unico | @@ -108,11 +108,73 @@ Please be advised that you lose your settings in files such as gitlab.yml, unico | ||
108 | You will have to [configure those settings in /etc/gitlab/gitlab.rb](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration). | 108 | You will have to [configure those settings in /etc/gitlab/gitlab.rb](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration). |
109 | SMTP is not supported in omnibus-gitlab at this time. | 109 | SMTP is not supported in omnibus-gitlab at this time. |
110 | 110 | ||
111 | -### Upgrading from non-Omnibus PostgreSQL to an Omnibus installation | 111 | +### Upgrading from non-Omnibus PostgreSQL to an Omnibus installation using a backup |
112 | Upgrade by [creating a backup from the non-Omnibus install](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/backup_restore.md#create-a-backup-of-the-gitlab-system) and [restoring this in the Omnibus installation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#restoring-an-application-backup). | 112 | Upgrade by [creating a backup from the non-Omnibus install](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/backup_restore.md#create-a-backup-of-the-gitlab-system) and [restoring this in the Omnibus installation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#restoring-an-application-backup). |
113 | Please ensure you are using exactly equal versions of GitLab (for example 6.7.3) when you do this. | 113 | Please ensure you are using exactly equal versions of GitLab (for example 6.7.3) when you do this. |
114 | You might have to upgrade your non-Omnibus installation before creating the backup to achieve this. | 114 | You might have to upgrade your non-Omnibus installation before creating the backup to achieve this. |
115 | 115 | ||
116 | +### Upgrading from non-Omnibus PostgreSQL to an Omnibus installation in-place | ||
117 | +It is also possible to upgrade a source GitLab installation to omnibus-gitlab | ||
118 | +in-place. Below we assume you are using PostgreSQL on Ubuntu, and that you | ||
119 | +have an omnibus-gitlab package matching your current GitLab version. We also | ||
120 | +assume that your source installation of GitLab uses all the default paths and | ||
121 | +users. | ||
122 | + | ||
123 | +First, stop and disable GitLab, Redis and Nginx. | ||
124 | + | ||
125 | +``` | ||
126 | +# Ubuntu | ||
127 | +sudo service gitlab stop | ||
128 | +sudo update-rc.d gitlab disable | ||
129 | + | ||
130 | +sudo service nginx stop | ||
131 | +sudo update-rc.d nginx disable | ||
132 | + | ||
133 | +sudo service redis-server stop | ||
134 | +sudo update-rc.d redis-server disable | ||
135 | +``` | ||
136 | + | ||
137 | +Next, create a `gitlab.rb` file for your new setup. | ||
138 | + | ||
139 | +``` | ||
140 | +sudo mkdir /etc/gitlab | ||
141 | +sudo tee -a /etc/gitlab/gitlab.rb <<'EOF' | ||
142 | +# Use your own GitLab URL here | ||
143 | +external_url 'http://gitlab.example.com' | ||
144 | + | ||
145 | +# We assume your repositories are in /home/git/repositories (default for source installs) | ||
146 | +git_data_dir '/home/git' | ||
147 | + | ||
148 | +# Re-use the Postgres that is already running on your system | ||
149 | +postgresql['enable'] = false | ||
150 | +# This db_host setting is for Debian Postgres packages | ||
151 | +gitlab_rails['db_host'] = '/var/run/postgresql/' | ||
152 | +gitlab_rails['db_port'] = 5432 | ||
153 | +# We assume you called the GitLab DB user 'git' | ||
154 | +gitlab_rails['db_username'] = 'git' | ||
155 | +EOF | ||
156 | +``` | ||
157 | + | ||
158 | +Now install the omnibus-gitlab package and run `sudo gitlab-ctl reconfigure`. | ||
159 | + | ||
160 | +You are not done yet! The `gitlab-ctl reconfigure` run has changed the home | ||
161 | +directory of the git user, so OpenSSH can no longer find its authorized_keys | ||
162 | +file. Rebuild the keys file with the following command: | ||
163 | + | ||
164 | +``` | ||
165 | +sudo gitlab-rake gitlab:shell:setup | ||
166 | +``` | ||
167 | + | ||
168 | +You should now have HTTP and SSH access to your GitLab server with the | ||
169 | +repositories and users that were there before. | ||
170 | + | ||
171 | +If you can log into the GitLab web interface, the next step is to reboot your | ||
172 | +server to make sure none of the old services interferes with omnibus-gitlab. | ||
173 | + | ||
174 | +If you are using special features such as LDAP you will have to put your | ||
175 | +settings in gitlab.rb; see the [omnibus-gitlab | ||
176 | +README](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration). | ||
177 | + | ||
116 | ### Upgrading from non-Omnibus MySQL to an Omnibus installation (version 6.8+) | 178 | ### Upgrading from non-Omnibus MySQL to an Omnibus installation (version 6.8+) |
117 | Unlike the previous chapter, the non-Omnibus installation is using MySQL while the Omnibus installation is using PostgreSQL. | 179 | Unlike the previous chapter, the non-Omnibus installation is using MySQL while the Omnibus installation is using PostgreSQL. |
118 | 180 |