Commit b562dddb authored by Choon Ming Goh's avatar Choon Ming Goh

Initial commit for open source release version 1.6

parents
Pipeline #173 passed with stage
---
BUNDLE_PATH: vendor/bundle
BUNDLE_DISABLE_SHARED_GEMS: '1'
modules
deploy/vagrant-oscar/.pe_build
deploy/vagrant-oscar/.vagrant
vendor/bundle
terraform.tfstate
Gemfile.lock
image: ruby:2.2
before_script:
- bundle install
test:
script:
- rake lint
- rake syntax
## How to contribute code to OpsTheater:
If you want to have a look at puppetised code for OpsTheater, you can check that on this git repository : *https://gitlab.olindata.com/opstheater/opstheater*
Please follow the below steps for contributing :
On your development machine (local machine) clone the opstheater control repository using command :
```sh
git clone git@gitlab.olindata.com:opstheater/opstheater.git
```
This will create a directory called opstheater on your current location.
You can contribute your code in this local directory and push it to a new branch
```sh
checkout -b <author>/[fixes|features]/<name>
```
Now you will be on a new branch that you have just create now, to check the same run command
```sh
git branch
```
Now once you have done with your code you will need to push it to the repository with following steps:
```sh
git add <file name>
git commit -m “ your comment about the changes getting committed ”
git push origin <branch name>
```
**Note : here branch name will be same as what you have create in earlier step.**
This step will push your changes to the repository `opstheater` on the branch you created.
Now you can request someone else on the team to check your code and merge it with the original repository.
## Deploying your environment with R10K :
R10K is a hybrid solution for deploying Puppet code. It implements the original git workflow for deploying Puppet environments based on Git branches.
You can install r10k directly with command
```sh
gem install r10k
```
Now go to path **/etc/puppetlabs/r10k** and create file **r10k.yaml** with content as :
```sh
:cachedir: '/var/cache/r10k'
:sources:
:local:
remote: 'git@gitlab.olindata.com:opstheater/opstheater.git'
basedir: '/etc/puppetlabs/code/environments'
```
**Note: the value of basedir should be same as environmentpath in puppet.conf**
Now you can deploy your whole environment using r10k using following command :
```sh
r10k deploy environment <environment name>
```
Here environment of your branch in the repository will act as environment name.
So when when you will run r10k deploy with your branch name as environment name it will create an environment with your branch name in your local system on path **/etc/puppetlabs/code/environments**.
source ENV['GEM_SOURCE'] || "https://rubygems.org"
if ENV.key?('PUPPET_VERSION')
puppetversion = "= #{ENV['PUPPET_VERSION']}"
else
puppetversion = ['>= 3.5']
end
gem 'rake'
gem 'puppet', puppetversion
gem 'metadata-json-lint'
gem 'puppet-lint'
gem 'rspec-puppet'
gem 'puppetlabs_spec_helper'
gem 'r10k'
\ No newline at end of file
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
\ No newline at end of file
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 'grafana',
:git => 'https://github.com/olindata/puppet-grafana.git'
mod 'gitlab',
:git => 'https://github.com/walterheck/puppet-gitlab.git'
mod 'logstash',
:git => 'https://github.com/olindata/puppet-logstash.git',
:commit => '86b3db14ba5316e4bf5ce01c528029674b9afcb0'
# 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 'jfryman/nginx', '0.3.0'
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 'richardc/datacat', '0.6.2'
mod 'stahnma/epel', '1.1.1'
mod 'zack/r10k', '3.2.0'
# OpsTheater
[![Build
Status](https://gitlab.olindata.com/opstheater/opstheater/badges/production/build.svg)](https://gitlab.olindata.com/opstheater/opstheater/builds/)
## Documentation
Check out the documentation in https://gitlab.olindata.com/opstheater/opstheater-docs
## Need Help?
Need help? Try emailing us at opstheater@googlegroups.com or chat with us on freenode IRC #opstheater
# Release notes
## Release 1.6 ( May 2nd 2016)
This is a Major Milestone Release of Opstheater. We go OpenSource with 1.6
Yes Opstheater is now OpenSource.
In this release the number of changes is limited as most of the capacity in this sprint was used to make internal changes to the project infrastructure.
The following has been added along the way:
* Logstash filters for filtering access logs of following components:
* Puppetmaster
* PupptDB
* Gitlab
* Mattermost
* Used Puppet Lint to make sure that all our puppet code is following Puppetlabs style guide and we pass an initial CI build on each push to gitlab
Tech Preview
* Grafana & InfluxDB - graph and dashboard builder for visualizing time series metrics
In addition to this, we have updated the components in use by OpsTheater to the following versions, each of which comes with it's own release notes:
| Tool | Version | Release notes |
|--- | --- | --- |
| Foreman | 1.10.3 | [Release notes](http://theforeman.org/manuals/1.10/index.html#Releasenotesfor1.10.3) |
| FOSS Puppet | 4.4.2 | [Release notes](https://docs.puppet.com/puppet/4.4/reference/release_notes.html#puppet-442) |
| Percona Server | 5.6.29 | [Release notes](https://www.percona.com/doc/percona-server/5.6/release-notes/Percona-Server-5.6.29-76.2.html) |
| Icinga Web 2 | 2.2.3 | [Release notes](https://github.com/Icinga/icingaweb2/blob/master/ChangeLog) |
| Icinga 2 | 2.4.7 | [Release notes](https://www.icinga.org/2016/04/21/icinga-2-v2-4-7-bugfix-release/) |
| Gitlab | 8.7 | [Release notes](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) |
| Mattermost | 2.2 | [Release notes](https://github.com/mattermost/platform/releases/tag/v2.2.0) |
| ElasticSearch | 2.3.2 | [Release notes](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/release-notes-2.3.2.html) |
| Logstash | 2.1.1 | [Release notes](https://github.com/elastic/logstash/blob/2.1/CHANGELOG.md) |
| Kibana | 4.2.1 | [Release notes](https://www.elastic.co/guide/en/kibana/4.2/releasenotes.html) |
| Filebeat | 1.2.2 | [Release notes](https://www.elastic.co/guide/en/beats/libbeat/current/release-notes-1.2.2.html) |
require 'rubygems'
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'
if not ENV['SPEC_OPTS']
ENV['SPEC_OPTS'] = '--format documentation'
end
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_80chars')
PuppetSyntax.exclude_paths = [ "vendor/**/*.*" ]
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "vendor/**/*.pp"]
# Alternative configuration until https://github.com/rodjek/puppet-lint/pull/397 gets merged
Rake::Task[:lint].clear
PuppetLint::RakeTask.new :lint do |config|
config.ignore_paths = PuppetLint.configuration.ignore_paths
end
task :all => [ :validate, :metadata, :lint, :spec ]
Use like this:
0. Make sure you have installed terraform locally (https://www.terraform.io/intro/getting-started/install.html)
1. Create a token at Digital Ocean
2. Create a passwordless ssh key and upload the public key to digital ocean, then note down the fingerprint
3. Run a command like the following:
```
terraform apply \
-var "do_token=_yourtokenhere_" \
-var "pub_key=/Users/johndoe/.ssh/od_digitalocean_passwordless.pub" \
-var "pvt_key=/Users/johndoe/.ssh/od_digitalocean_passwordless" \
-var "ssh_fingerprint=67:98:56:a4:f9:cf:6a:ba:ad:1d:e6:9d:17:a5:bf:c4" \
-var "host=myhost.example.com"
```
resource "digitalocean_droplet" "host" {
image = "centos-7-0-x64"
name = "${var.host}.${var.domain}"
region = "ams2"
size = "512mb"
private_networking = true
ssh_keys = [
"${var.ssh_fingerprint}"
]
connection {
user = "root"
type = "ssh"
key_file = "${var.pvt_key}"
timeout = "2m"
}
provisioner "remote-exec" {
inline = [
"export PATH=$PATH:/usr/bin",
"sudo yum update -y -q",
"/bin/yum install -y -q epel-release http://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm",
"/bin/yum install -y -q puppet-agent",
"/opt/puppetlabs/bin/puppet config set --section main server ${var.host}.${var.domain}",
"/opt/puppetlabs/bin/puppet agent -t || true"
]
}
}
variable "do_token" {}
variable "pub_key" {}
variable "pvt_key" {}
variable "ssh_fingerprint" {}
variable "host" {
default = "puppet"
}
variable "domain" {
default = "opstheater.vm"
}
provider "digitalocean" {
token = "${var.do_token}"
}
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure('2', &Oscar.run(File.expand_path('../config', __FILE__))) if defined? Oscar
---
pe_build:
version: 2015.3.1
---
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
role: !ruby/sym master
-
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
/usr/local/bin/puppet apply /vagrant/manifests/r10k_installation.pp
/usr/local/bin/r10k deploy environment -pv
/bin/echo '==> puppet config set hiera_config /etc/puppetlabs/code/environments/production/hiera.yaml'
/usr/local/bin/puppet config set hiera_config /etc/puppetlabs/code/environments/production/hiera.yaml
/bin/echo '==> /bin/systemctl restart pe-puppetserver'
/bin/systemctl restart pe-puppetserver
/bin/echo '==> /usr/local/bin/puppet agent -t'
/usr/local/bin/puppet agent -t || true
/sbin/service puppet stop
foss-puppet-master:
provider:
type: virtualbox
customize:
- [modifyvm, !ruby/sym id, '--memory', 6144]
provisioners:
-
type: hosts
add_localhost_hostnames: false
sync_hosts: true
- type: shell
inline: |-
/bin/echo '==> Disabling firewall'
/bin/systemctl stop firewalld
/bin/systemctl disable firewalld
/bin/yum install -y -q https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm epel-release
/bin/yum install -y -q puppetserver
/opt/puppetlabs/bin/puppet module install puppetlabs/puppetdb --version 5.1.2
/opt/puppetlabs/bin/puppet module install puppetlabs/vcsrepo --version 1.3.2
/opt/puppetlabs/bin/puppet module install zack/r10k --version 3.2.0
/opt/puppetlabs/bin/puppet module install abrader/gms --version 1.0.2
/opt/puppetlabs/bin/puppet module install ajcrowe/supervisord --ignore-dependencies --version 0.6.0
/bin/echo '==> Set puppetserver hostname'
/opt/puppetlabs/bin/puppet apply -e 'ini_setting { "set master hostname": ensure => present, section => "main", value => $::fqdn, path => "/etc/puppetlabs/puppet/puppet.conf", setting => "server" }'
/bin/echo '==> Set puppetserver autosign'
/opt/puppetlabs/bin/puppet apply -e 'file { "/etc/puppetlabs/puppet/autosign.conf": ensure => file, content => "$::fqdn\n*\n", }'
/bin/touch /etc/puppetlabs/code/environments/production/manifests/site.pp
/opt/puppetlabs/bin/puppet resource service puppetserver enable=true
/bin/systemctl start puppetserver
/bin/yum groupinstall -y -q "Development Tools" "Development Libraries"
/bin/echo '==> Install + configure foreman and smart proxy'
/opt/puppetlabs/bin/puppet apply /vagrant/manifests/foreman_installation.pp
/opt/puppetlabs/bin/puppet apply -e 'ini_setting { "set foreman report ": ensure => present, section => "main", value => "log,foreman", path => "/etc/puppetlabs/puppet/puppet.conf", setting => "reports" }'
/usr/bin/gem install bundler --no-ri --quiet --no-verbose
/bin/echo '==> /usr/local/bin/bundle install --without mysql2 sqlite test --path vendor'
cd /opt/foreman; /usr/local/bin/bundle install --without mysql2 sqlite test --path vendor --quiet
/bin/echo '==> /usr/local/bin/bundle update foreman_default_hostgroup'
cd /opt/foreman; /usr/local/bin/bundle update foreman_default_hostgroup
/bin/echo '==> RAILS_ENV=production bundle exec rake db:migrate'
RAILS_ENV=production bundle exec rake db:migrate --quiet
/bin/echo '==> RAILS_ENV=production bundle exec rake assets:precompile locale:pack apipie:cache'
RAILS_ENV=production bundle exec rake assets:precompile locale:pack apipie:cache --quiet
/bin/echo '==> RAILS_ENV=production bundle exec rake db:seed'
CREDENTIALS=`RAILS_ENV=production bundle exec rake db:seed --quiet | grep "Login"`
/bin/echo '==> /usr/local/bin/bundle install --without development test --path vendor --quiet'
cd /opt/smart-proxy; /usr/local/bin/bundle install --without development test --path vendor --quiet
cd /opt/smart-proxy; /usr/local/bin/bundle update rubocop
/bin/echo '==> Configure supervisord for foreman and smart-proxy'
/opt/puppetlabs/bin/puppet apply /vagrant/manifests/foreman_post_install.pp
PASSWD=`/bin/echo $CREDENTIALS | awk ' { print $NF } '`
/bin/echo '==> Clear iptables rules'
/sbin/iptables -F
/bin/echo '==> Add new smart proxy to Foreman'
/bin/sleep 20
/bin/curl -k -s -u admin:$PASSWD -H "Accept: version=2,application/json" -H "Content-Type: application/json" -X POST -d '{ "name": "foreman", "url": "https://master.opstheater.vm:8443" } ' http://master.opstheater.vm:3000/api/smart_proxies
/bin/echo '==> Import all puppet classes and environments to Foreman'
/bin/curl -k -s -u admin:$PASSWD -H "Accept: version=2,application/json" -H "Content-Type: application/json" -X POST -d '{ }' http://master.opstheater.vm:3000/api/smart_proxies/1/import_puppetclasses
/bin/echo '==> Create OpsTheater hostgroup'
/bin/curl -k -s -u admin:$PASSWD -H "Accept: version=2,application/json" -H "Content-Type: application/json" -X POST -d '{ "name": "OpsTheater Infra", "environment_id": "1", "puppet_ca_proxy_id": "1", "puppet_proxy_id": "1" } ' http://master.opstheater.vm:3000/api/hostgroups
/bin/echo '==> /bin/systemctl restart puppetserver'
/bin/systemctl restart puppetserver
/bin/echo '==> Setup R10K'
/opt/puppetlabs/bin/puppet apply /vagrant/manifests/r10k_installation.pp
/opt/puppetlabs/puppet/bin/r10k deploy environment -pv
/bin/echo '==> puppet config set hiera_config /etc/puppetlabs/code/environments/production/hiera.yaml'
/opt/puppetlabs/bin/puppet config set hiera_config /etc/puppetlabs/code/environments/production/hiera.yaml
/bin/echo '==> /bin/systemctl restart puppetserver'
/bin/systemctl restart puppetserver
/bin/echo '==> Update Foreman puppet environments'
/bin/curl -k -s -u admin:$PASSWD -H "Accept: version=2,application/json" -H "Content-Type: application/json" -X POST -d '{ }' http://master.opstheater.vm:3000/api/smart_proxies/1/import_puppetclasses
/bin/echo '==> /opt/puppetlabs/bin/puppet agent -t'
/opt/puppetlabs/bin/puppet agent -t || true
/bin/systemctl stop puppet
/bin/echo '==> Foreman URL: http://master.opstheater.vm:3000'
/bin/echo "==> $CREDENTIALS"
pe-puppet-agent:
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
pe-puppet-agent-2g:
provider:
type: virtualbox
customize:
- [modifyvm, !ruby/sym id, '--memory', 2048]
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
foss-puppet-agent:
provisioners:
-
type: hosts
add_localhost_hostnames: false
sync_hosts: true
-
type: shell
inline: |-
/bin/yum install -y epel-release http://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
/bin/yum install -y puppet-agent
/opt/puppetlabs/bin/puppet config set --section main server master.opstheater.vm
/sbin/service puppet stop
foss-puppet-agent-el6:
provisioners:
-
type: hosts
add_localhost_hostnames: false
sync_hosts: true
-
type: shell
inline: |-
/usr/bin/yum install -y epel-release http://yum.puppetlabs.com/puppetlabs-release-pc1-el-6.noarch.rpm
/usr/bin/yum install -y puppet-agent
/opt/puppetlabs/bin/puppet config set --section main server master.opstheater.vm
/sbin/service puppet stop
---
vms:
## puppet enterprise master
- name: master
box: puppetlabs/centos-7.0-64-nocm
private_networks: [ {ip: '10.20.1.10'} ]
hostname: master.opstheater.vm
roles:
- pe-puppet-master
## FOSS puppet master
- name: foss-master
box: puppetlabs/centos-7.0-64-nocm
private_networks: [ {ip: '10.20.1.10'} ]
hostname: master.opstheater.vm
roles:
- foss-puppet-master
## icinga server
- name: icinga2
box: puppetlabs/centos-7.0-64-nocm
private_networks: [ {ip: '10.20.1.20'} ]
hostname: icinga2.opstheater.vm
roles:
- foss-puppet-agent
## elasticsearch + kibana
- name: elasticsearch
box: puppetlabs/centos-6.6-64-nocm
private_networks: [ {ip: '10.20.1.30'} ]
hostname: elasticsearch.opstheater.vm
roles:
- foss-puppet-agent-el6
## gitlab + gitlabci + matter most
- name: gitlab
box: puppetlabs/centos-7.0-64-nocm
private_networks: [ {ip: '10.20.1.50'} ]
hostname: gitlab.opstheater.vm
roles:
- foss-puppet-agent
## mysql
- name: mysql
box: puppetlabs/centos-7.0-64-nocm
private_networks: [ {ip: '10.20.1.60'} ]
hostname: mysql.opstheater.vm
roles:
- foss-puppet-agent
- name: peclient
box: puppetlabs/centos-7.0-64-nocm
private_networks: [ {ip: '10.20.1.200'} ]
hostname: peclient.opstheater.vm
roles:
- pe-puppet-agent
- name: fossclient
box: puppetlabs/centos-7.0-64-nocm
private_networks: [ {ip: '10.20.1.201'} ]
hostname: fossclient.opstheater.vm
roles:
- foss-puppet-agent
---
production:
adapter: postgresql
database: foreman
username: foreman
password: password
host: localhost
---
:default_hostgroup:
:facts_map:
"OpsTheater Infra":
"hostname": "*"
# copy this file to your report dir - e.g. /usr/lib/ruby/1.8/puppet/reports/
# add this report in your puppetmaster reports - e.g, in your puppet.conf add:
# reports=log, foreman # (or any other reports you want)
# configuration is in /etc/puppet/foreman.yaml
require 'puppet'
require 'net/http'
require 'net/https'
require 'rbconfig'
require 'uri'
require 'yaml'
begin
require 'json'
rescue LoadError
# Debian packaging guidelines state to avoid needing rubygems, so
# we only try to load it if the first require fails (for RPMs)
begin