Skip to content
Snippets Groups Projects
Commit 830afbc3 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis
Browse files

New mysql privilege, fixed path for init.d check(#3757), create sockets dir(#3639)

parent 20df7b12
No related branches found
No related tags found
3 merge requests!3804Prepend "sudo -u git -H" to backup bundle exec commands.,!3776Patch 1,!3760Updated docs in 5-1-stable. Fixes #3757 and #3639.
Loading
Loading
@@ -158,11 +158,13 @@ do so with caution!
# Create directory for satellites
sudo -u git -H mkdir /home/git/gitlab-satellites
 
# Create directory for pids and make sure GitLab can write to it
# Create directories for sockets/pids and make sure GitLab can write to them
sudo -u git -H mkdir tmp/pids/
sudo -u git -H mkdir tmp/sockets/
sudo chmod -R u+rwX tmp/pids/
sudo chmod -R u+rwX tmp/sockets/
 
# Copy the example Of Puma config
# Copy the example of Puma config
sudo -u git -H cp config/puma.rb.example config/puma.rb
 
**Important Note:**
Loading
Loading
Loading
Loading
@@ -3,22 +3,21 @@
* `unicorn` replaced with `puma`
* merge request cached diff will be truncated
 
### 1. stop server
### 1. Stop server
 
sudo service gitlab stop
 
### 2. get latest code
### 2. Get latest code
 
```
```bash
cd /home/git/gitlab
sudo -u git -H git fetch
sudo -u git -H git checkout 5-1-stable
```
 
### 3. Update gitlab-shell
 
```
```bash
cd /home/git/gitlab-shell
sudo -u git -H git fetch
sudo -u git -H git checkout v1.3.0
Loading
Loading
@@ -26,16 +25,14 @@ sudo -u git -H git checkout v1.3.0
 
### 4. Install libs, migrations etc
 
```
```bash
cd /home/git/gitlab
sudo rm tmp/sockets/gitlab.socket
sudo -u git -H cp config/puma.rb.example config/puma.rb
 
sudo -u git -H bundle install --without development test postgres --deployment
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
sudo -u git -H bundle exec rake migrate_merge_requests RAILS_ENV=production
```
 
### 5. Update init.d script with a new one
Loading
Loading
@@ -47,6 +44,16 @@ sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-rec
sudo chmod +x /etc/init.d/gitlab
```
 
### 6. Start application
### 6. Mysql grant privileges
Only if you are using mysql:
```bash
mysql -u root -p
mysql> GRANT LOCK TABLES ON `gitlabhq_production`.* TO 'gitlab'@'localhost';
mysql> \q
```
### 7. Start application
 
sudo service gitlab start
Loading
Loading
@@ -143,7 +143,7 @@ namespace :gitlab do
return
end
 
recipe_content = `curl https://raw.github.com/gitlabhq/gitlab-recipes/master/init.d/gitlab 2>/dev/null`
recipe_content = `curl https://raw.github.com/gitlabhq/gitlab-recipes/5-1-stable/init.d/gitlab 2>/dev/null`
script_content = File.read(script_path)
 
if recipe_content == script_content
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment