Commit 44d3b882 authored by Walter Heck's avatar Walter Heck

Merge branch '6-elastic-stack-upgrade' into develop

# Conflicts:
#	deploy/vagrant-oscar/files/setup.sh
parents 21b0e71d a70d5da3
Pipeline #362 passed with stages
in 2 minutes and 41 seconds
......@@ -128,4 +128,5 @@ Gemfile.lock
modules/
deploy/vagrant-oscar/.pe_build
deploy/vagrant-oscar/.vagrant
deploy/packer/output*
!deploy/packer/manifests/modules
......@@ -41,6 +41,7 @@ job:test:r10k:
- bundle install --deployment
- bundle config
- bundle exec r10k puppetfile check
- bundle exec r10k puppetfile install
dependencies:
- job:build:artifacts
......
......@@ -12,4 +12,5 @@ gem 'metadata-json-lint'
gem 'puppet-lint'
gem 'rspec-puppet'
gem 'puppetlabs_spec_helper'
gem 'r10k'
\ No newline at end of file
gem 'r10k'
gem 'ra10ke'
......@@ -62,6 +62,10 @@ GEM
multi_json (~> 1.10)
puppet_forge (~> 2.2)
semantic_puppet (~> 0.1.0)
ra10ke (0.1.1)
puppet_forge
r10k
rake
rake (12.0.0)
rspec (3.5.0)
rspec-core (~> 3.5.0)
......@@ -92,6 +96,7 @@ DEPENDENCIES
puppet-lint
puppetlabs_spec_helper
r10k
ra10ke
rake
rspec-puppet
......
mod 'icingaweb2',
:git => 'https://github.com/olindata/puppet-icingaweb2.git'
mod 'icinga2',
:git => 'https://github.com/olindata/puppet-icinga2.git',
:branch => 'develop'
mod 'kibana4',
:git => 'https://github.com/walterheck/puppet-kibana4.git'
mod 'kibana5',
:git => 'https://github.com/walterheck/puppet-kibana5.git'
mod 'grafana',
:git => 'https://github.com/olindata/puppet-grafana.git'
......@@ -14,31 +7,35 @@ mod 'grafana',
mod 'gitlab',
:git => 'https://github.com/walterheck/puppet-gitlab.git'
mod 'logstash',
:git => 'https://github.com/olindata/puppet-logstash.git',
:commit => '86b3db14ba5316e4bf5ce01c528029674b9afcb0'
mod 'icingaweb2',
:git => 'https://github.com/Icinga/puppet-icingaweb2.git'
# forge modules should be listed with a specific version and stay in
# NOTE: alphabetical order
mod 'abrader/gms', '1.0.1'
mod 'ajcrowe/supervisord', '0.6.0'
mod 'aptituz/ssh', '2.3.2'
mod 'elasticsearch/elasticsearch', '0.9.9'
mod 'camptocamp/archive', '0.8.1'
mod 'golja/influxdb', '3.0.1'
mod 'pcfens/filebeat', '0.5.7'
mod 'puppetlabs/apache', '1.6.0'
mod 'puppetlabs/apt', '2.2.0'
mod 'puppetlabs/concat', '1.2.4'
mod 'puppetlabs/firewall', '1.7.1'
mod 'puppetlabs/inifile', '1.4.2'
mod 'puppetlabs/java', '1.4.2'
mod 'puppetlabs/mysql', '3.6.2'
mod 'puppetlabs/ntp', '4.1.2'
mod 'puppetlabs/postgresql', '4.6.0'
mod 'puppetlabs/ruby', '0.4.0'
mod 'puppetlabs/stdlib', '4.9.0'
mod 'puppetlabs/vcsrepo', '1.3.1'
mod 'abrader/gms', '1.0.3'
mod 'aptituz/ssh', '2.4.0'
mod 'camptocamp/archive', '0.9.0'
mod 'ceritsc/yum', '0.9.8'
mod 'elastic/logstash', '5.0.3'
mod 'elasticsearch/elasticsearch', '0.15.1'
mod 'golja/influxdb', '4.0.0'
mod 'icinga/icinga2', '1.0.1'
mod 'pcfens/filebeat', '0.9.2'
mod 'puppet/r10k', '4.1.0'
mod 'puppetlabs/apache', '1.11.0'
mod 'puppetlabs/apt', '2.3.0'
mod 'puppetlabs/concat', '2.2.0'
mod 'puppetlabs/firewall', '1.8.1'
mod 'puppetlabs/inifile', '1.6.0'
mod 'puppetlabs/java', '1.6.0'
mod 'puppetlabs/mysql', '3.10.0'
mod 'puppetlabs/ntp', '6.0.0'
mod 'puppetlabs/postgresql', '4.8.0'
mod 'puppetlabs/ruby', '0.6.0'
mod 'puppetlabs/stdlib', '4.14.0'
mod 'puppetlabs/vcsrepo', '1.5.0'
mod 'richardc/datacat', '0.6.2'
mod 'stahnma/epel', '1.1.1'
mod 'puppet/r10k', '4.0.2'
mod 'stahnma/epel', '1.2.2'
mod 'thias/sysctl', '1.0.6'
mod 'yo61/logrotate', '1.4.0'
mod 'zack/exports', '0.0.6'
......@@ -3,15 +3,12 @@ require 'puppetlabs_spec_helper/rake_tasks'
#require 'puppetlabs_spec_helper/puppet_spec_helper'
require 'puppet-lint/tasks/puppet-lint'
require 'metadata-json-lint/rake_task'
require 'ra10ke'
if not ENV['SPEC_OPTS']
ENV['SPEC_OPTS'] = '--format documentation'
end
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_140chars')
PuppetSyntax.exclude_paths = [
"vendor/**/*.*",
"modules/**/*.pp",
......@@ -29,6 +26,32 @@ PuppetLint.configuration.ignore_paths = [
Rake::Task[:lint].clear
PuppetLint::RakeTask.new :lint do |config|
config.ignore_paths = PuppetLint.configuration.ignore_paths
# List of checks to disable
config.disable_checks = ['documentation', '140chars']
# Should puppet-lint prefix it's output with the file being checked,
# defaults to true
config.with_filename = true
# Should the task fail if there were any warnings, defaults to false
config.fail_on_warnings = true
# Format string for puppet-lint's output (see the puppet-lint help output
# for details
# config.log_format = '%{filename} - %{message}'
# Print out the context for the problem, defaults to false
config.with_context = true
# Enable automatic fixing of problems, defaults to false
config.fix = false
# Show ignored problems in the output, defaults to false
config.show_ignored = true
# Compare module layout relative to the module root
config.relative = true
end
task :all => [ :validate, :metadata, :lint, :spec ]
# -*- mode: ruby -*-
# vi: set ft=ruby :
# get the branch we're in from the command line
branch = %x(git rev-parse --abbrev-ref HEAD)
# use the current branch unless we have specified one on the command line like so:
# $ GIT_BRANCH=yomama vagrant provision foss-master
ENV['GIT_BRANCH'] = ENV['GIT_BRANCH'] || branch
# url of control repo
ENV['GIT_CONTROL_REPO'] = ENV['GIT_CONTROL_REPO'] || 'https://gitlab.olindata.com/opstheater/opstheater.git'
# the domain we want to provision for
ENV['OT_DOMAIN'] = ENV['OT_DOMAIN'] || 'opstheater.vm'
# mapping opstheater hosts to their foreman hostgroups
ENV['OT_GROUP_MAPPING'] = ENV['OT_GROUP_MAPPING'] || "elasticsearch." + ENV['OT_DOMAIN'] + "=OpsTheater/Elastic " +
"master." + ENV['OT_DOMAIN'] + "=OpsTheater/Puppet " +
"icinga2." + ENV['OT_DOMAIN'] + "=OpsTheater/Icinga " +
"gitlab." + ENV['OT_DOMAIN'] + "=OpsTheater/Gitlab " +
"mysql." + ENV['OT_DOMAIN'] + "=OpsTheater/MySQL"
if defined? Oscar
# call ConfigBuilder.load with :yaml_erb directly so we can have erb parse the
......
---
roles:
pe-puppet-master:
provider:
type: virtualbox
customize:
- [modifyvm, !ruby/sym id, '--memory', 8192]
provisioners:
-
type: hosts
add_localhost_hostnames: false
sync_hosts: true
- type: shell
inline: |-
/bin/systemctl stop firewalld
-
type: pe_bootstrap
- type: pe_bootstrap
role: !ruby/sym master
-
type: shell
- type: shell
inline: |-
/usr/local/bin/puppet module install zack-r10k --version 3.2.0
/usr/local/bin/puppet module install abrader-gms --version 1.0.2
......@@ -31,27 +21,55 @@ roles:
/usr/local/bin/puppet agent -t || true
/sbin/service puppet stop
foss-puppet-master:
provider:
type: virtualbox
customize:
- [modifyvm, !ruby/sym id, '--memory', 6144]
managed-host:
provisioners:
- type: hosts
add_localhost_hostnames: false
sync_hosts: true
memory-2g:
providers:
- type: virtualbox
customize:
- [modifyvm, !ruby/sym id, '--memory', 2048]
memory-1g:
providers:
- type: virtualbox
customize:
- [modifyvm, !ruby/sym id, '--memory', 1024]
memory-4g:
providers:
- type: virtualbox
customize:
- [modifyvm, !ruby/sym id, '--memory', 4096]
memory-6g:
providers:
- type: virtualbox
customize:
- [modifyvm, !ruby/sym id, '--memory', 6144]
memory-8g:
providers:
- type: virtualbox
customize:
- [modifyvm, !ruby/sym id, '--memory', 8192]
foss-puppet-master:
provisioners:
- type: shell
path: files/setup.sh
path: files/setup-foss-master.sh
env:
GIT_BRANCH: <%= ENV['GIT_BRANCH'] %>
OT_DOMAIN: <%= ENV['OT_DOMAIN'] %>
GIT_CONTROL_REPO: <%= ENV['GIT_CONTROL_REPO'] %>
keep_color: false
pe-puppet-agent:
provisioners:
-
type: hosts
add_localhost_hostnames: false
sync_hosts: true
-
type: pe_agent
master_vm: !ruby/sym master
......@@ -60,30 +78,16 @@ roles:
inline: |-
/sbin/service puppet stop
pe-puppet-agent-2g:
provider:
type: virtualbox
customize:
- [modifyvm, !ruby/sym id, '--memory', 2048]
puppet-agent-register-foreman:
provisioners:
-
type: hosts
add_localhost_hostnames: false
sync_hosts: true
-
type: pe_agent
master_vm: !ruby/sym master
-
type: shell
inline: |-
/sbin/service puppet stop
- type: shell
path: files/foreman-register-agent.sh
env:
OT_DOMAIN: <%= ENV['OT_DOMAIN'] %>
OT_GROUP_MAPPING: <%= ENV['OT_GROUP_MAPPING'] %>
foss-puppet-agent-rhel7:
provisioners:
-
type: hosts
add_localhost_hostnames: false
sync_hosts: true
-
type: shell
inline: |-
......@@ -94,10 +98,6 @@ roles:
foss-puppet-agent-rhel6:
provisioners:
-
type: hosts
add_localhost_hostnames: false
sync_hosts: true
-
type: shell
inline: |-
......@@ -108,10 +108,6 @@ roles:
foss-puppet-agent-trusty:
provisioners:
-
type: hosts
add_localhost_hostnames: false
sync_hosts: true
-
type: shell
inline: |-
......
......@@ -2,64 +2,81 @@
vms:
## puppet enterprise master
- name: master
box: puppetlabs/centos-7.0-64-nocm
box: puppetlabs/centos-7.2-64-nocm
private_networks: [ {ip: '10.20.1.10'} ]
hostname: master.opstheater.vm
roles:
- managed-host
- memory-8g
- pe-puppet-master
## FOSS puppet master
- name: foss-master
box: puppetlabs/centos-7.0-64-nocm
box: puppetlabs/centos-7.2-64-nocm
private_networks: [ {ip: '10.20.1.10'} ]
hostname: master.opstheater.vm
roles:
- managed-host
- memory-6g
- foss-puppet-master
## icinga server
- name: icinga2
box: puppetlabs/centos-7.0-64-nocm
box: puppetlabs/centos-7.2-64-nocm
private_networks: [ {ip: '10.20.1.20'} ]
hostname: icinga2.opstheater.vm
roles:
- puppet-agent-register-foreman
- foss-puppet-agent-rhel7
- managed-host
## elasticsearch + kibana
- name: elasticsearch
box: puppetlabs/centos-6.6-64-nocm
box: puppetlabs/centos-7.2-64-nocm
private_networks: [ {ip: '10.20.1.30'} ]
hostname: elasticsearch.opstheater.vm
roles:
- foss-puppet-agent-rhel6
- puppet-agent-register-foreman
- foss-puppet-agent-rhel7
- managed-host
- memory-4g
## gitlab + gitlabci + matter most
- name: gitlab
box: puppetlabs/centos-7.0-64-nocm
box: puppetlabs/centos-7.2-64-nocm
private_networks: [ {ip: '10.20.1.50'} ]
hostname: gitlab.opstheater.vm
roles:
- puppet-agent-register-foreman
- foss-puppet-agent-rhel7
- managed-host
- memory-1g
## mysql
- name: mysql
box: puppetlabs/centos-7.0-64-nocm
box: puppetlabs/centos-7.2-64-nocm
private_networks: [ {ip: '10.20.1.60'} ]
hostname: mysql.opstheater.vm
roles:
- puppet-agent-register-foreman
- foss-puppet-agent-rhel7
- managed-host
## clients for testing
- name: peclient
box: puppetlabs/centos-7.0-64-nocm
box: puppetlabs/centos-7.2-64-nocm
private_networks: [ {ip: '10.20.1.200'} ]
hostname: peclient.opstheater.vm
roles:
- managed-host
- pe-puppet-agent
- name: fossclient-rhel7
box: puppetlabs/centos-7.0-64-nocm
box: puppetlabs/centos-7.2-64-nocm
private_networks: [ {ip: '10.20.1.201'} ]
hostname: fossrhel7.opstheater.vm
roles:
- managed-host
- foss-puppet-agent-rhel7
- name: fossclient-rhel6
......@@ -67,6 +84,7 @@ vms:
private_networks: [ {ip: '10.20.1.203'} ]
hostname: fossrhel6.opstheater.vm
roles:
- managed-host
- foss-puppet-agent-rhel6
- name: fossclient-ubuntutrusty
......@@ -74,4 +92,5 @@ vms:
private_networks: [ {ip: '10.20.1.202'} ]
hostname: fosstrusty.opstheater.vm
roles:
- managed-host
- foss-puppet-agent-trusty
#!/bin/bash
echo "Running foreman-register-agent.sh"
/bin/yum install -y jq
/opt/puppetlabs/bin/puppet agent -t --noop
echo "OT_GROUP_MAPPING: ${OT_GROUP_MAPPING}"
echo "OT_DOMAIN: ${OT_DOMAIN}"
for X in $OT_GROUP_MAPPING
do
FQDN=$(echo $X | awk -F "=" '{print $1}' )
HOSTGROUP=$(echo $X | awk -F "=" '{print $2}' )
HOSTNAME=`hostname -f`
echo "X: ${X}"
echo "fqdn: ${FQDN}"
echo "hostgroup: ${HOSTGROUP}"
echo "hostname: ${HOSTNAME}"
if [ "${FQDN}" == "${HOSTNAME}" ]; then
HOSTID=`curl -k -s -u opstheater:opstheater "Accept: version=2,application/json" -H "Content-Type: application/json" -d "{\"search\":\"\`hostname -f\`\"}" -X GET https://master.${OT_DOMAIN}/api/hosts | jq .results[0].id`
HOSTGROUPID=`curl -k -s -u opstheater:opstheater "Accept: version=2,application/json" -H "Content-Type: application/json" -d "{\"search\":\"${HOSTGROUP}\"}" -X GET https://master.${OT_DOMAIN}/api/hostgroups | jq .results[0].id`
echo "Host id: ${HOSTID}"
echo "Hostgroup id: ${HOSTGROUPID}"
curl -k -s -u opstheater:opstheater "Accept: version=2,application/json" -H "Content-Type: application/json" -d "{\"host\":{\"hostgroup_id\":\"${HOSTGROUPID}\"}}" -X PUT https://master.${OT_DOMAIN}/api/hosts/${HOSTID}
echo "curl result: $?"
break
fi
done
echo "Finishing foreman-register-agent.sh"
#!/bin/bash
echo "Running setup-foss-master.sh"
# colorize some of the output, see http://dcmnt.me/1XYnkPe for more information
COLOR_OK=$(tput setaf 2)
COLOR_ERR=$(tput setaf 1)
COLOR_OFF=$(tput sgr0)
COLOR_BRIGHT=$(tput bold)
SIGN_OK="${COLOR_OFF} ${COLOR_OK}${COLOR_OFF}"
SIGN_ERR="${COLOR_OFF} ${COLOR_ERR}${COLOR_OFF}"
function log {
case $2 in
norm)
message="${COLOR_BRIGHT}${1}${COLOR_OFF}"
;;
ok)
message="${COLOR_OK}${1}${COLOR_OFF}"
;;
err)
message="${COLOR_ERR}${1}${COLOR_OFF}"
;;
esac
echo "$message" >&2
}
#convert all hyphens and forward slashes to underscore
PUPPET_ENV=$(echo $GIT_BRANCH | sed s'/[-//]/_/g')
log "==> stopping firewalld service" norm
if [ -f /usr/lib/systemd/system/firewalld.service ]; then
service firewalld stop || { log "==> $SIGN_ERR failed to stop firewalld service" err ; exit 1; }
elif [ -f /usr/lib/systemd/system/iptables.service ]; then
service iptables stop || { log "==> $SIGN_ERR failed to stop iptables service" err; exit 1; }
else
log "no firewalld or iptables service found" norm
fi
log "==> $SIGN_OK OK:stopping firewalld service" ok
log "==> installing necessary yum repositories and foreman-installer" norm
if rpm -q puppetlabs-release-pc1-el-7; then
log "==> puppetlabs-release-pc1-el-7 already installed, skipping" norm
else
rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm || { log "==> $SIGN_ERR failed to install puppetlabs pc1 rpm" err; exit 1; }
fi
if rpm -q epel-release; then
log "==> epel-release already installed, skipping" norm
else
yum -y install epel-release || { log "==> $SIGN_ERR failed to install epel-release" err; exit 1; }
fi
if rpm -q foreman-release; then
log "==> foreman-release already installed, skipping" norm
else
yum -y install https://yum.theforeman.org/releases/1.13/el7/x86_64/foreman-release.rpm || { log "==> $SIGN_ERR failed to install foreman-release" err; exit 1; }
fi
if rpm -q foreman-installer; then
log "==> foreman-installer already installed, skipping" norm
else
yum install -y foreman-installer || { log "==> $SIGN_ERR failed to install foreman-installer" err ; exit 1; }
fi
log "==> $SIGN_OK OK:installing necessary yum repositories and foreman-installer" ok
log "==> enabling postgresql repository" norm
echo "postgresql::globals::version: '9.4'" >> /usr/share/foreman-installer/config/foreman.hiera/RedHat.yaml
echo "postgresql::globals::manage_package_repo: true" >> /usr/share/foreman-installer/config/foreman.hiera/RedHat.yaml
log "==> $SIGN_OK OK:enabling postgresql repository" ok
log "==> installing puppet and foreman dashboard" norm
foreman-installer \
--no-colors \
--foreman-proxy-tftp false \
--foreman-proxy-dhcp false \
--foreman-proxy-bmc false \
--foreman-proxy-dns false \
--puppet-autosign-entries "*.${OT_DOMAIN}" \
--puppet-environment $PUPPET_ENV \
--foreman-configure-epel-repo false \
--foreman-locations-enabled true \
--foreman-organizations-enabled true \
--foreman-initial-location Global \
--foreman-initial-organization OpsTheater \
--enable-foreman-plugin-default-hostgroup \
--enable-foreman-plugin-puppetdb \
--foreman-plugin-puppetdb-dashboard-address http://localhost:8080/pdb/dashboard
CREDENTIALS=$(foreman-installer --no-colors | grep -i "credentials")
log "==> $SIGN_OK OK:installing puppet and foreman dashboard" ok
#fetch server hostname
HOSTNAME=$(/opt/puppetlabs/puppet/bin/facter fqdn)
log "==> configure default hostgroup plugin" norm
cat <<EOF > /etc/foreman/plugins/default_hostgroup.yaml
---
:default_hostgroup:
:facts_map:
"OpsTheater":
"hostname": ".*"
EOF
log "==> $SIGN_OK OK:configure default hostgroup plugin" ok
source /etc/profile
log "==> installing puppetdb" norm
/opt/puppetlabs/bin/puppet module install puppetlabs/puppetdb || { log "==> $SIGN_ERR failed to install puppetdb puppet module" ; exit 1; }
/opt/puppetlabs/bin/puppet apply -e "class { 'puppetdb': manage_firewall => false} include puppetdb::master::config" --detailed-exitcodes
if [ $? == 4 ] || [ $? == 6 ]; then
log "==> $SIGN_ERR puppet agent run encountered errors" err
exit 1
fi
log "==> $SIGN_OK OK:installing puppetdb" ok
# needed for grafana module
/opt/puppetlabs/bin/puppetserver gem install toml
log "==> stopping firewalld service" norm
if [ -f /usr/lib/systemd/system/firewalld.service ]; then
service firewalld stop || { log "==> $SIGN_ERR failed to stop firewalld service" err ; exit 1; }
elif [ -f /usr/lib/systemd/system/iptables.service ]; then
service iptables stop || { log "==> $SIGN_ERR failed to stop iptables service" err; exit 1; }
else
log "no firewalld or iptables service found" norm
fi
log "==> $SIGN_OK OK:stopping firewalld service" ok
log "==> configuring R10K" norm
/opt/puppetlabs/bin/puppet module install zack/r10k || { log "==> $SIGN_ERR failed to install r10k puppet module" ; exit 1; }
cat <<EOF > /tmp/r10k.pp
class { '::r10k':
remote => "${GIT_CONTROL_REPO}",
r10k_basedir => $::settings::environmentpath,
}
EOF
/opt/puppetlabs/bin/puppet apply /tmp/r10k.pp --detailed-exitcodes
if [ $? == 4 ] || [ $? == 6 ]; then
log "==> puppet apply run encountered errors" err
exit 1
fi
log "==> $SIGN_OK OK:configuring R10K" ok
log "==> deploying r10k environments" norm
# always check out production (it contains the hiera.yaml file), but possibly also the current branch
/opt/puppetlabs/puppet/bin/r10k deploy environment production $GIT_BRANCH -pv debug
log "==> $SIGN_OK OK:deploying r10k environments" ok
log "==> importing puppet environments to foreman" norm
hammer proxy import-classes --id 1
if [ $? == 1 ]; then
log "==> $SIGN_ERR importing classed encountered errors" err
exit 1
fi
log "==> $SIGN_OK OK:importing puppet environments to foreman" ok
log "==> creating default hostgroups" norm
hammer hostgroup create --name "OpsTheater" --puppet-proxy-id 1 --puppet-ca-proxy-id 1 --environment $PUPPET_ENV --locations Global --organizations OpsTheater
hammer hostgroup create --name "Elastic" --parent "OpsTheater" --puppet-classes "opstheater::role::elastic::server"
hammer hostgroup create --name "MySQL" --parent "OpsTheater" --puppet-classes "opstheater::role::database::standalone"
hammer hostgroup create --name "Icinga" --parent "OpsTheater" --puppet-classes "opstheater::role::monitoring::standalone"
hammer hostgroup create --name "Gitlab" --parent "OpsTheater" --puppet-classes "opstheater::role::gitlab::server"
hammer hostgroup create --name "Puppet" --parent "OpsTheater" --puppet-classes "opstheater::role::puppet::master"
log "==> $SIGN_OK OK:creating default hostgroup" ok
hammer organization update --name OpsTheater --environments $PUPPET_ENV
hammer location update --name Global --environments $PUPPET_ENV
hammer host update --name $HOSTNAME --hostgroup 'Puppet' --organization OpsTheater --location Global
hammer user create --admin true --firstname api --lastname user --locations Global --organizations OpsTheater --login opstheater --password opstheater --mail api@opstheater.com --auth-source-id 1
log "==> configuring hiera.yaml" norm
/opt/puppetlabs/bin/puppet config set hiera_config /etc/puppetlabs/code/environments/production/hiera.yaml
log "==> $SIGN_OK OK:configuring hiera.yaml" ok
service httpd restart
service puppetserver restart
log "==> running puppet agent" norm
/opt/puppetlabs/bin/puppet agent -t --detailed-exitcodes
if [ $? == 4 ] || [ $? == 6 ]; then
log "==> $SIGN_ERR puppet agent run encountered errors" err
exit 1
fi
log "==> $SIGN_OK OK: running puppet agent" ok
/opt/puppetlabs/bin/puppet resource service firewalld ensure=stopped enable=false
echo "Foreman URL: https://$HOSTNAME"
echo "$CREDENTIALS"
echo "Finishing setup-foss-master.sh"
For instructions on setting up a development environment using vagrant, see https://gitlab.olindata.com/opstheater/opstheater-docs
For instructions on setting up a development environment using vagrant, see <https://gitlab.olindata.com/opstheater/opstheater-docs>
......@@ -6,31 +6,19 @@ opstheater::profile::elasticsearch::instances:
ensure: present
status: enabled
config:
network.host: "%{hiera('opstheater::elasticsearch::fqdn')}"
network.host: "127.0.0.1"
http.port: '9200'
index.max_result_window: '2147483647'
profile::logstash::plugins:
'beats':
opstheater::profile::logstash::plugins:
'logstash-input-beats':
ensure: 'present'
type: 'input'
source: 'puppet:///modules/opstheater/logstash/beats.rb'
'elasticsearch':
'logstash-output-elasticsearch':
ensure: 'present'
type: 'output'
source: 'puppet:///modules/opstheater/logstash/elasticsearch.rb'
filename: 'elasticsearch.rb'
'grok':
'logstash-filter-grok':
ensure: 'present'
type: 'filter'
source: 'puppet:///modules/opstheater/logstash/grok.rb'
'date':
'logstash-filter-date':
ensure: 'present'
type: 'filter'
source: 'puppet:///modules/opstheater/logstash/date.rb'
opstheater::profile::logstash::package_url: 'https://download.elastic.co/logstash/logstash/packages/centos/logstash-2.1.1-1.noarch.rpm'
opstheater::profile::logstash::input_beats_port: '5044'
opstheater::profile::logstash::input_beats_type: 'logs'
opstheater::profile::logstash::output_codec: 'rubydebug'
opstheater::profile::logstash::output_elasticsearch_hosts:
- "elasticsearch:9200"
opstheater::profile::grafana::install_method: 'repo'
- "127.0.0.1:9200"