Merge branch 'add-mattermost-uid-gid-config' into 'master'

Support the ability to change mattermost UID and GID

Requested from a customer:

https://gitlab.zendesk.com/agent/tickets/18769


See merge request !713
This commit is contained in:
Marin Jankovski 2016-04-04 19:04:04 +00:00
commit c5a588da3e
5 changed files with 22 additions and 1 deletions

View File

@ -5,6 +5,7 @@ omnibus-gitlab repository.
8.7.0
- Support the ability to change mattermost UID and GID
- Updated libicu to 56.1 4de944d9
- Updated liblzma to 5.2.2 4de944d9
- Change the way db:migrate is triggered 3b42520a

View File

@ -203,4 +203,16 @@ The source code can be modified to support not only GitLab, but any in-house app
- [Mattermost incoming webhook documentation](http://docs.mattermost.com/developer/webhooks-incoming.html)
- [GitLab webhook documentation](http://doc.gitlab.com/ce/web_hooks/web_hooks.html)
![webhooks](https://gitlab.com/gitlab-org/omnibus-gitlab/uploads/677b0aa055693c4dcabad0ee580c61b8/730_gitlab_feature_request.png)
![webhooks](https://gitlab.com/gitlab-org/omnibus-gitlab/uploads/677b0aa055693c4dcabad0ee580c61b8/730_gitlab_feature_request.png)
## Specify numeric user and group identifiers
omnibus-gitlab creates a user and group mattermost. You can specify the
numeric identifiers for these users in `/etc/gitlab/gitlab.rb` as follows.
```ruby
mattermost['uid'] = 1234
mattermost['gid'] = 1234
```
Run `sudo gitlab-ctl reconfigure` for the changes to take effect.

View File

@ -591,6 +591,8 @@ external_url 'GENERATED_EXTERNAL_URL'
# mattermost['enable'] = false
# mattermost['username'] = 'mattermost'
# mattermost['group'] = 'mattermost'
# mattermost['uid'] = nil
# mattermost['gid'] = nil
# mattermost['home'] = '/var/opt/gitlab/mattermost'
# mattermost['database_name'] = 'mattermost_production'

View File

@ -631,6 +631,8 @@ default['gitlab']['ci-nginx']['resolver'] = "8.8.8.8 8.8.4.4"
default['gitlab']['mattermost']['enable'] = false
default['gitlab']['mattermost']['username'] = 'mattermost'
default['gitlab']['mattermost']['group'] = 'mattermost'
default['gitlab']['mattermost']['uid'] = nil
default['gitlab']['mattermost']['gid'] = nil
default['gitlab']['mattermost']['home'] = '/var/opt/gitlab/mattermost'
default['gitlab']['mattermost']['database_name'] = 'mattermost_production'

View File

@ -17,6 +17,8 @@
#
mattermost_user = node['gitlab']['mattermost']['username']
mattermost_group = node['gitlab']['mattermost']['group']
mattermost_uid = node['gitlab']['mattermost']['uid']
mattermost_gid = node['gitlab']['mattermost']['gid']
mattermost_home = node['gitlab']['mattermost']['home']
mattermost_log_dir = node['gitlab']['mattermost']['log_file_directory']
mattermost_storage_directory = node['gitlab']['mattermost']['file_directory']
@ -29,8 +31,10 @@ pg_user = node['gitlab']['postgresql']['username']
###
account "Mattermost user and group" do
username mattermost_user
uid mattermost_uid
ugid mattermost_group
groupname mattermost_group
gid mattermost_gid
shell '/bin/sh'
home mattermost_home
manage node['gitlab']['manage-accounts']['enable']