|
1 | 1 | # init -> packages -> user -> setup -> install -> config -> service |
2 | 2 | class gitlab ( |
3 | 3 |
|
4 | | - # Manage packages |
5 | | - $gitlab_manage_packages = $gitlab::params::gitlab_manage_packages, |
6 | 4 |
|
7 | 5 | # Gitlab server settings |
8 | 6 | $gitlab_branch = $gitlab::params::gitlab_branch, |
|
64 | 62 | # Backup |
65 | 63 | $backup_path = $gitlab::params::backup_path, |
66 | 64 | $backup_keep_time = $gitlab::params::backup_keep_time, |
67 | | - |
68 | | - # Deprecated in 1.0.0 |
69 | | - $gitlab_repodir = '', |
70 | | - $gitlab_domain = '', |
71 | | - $user_create_team = '', |
72 | | - |
73 | | - # Deprecated in 2.0.0 |
74 | | - $project_public_default = '' |
75 | 65 |
|
76 | | - ) inherits ::gitlab::params { |
77 | 66 |
|
78 | | - case $::osfamily { |
79 | | - Debian: { |
80 | | - debug("A debian os was detected: ${::osfamily}") |
81 | | - } |
82 | | - default: { |
83 | | - fail("${::osfamily} not supported yet") |
84 | | - } |
85 | | - } |
| 67 | + ) inherits ::gitlab::params { |
86 | 68 |
|
87 | | -# Check if removed flags are present |
88 | | - if $gitlab_repodir != '' { |
89 | | - fail('The flag, $gitlab_repodir is no longer a valid parameter, please remove from your manifests') |
90 | | - } |
91 | | - if $gitlab_domain != '' { |
92 | | - fail('The flag, $gitlab_domain is no longer a valid parameter, please remove from your manifests') |
93 | | - } |
94 | | - if $user_create_team != '' { |
95 | | - fail('The flag, $user_create_team is no longer a valid parameter, please remove from your manifests') |
96 | | - } |
97 | 69 |
|
98 | | -# Check if flags removed in 6-4 are present |
99 | | - if $project_public_default != '' { |
100 | | - if $gitlab_branch >= '6-4-stable' { |
101 | | - fail('Gitlab 6-4 and newer replaced $project_public_default with $visibility_level, please update your manifests. See http://bit.ly/1egMAW2') |
102 | | - } |
103 | | - } |
104 | | - |
105 | | -# Test if pupet 3.0, required for scope lookup in erb templates |
106 | | - if $::puppetversion <= '3.0.0' { |
107 | | - fail("Module requires puppet 3.0 or greater, you have ${::puppetversion}") |
| 70 | + # Gitlab only supplies omnibus downloads for few select operating systems |
| 71 | + # Warn the user they may be using an unsupported OS |
| 72 | + # https://about.gitlab.com/downloads/ |
| 73 | + case $operatingsystemrelease { |
| 74 | + '12.04': {} |
| 75 | + '14.04': {} |
| 76 | + '7.5': {} |
| 77 | + '6.5': {} |
| 78 | + default: { warning("${operatingsystem} ${operatingsystemrelease} is not on approved list,\ |
| 79 | + download may fail. See https://about.gitlab.com/downloads/" |
| 80 | + ) } |
108 | 81 | } |
109 | | - |
110 | | -# Test if running on a non Ubuntu System |
111 | | -# If running on a debian system, disable the PPA's |
112 | | - if $::operatingsystem != 'Ubuntu' { |
113 | | - notice("Gitlab is only supported on Ubuntu systems, disabling 'manage packages' as a precaution'") |
114 | | - $gitlab_manage_packages = false |
115 | | - } |
116 | 82 |
|
117 | 83 |
|
118 | | - |
119 | | -# If false, allows user to install nginx, mysql, git ect.. packages separately |
120 | | - if $gitlab_manage_packages == true { |
121 | | - notice("Gitlab will manage packages because gitlab_manage_packages is: ${gitlab_manage_packages} ") |
122 | | - |
123 | | - include gitlab::packages |
124 | | - include gitlab::user |
125 | | - include gitlab::setup |
126 | | - include gitlab::install |
127 | | - include gitlab::config |
128 | | - include gitlab::service |
129 | | - |
130 | | - anchor { 'gitlab::begin':} |
131 | | - anchor { 'gitlab::end':} |
132 | | - # Installation order |
133 | | - Anchor['gitlab::begin'] -> |
134 | | - Class['::gitlab::packages'] -> |
135 | | - Class['::gitlab::user'] -> |
136 | | - Class['::gitlab::setup'] -> |
137 | | - Class['::gitlab::install'] -> |
138 | | - Class['::gitlab::config'] -> |
139 | | - Class['::gitlab::service'] -> |
140 | | - Anchor['gitlab::end'] |
141 | | - |
142 | | - } |
143 | | - else { |
144 | | - notice("You must install packages manually because gitlab_manage_packages is: ${gitlab_manage_packages}, see manifests/packages.pp") |
145 | 84 |
|
146 | | - include gitlab::user |
147 | | - include gitlab::setup |
148 | | - include gitlab::install |
149 | | - include gitlab::config |
150 | | - include gitlab::service |
151 | | - |
152 | | - anchor { 'gitlab::begin':} |
153 | | - anchor { 'gitlab::end':} |
154 | | - # Installation order |
155 | | - Anchor['gitlab::begin'] -> |
156 | | - Class['::gitlab::user'] -> |
157 | | - Class['::gitlab::setup'] -> |
158 | | - Class['::gitlab::install'] -> |
159 | | - Class['::gitlab::config'] -> |
160 | | - Class['::gitlab::service'] -> |
161 | | - Anchor['gitlab::end'] |
162 | | - } |
163 | | - |
164 | | - |
| 85 | + include gitlab::install |
165 | 86 |
|
166 | 87 |
|
167 | 88 | }# end gitlab |
|
0 commit comments