Commit 3662efb8 authored by John Northrup's avatar John Northrup

Merge branch 'jarv/add-udp-log-shipping-hostname' into 'master'

Jarv/add udp log shipping hostname

See merge request !64
parents eb3927d8 56a33f5a
image: ruby:2.3
variables:
BUNDLE_PATH: "$CI_PROJECT_DIR/.bundle"
stages:
- test
before_script:
- bundle install --clean --path $BUNDLE_PATH
syntax:
stage: test
script:
- bundle exec rubocop spec/
rspec:
stage: test
script:
- bundle exec rspec
Metrics/LineLength:
Max: 200
Naming/FileName:
Enabled: false
source 'https://rubygems.org'
gem 'chefspec'
gem 'test-kitchen'
gem 'kitchen-vagrant'
gem 'berkshelf'
gem 'stove'
gem 'rubocop'
gem 'rake'
gem 'foodcritic'
gem 'kitchen-digitalocean'
gem 'kitchen-dokken'
group :test do
gem 'berkshelf'
gem 'chef-vault'
gem 'chefspec'
gem 'kitchen-digitalocean'
gem 'kitchen-inspec'
gem 'kitchen-transport-rsync'
gem 'rubocop'
gem 'test-kitchen'
end
group :ed25519 do
gem 'bcrypt_pbkdf'
gem 'rbnacl', '<5.0'
gem 'rbnacl-libsodium'
end
......@@ -5,7 +5,7 @@ GEM
addressable (2.4.0)
artifactory (2.5.0)
ast (2.3.0)
backports (3.6.8)
bcrypt_pbkdf (1.0.0)
berkshelf (5.1.0)
addressable (~> 2.3, >= 2.3.4)
berkshelf-api-client (>= 2.0.2, < 4.0)
......@@ -69,14 +69,12 @@ GEM
specinfra (~> 2.10)
syslog-logger (~> 1.6)
uuidtools (~> 2.1.5)
chef-api (0.7.0)
logify (~> 0.1)
mime-types
chef-config (12.15.19)
addressable
fuzzyurl
mixlib-config (~> 2.0)
mixlib-shellout (~> 2.0)
chef-vault (3.3.0)
chef-zero (5.1.0)
ffi-yajl (~> 2.2)
hashie (>= 2.0, < 4.0)
......@@ -88,13 +86,11 @@ GEM
fauxhai (~> 3.6)
rspec (~> 3.0)
cleanroom (1.0.0)
cucumber-core (2.0.0)
backports (~> 3.6)
gherkin (~> 4.0)
coderay (1.1.2)
diff-lcs (1.2.5)
docker-api (1.32.1)
excon (>= 0.38.0)
json
docker-api (1.34.0)
excon (>= 0.47.0)
multi_json
erubis (2.7.0)
excon (0.54.0)
faraday (0.9.2)
......@@ -231,38 +227,55 @@ GEM
fog-xml (0.1.2)
fog-core
nokogiri (~> 1.5, >= 1.5.11)
foodcritic (8.0.0)
cucumber-core (>= 1.3)
erubis
nokogiri (>= 1.5, < 2.0)
rake
rufus-lru (~> 1.0)
treetop (~> 1.4)
yajl-ruby (~> 1.1)
formatador (0.2.5)
fuzzyurl (0.9.0)
gherkin (4.0.0)
gssapi (1.2.0)
ffi (>= 1.0.1)
gyoku (1.3.1)
builder (>= 2.1.2)
hashie (3.4.6)
highline (1.7.8)
hitimes (1.2.4)
htmlentities (4.3.4)
httpclient (2.8.2.4)
inflecto (0.0.2)
iniparse (1.4.2)
inspec (1.48.0)
addressable (~> 2.4)
faraday (>= 0.9.0)
hashie (~> 3.4)
htmlentities
json (>= 1.8, < 3.0)
method_source (~> 0.8)
mixlib-log
parallel (~> 1.9)
parslet (~> 1.5)
pry (~> 0)
rspec (~> 3)
rspec-its (~> 1.2)
rubyzip (~> 1.1)
semverse
sslshake (~> 1.2)
thor (~> 0.19)
tomlrb (~> 1.2)
train (~> 0.31, >= 0.31.1)
ipaddress (0.8.3)
json (2.0.2)
kitchen-digitalocean (0.7.3)
fog
test-kitchen (~> 1.0)
kitchen-dokken (1.0.3)
docker-api (~> 1.29)
test-kitchen (~> 1.5)
kitchen-vagrant (0.20.0)
kitchen-inspec (0.20.0)
hashie (~> 3.4)
inspec (>= 0.34.0, < 2.0.0)
test-kitchen (~> 1.6)
kitchen-transport-rsync (0.1.2)
test-kitchen (~> 1.4)
libyajl2 (1.2.0)
logify (0.2.0)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
little-plugger (1.1.4)
logging (2.2.2)
little-plugger (~> 1.1)
multi_json (~> 1.10)
method_source (0.9.0)
mini_portile2 (2.1.0)
minitar (0.5.4)
mixlib-archive (0.2.0)
......@@ -296,6 +309,7 @@ GEM
nio4r (1.2.1)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
nori (2.6.0)
octokit (4.3.0)
sawyer (~> 0.7.0, >= 0.5.3)
ohai (8.20.0)
......@@ -310,15 +324,22 @@ GEM
plist (~> 3.1)
systemu (~> 2.6.4)
wmi-lite (~> 1.0)
parser (2.3.1.4)
ast (~> 2.2)
parallel (1.12.1)
parser (2.4.0.2)
ast (~> 2.3)
parslet (1.8.1)
plist (3.2.0)
polyglot (0.3.5)
powerpack (0.1.1)
proxifier (1.0.3)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
rack (2.0.1)
rainbow (2.1.0)
rake (11.3.0)
rainbow (3.0.0)
rbnacl (4.0.2)
ffi
rbnacl-libsodium (1.0.16)
rbnacl (>= 3.0.1)
rbvmomi (1.9.4)
builder (~> 3.2)
json (>= 1.8)
......@@ -362,14 +383,16 @@ GEM
rspec_junit_formatter (0.2.3)
builder (< 4)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (0.39.0)
parser (>= 2.3.0.7, < 3.0)
rubocop (0.52.0)
parallel (~> 1.10)
parser (>= 2.4.0.2, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
rufus-lru (1.1.0)
ruby-progressbar (1.9.0)
rubyntlm (0.6.2)
rubyzip (1.2.1)
safe_yaml (1.0.4)
sawyer (0.7.0)
addressable (>= 2.3.5, < 2.5)
......@@ -389,9 +412,7 @@ GEM
net-ssh (>= 2.7, < 4.0)
net-telnet
sfl
stove (4.1.1)
chef-api (~> 0.5)
logify (~> 0.2)
sslshake (1.2.0)
syslog-logger (1.6.8)
systemu (2.6.5)
test-kitchen (1.13.2)
......@@ -405,32 +426,53 @@ GEM
thor (0.19.1)
timers (4.0.4)
hitimes
treetop (1.6.8)
polyglot (~> 0.3)
tomlrb (1.2.6)
train (0.31.1)
docker-api (~> 1.26)
json (>= 1.8, < 3.0)
mixlib-shellout (~> 2.0)
net-scp (~> 1.2)
net-ssh (>= 2.9, < 5.0)
winrm (~> 2.0)
winrm-fs (~> 1.0)
trollop (2.1.2)
unicode-display_width (1.1.1)
unicode-display_width (1.3.0)
uuidtools (2.1.5)
varia_model (0.6.0)
buff-extensions (~> 2.0)
hashie (>= 2.0.2, < 4.0.0)
winrm (2.2.3)
builder (>= 2.1.2)
erubis (~> 2.7)
gssapi (~> 1.2)
gyoku (~> 1.0)
httpclient (~> 2.2, >= 2.2.0.2)
logging (>= 1.6.1, < 3.0)
nori (~> 2.0)
rubyntlm (~> 0.6.0, >= 0.6.1)
winrm-fs (1.1.1)
erubis (~> 2.7)
logging (>= 1.6.1, < 3.0)
rubyzip (~> 1.1)
winrm (~> 2.0)
wmi-lite (1.0.0)
xml-simple (1.1.5)
yajl-ruby (1.2.1)
PLATFORMS
ruby
DEPENDENCIES
bcrypt_pbkdf
berkshelf
chef-vault
chefspec
foodcritic
kitchen-digitalocean
kitchen-dokken
kitchen-vagrant
rake
kitchen-inspec
kitchen-transport-rsync
rbnacl (< 5.0)
rbnacl-libsodium
rubocop
stove
test-kitchen
BUNDLED WITH
1.13.4
1.16.0
......@@ -4,7 +4,7 @@ maintainer_email 'marin@gitlab.com'
license 'All rights reserved'
description 'Installs/Configures GitLab using omnibus-gitlab'
long_description 'Installs/Configures GitLab using omnibus-gitlab'
version '0.3.27'
version '0.3.28'
issues_url 'https://gitlab.com/gitlab-org/cookbook-omnibus-gitlab/issues'
source_url 'https://gitlab.com/gitlab-org/cookbook-omnibus-gitlab/'
......
inherit_from: ../.rubocop.yml
Metrics/LineLength:
Enabled: false
Lint/AmbiguousBlockAssociation:
Enabled: false
require 'chefspec'
require 'chefspec/berkshelf'
# Cookbook Name:: omnibus-gitlab
# Recipe:: default
#
# Copyright:: 2017, GitLab B.V., MIT.
require 'spec_helper'
require 'chef-vault'
describe 'omnibus-gitlab::default' do
context 'Generate basic gitlab.rb' do
let(:chef_run) do
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04') do |node, _server|
node.normal['omnibus-gitlab']['gitlab_rb']['external_url'] = 'http://herpderp-extern.com'
node.normal['omnibus-gitlab']['gitlab_rb']['pages_external_url'] = 'http://herpderp-pages.com'
node.normal['omnibus-gitlab']['gitlab_rb']['logging']['udp_log_shipping_host'] = '127.0.0.1'
end.converge(described_recipe)
end
it 'converges successfully' do
expect { chef_run }.to_not raise_error
end
it 'creates gitlab.rb' do
expect(chef_run).to create_template('/etc/gitlab/gitlab.rb').with(
mode: '0600'
)
end
it 'sets the logging name' do
expect(chef_run).to render_file('/etc/gitlab/gitlab.rb').with_content { |c|
expect(c).to include("external_url 'http://herpderp-extern.com'")
expect(c).to include("pages_external_url 'http://herpderp-pages.com'")
expect(c).to include("logging['udp_log_shipping_hostname'] = 'fauxhai.local'")
}
end
end
end
......@@ -12,6 +12,10 @@ git_data_dirs({<% @gitlab_rb['git_data_dirs'].each do |key, value| %>
<% end %>})
<% end %>
<% if @gitlab_rb['logging'] -%>
logging['udp_log_shipping_hostname'] = '<%= node['fqdn'] %>'
<% end -%>
<% %w{
bootstrap
omnibus-gitconfig
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment