BigW Consortium Gitlab

maintenance.md 2.91 KB
Newer Older
1 2
# Maintenance

3
## Gather information about GitLab and the system it runs on
4

5
This command gathers information about your GitLab installation and the System it runs on. These may be useful when asking for help or reporting issues.
6 7

```
8 9 10 11
# omnibus-gitlab
sudo gitlab-rake gitlab:env:info

# installation from source or cookbook
12
bundle exec rake gitlab:env:info RAILS_ENV=production
13 14 15 16 17 18
```

Example output:

```
System information
19 20 21
System:		Debian 6.0.7
Current User:	git
Using RVM:	no
22 23
Ruby Version: 2.0.0-p481
Gem Version:  1.8.23
24 25
Bundler Version:1.3.5
Rake Version:	10.0.4
26 27

GitLab information
28 29 30 31
Version:	5.1.0.beta2
Revision:	4da8b37
Directory:	/home/git/gitlab
DB Adapter:	mysql2
32 33 34
URL:		http://example.com
HTTP Clone URL:	http://example.com/some-project.git
SSH Clone URL:	git@example.com:some-project.git
35 36
Using LDAP:	no
Using Omniauth:	no
37

38
GitLab Shell
39 40 41 42
Version:	1.2.0
Repositories:	/home/git/repositories/
Hooks:		/home/git/gitlab-shell/hooks/
Git:		/usr/bin/git
43 44
```

45
## Check GitLab configuration
46

47 48
Runs the following rake tasks:

49 50 51 52
- `gitlab:env:check`
- `gitlab:gitlab_shell:check`
- `gitlab:sidekiq:check`
- `gitlab:app:check`
53 54 55 56

It will check that each component was setup according to the installation guide and suggest fixes for issues found.

You may also have a look at our [Trouble Shooting Guide](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide).
57 58

```
59 60 61 62
# omnibus-gitlab
sudo gitlab-rake gitlab:check

# installation from source or cookbook
63
bundle exec rake gitlab:check RAILS_ENV=production
64 65
```

66 67
NOTE: Use SANITIZE=true for gitlab:check if you want to omit project names from the output.

68 69 70
Example output:

```
71 72
Checking Environment ...

73
Git configured for git user? ... yes
74 75 76 77 78
Has python2? ... yes
python2 is supported version? ... yes

Checking Environment ... Finished

79
Checking GitLab Shell ...
80

81
GitLab Shell version? ... OK (1.2.0)
82
Repo base directory exists? ... yes
83
Repo base directory is a symlink? ... no
84
Repo base owned by git:git? ... yes
85
Repo base access is drwxrws---? ... yes
86
post-receive hook up-to-date? ... yes
87
post-receive hooks in repos are links: ... yes
88

89
Checking GitLab Shell ... Finished
90

91
Checking Sidekiq ...
92 93 94

Running? ... yes

95
Checking Sidekiq ... Finished
96 97 98 99

Checking GitLab ...

Database config exists? ... yes
100
Database is SQLite ... no
101 102
All migrations up? ... yes
GitLab config exists? ... yes
103
GitLab config outdated? ... no
104 105 106 107
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
108 109
Projects have satellites? ... yes
Redis version >= 2.0.0? ... yes
110 111

Checking GitLab ... Finished
112 113
```

114
## (Re-)Create satellite repositories
115

116
This will create satellite repositories for all your projects.
117

118
If necessary, remove the `repo_satellites` directory and rerun the commands below.
119 120

```
121 122 123
sudo -u git -H mkdir -p /home/git/gitlab-satellites
sudo -u git -H bundle exec rake gitlab:satellites:create RAILS_ENV=production
sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites
124
```