Giter VIP home page Giter VIP logo

minhnhut0602 / icinga-vagrant Goto Github PK

View Code? Open in Web Editor NEW

This project forked from icinga/icinga-vagrant

0.0 1.0 0.0 14.54 MB

Vagrant boxes for Icinga 2, Icinga Web 2 and integrations (Graphite, InfluxDB, Elastic, Graylog, etc.)

Home Page: https://www.icinga.com/icinga-demo/

Ruby 57.90% Shell 1.44% Puppet 22.87% Perl 8.24% PHP 0.10% HTML 9.36% Makefile 0.04% Pascal 0.04% Python 0.01%

icinga-vagrant's Introduction

Icinga Vagrant Boxes

Table of Contents

  1. About
  2. Support
  3. Requirements
  4. Providers
  5. Run
  6. Boxes
  7. Development

About

The Icinga Vagrant boxes allow you to run Icinga 2, Icinga Web 2 and integrations (Graphite, InfluxDB, Grafana, Elastic Stack, Graylog) in various scenarios.

A simple vagrant up fully installs these VMs and you are ready to explore the Icinga ecosystem. You can use these boxes for your own local demos, or to learn how to install and configure Icinga.

Icinga Web 2

Icinga Web 2 Dashboard

Icinga Web 2 Detail View with Grafana

Icinga Web 2 Maps

Icinga Web 2 Business Process

Icinga Web 2 Director

Dashing

Dashing

Elastic & Icingabeat

Elastic Stack and Icingabeat

Grafana

Icinga 2 Grafana with Graphite

Support

Please note that these boxes are built for demos and development tests only. Several boxes will run snapshot builds and unstable code to test the latest and the greatest.

You can also use them to test Icinga packages prior to the next release.

In case you've found a problem or want to submit a patch, please open an issue on GitHub and/or create a PR.

Requirements

Note: If you are on Windows, 1.9.4 is broken.

One of these virtualization providers:

Each Vagrant box setup requires at least 2 Cores and 2 GB RAM. The required resources are automatically configured during the vagrant up run.

Linux

VirtualBox

Example on Fedora (needs RPMFusion repository for VirtualBox):

sudo dnf install vagrant
sudo dnf install virtualbox
vagrant plugin install virtualbox

Fedora uses libvirt by default. More details on VirtualBox can be found here.

Example on Ubuntu:

$ sudo apt-get install vagrant
$ sudo apt-get install virtualbox

Windows

Windows requires VirtualBox as provider. You'll also need the Git package which includes SSH.

Install the Git package and set autocrlf to false.

Windows Git CRLF

You can also set the options on the command line afterwards:

C:\Users\michi> git.exe config --global core.autocrlf false

Set the Windows command line as default:

Windows Git Command Line

Then clone this repository:

C:\Users\michi\Documents> git.exe clone https://github.com/Icinga/icinga-vagrant

Windows Git Clone

Note

If vagrant up hangs with Vagrant 2.0.0 on Windows 7, you might need to upgrade your Powershell version. See this note for details.

Providers

Choose one of the providers below. VirtualBox can be used nearly everwhere. If you have a Parallels Pro license on macOS, or prefer to use libvirt, that's possible too.

Virtualbox Provider

If Virtualbox is installed, this will be enabled by default.

Parallels Provider

You'll need to install the vagrant-parallels plugin first:

$ vagrant plugin install vagrant-parallels

The Parallels provider uses the Parallels CentOS base box.

Libvirt Provider

You should have qemu and libvirt installed if you plan to run Vagrant on your local system. Then install the vagrant-libvirt` plugin:

$ vagrant plugin install vagrant-libvirt

The libvirt provider uses the official CentOS base boxes.

Note: Full libvirt support is pending. Please help test and send in patches for #52.

Additional Plugins

Behind a proxy

If you are working behind a proxy, you can use the proxyconf plugin.

Install the plugin:

$ vagrant plugin install vagrant-proxyconf

Export the proxy variables into your environment:

$ export VAGRANT_HTTP_PROXY=http://proxy:8080
$ export VAGRANT_HTTPS_PROXY=http://proxy:8080

Vagrant exports the proxy settings into the VM and provisioning will then work.

Run

Change the directory to the box you want to start.

Example icinga2x:

$ cd icinga2x

You can only do vagrant up in a box directory. Verify that by checking for the existance of the Vagrantfile file in the current directory.

Vagrant Commands

Start

Start all VMs:

Linux:

$ vagrant up

Windows:

Windows Vagrant Up

Depending on the provider you have chosen above, you might want to set it explicitely:

$ vagrant up --provider=virtualbox

SSH

SSH into the box as local vagrant user (Tip: Use sudo -i to become root):

$ vagrant ssh

Note

Multi-VM boxes require the hostname for vagrant ssh like so: vagrant ssh icinga2b. That works in a similar fashion for other sub commands.

Stop

Stop all VMs:

$ vagrant halt

Update/Soft Reset

Update packages/reset configuration for all VMs:

$ vagrant provision

Destroy

Destroy the VM (add -f to avoid the safety question)

$ vagrant destroy

More Usability Hints

Documentation for software used inside these boxes.

Project URL
Icinga 2 https://www.icinga.com/docs/icinga2/latest/doc/01-about/
Icinga Web 2 https://www.icinga.com/docs/icingaweb2/latest/doc/01-About/
Director https://www.icinga.com/docs/director/latest/doc/01-Introduction/
NagVis https://www.nagvis.org/doc
Graphite https://graphite.readthedocs.io
InfluxDB https://docs.influxdata.com/influxdb/
Grafana https://docs.grafana.org
Elastic https://www.elastic.co/guide/
Graylog http://docs.graylog.org

Vagrant update

On local config change (git pull for this repository).

$ pwd
$ git pull
$ git log
$ vagrant provision

Boxes

Icinga 2 Standalone

Run Vagrant:

$ cd icinga2x && vagrant up

Application Interfaces

Application Url Credentials
Icinga Web 2 http://192.168.33.5/icingaweb2 icingaadmin/icinga
Icinga 2 API https://192.168.33.5:5665/v1 root/icinga
Graphite Web http://192.168.33.5:8003 -
Grafana http://192.168.33.5:8004 admin/admin
Dashing http://192.168.33.5:8005 -

Note: In case Dashing is not running, restart it manually:

$ vagrant ssh -c "sudo systemctl start dashing-icinga2"

Icinga 2 Cluster

Run Vagrant:

$ cd icinga2x-cluster && vagrant up

Application Interfaces

Application Url Credentials
Icinga Web 2 http://192.168.33.10/icingaweb2 icingaadmin/icinga
Icinga Web 2 http://192.168.33.20/icingaweb2 icingaadmin/icinga
Icinga 2 API https://192.168.33.10:5665/v1 root/icinga
Icinga 2 API https://192.168.33.20:5665/v1 root/icinga

Icinga 2 HA Cluster

Run Vagrant:

$ cd icinga2x-ha-cluster && vagrant up

Application Interfaces

Application Url Credentials
Icinga Web 2 http://192.168.33.101/icingaweb2 icingaadmin/icinga
Icinga Web 2 http://192.168.33.102/icingaweb2 icingaadmin/icinga
Icinga Web 2 http://192.168.33.103/icingaweb2 icingaadmin/icinga
Icinga 2 API https://192.168.33.101:5665/v1 root/icinga
Icinga 2 API https://192.168.33.102:5665/v1 root/icinga
Icinga 2 API https://192.168.33.103:5665/v1 root/icinga

Icinga 2 InfluxDB

Run Vagrant:

$ cd icinga2x-influxdb && vagrant up

Application Interfaces

Application Url Credentials
Icinga Web 2 http://192.168.33.8/icingaweb2 icingaadmin/icinga
Icinga 2 API https://192.168.33.8:5665/v1 root/icinga
Grafana http://192.168.33.8:8004 admin/admin

Icinga 2 and Elastic Stack

Run Vagrant:

$ cd icinga2x-elastic && vagrant up

Note: Logstash integration is missing in #31.

Application Interfaces

Application Url Credentials
Icinga Web 2 http://192.168.33.7/icingaweb2 icingaadmin/icinga
Icinga 2 API https://192.168.33.7:5665/v1 root/icinga
Kibana https://192.168.33.7:5601 icinga/icinga
Elasticsearch/Nginx https://192.168.33.7:9200 icinga/icinga

Icinga 2 and Graylog

Run Vagrant:

$ cd icinga2x-graylog && vagrant up

Application Interfaces

Application Url Credentials
Icinga Web 2 http://192.168.33.6/icingaweb2 icingaadmin/icinga
Icinga 2 API https://192.168.33.6:5665/v1 root/icinga
Graylog http://192.168.33.6:9000 admin/admin

Development

Base Boxes

Provider Base Box
VirtualBox Bento.
Parallels Parallels
libvirt libvirt

Pull updates.

vagrant box update

Tools

InfluxDB

Current version via HTTP API:

curl -sl -I 192.168.33.8:8086/ping

Puppet Module Overview

The Vagrant boxes use these imported puppet modules for provisioning. The modules are pulled into this repository as git subtree.

General:

Name Path Url
puppetlabs-stdlib modules/stdlib https://github.com/puppetlabs/puppetlabs-stdlib.git
puppetlabs-concat modules/concat https://github.com/puppetlabs/puppetlabs-concat.git
puppetlabs-apache modules/apache https://github.com/puppetlabs/puppetlabs-apache.git
puppetlabs-mysql modules/mysql https://github.com/puppetlabs/puppetlabs-mysql.git
puppetlabs-postgresql modules/postgresql https://github.com/puppetlabs/puppetlabs-postgresql.git
puppetlabs-vcsrepo modules/vcsrepo https://github.com/puppetlabs/puppetlabs-vcsrepo.git
puppet-module-epel modules/epel https://github.com/stahnma/puppet-module-epel.git
puppet-php modules/php https://github.com/thias/puppet-php.git
puppet-selinux modules/selinux https://github.com/voxpupuli/puppet-selinux.git (branch puppet3)
puppetlabs-java modules/java https://github.com/puppetlabs/puppetlabs-java.git
puppet-yum modules/yum https://github.com/CERIT-SC/puppet-yum.git
puppet-wget modules/wget https://github.com/maestrodev/puppet-wget.git
puppet-archive modules/archive https://github.com/voxpupuli/puppet-archive.git
puppet-vim modules/vim https://github.com/saz/puppet-vim.git
puppet-lib-file_contact modules/file_contact https://github.com/electrical/puppet-lib-file_concat.git
puppet-sysctl modules/sysctl https://github.com/thias/puppet-sysctl.git
puppet-datacat modules/datacat https://github.com/richardc/puppet-datacat.git

Specific projects:

Name Path Url
puppet-graylog modules/graylog https://github.com/Graylog2/puppet-graylog.git
puppet-elasticsearch modules/elasticsearch https://github.com/elasticsearch/puppet-elasticsearch.git
puppet-nginx modules/nginx https://github.com/voxpupuli/puppet-nginx.git (branch puppet3)
puppet-logstash modules/logstash https://github.com/elastic/puppet-logstash.git
puppet-kibana modules/kibana https://github.com/elastic/puppet-kibana.git
puppet-filebeat modules/filebeat https://github.com/pcfens/puppet-filebeat.git
puppetlabs-mongodb modules/mongodb https://github.com/puppetlabs/puppetlabs-mongodb.git
golja-influxdb modules/influxdb https://github.com/n1tr0g/golja-influxdb.git including a PR for 1.0.0 support
puppet-graphite modules/graphite Patched for systemd usage from https://github.com/echocat/puppet-graphite.git
puppet-grafana modules/grafana https://github.com/bfraser/puppet-grafana.git
graylog2-puppet modules/graylog2 https://github.com/Graylog2/graylog2-puppet.git

Puppet Module Git Subtree

Notes for developers only.

Add subtree:

$ git subtree add --prefix modules/vim https://github.com/saz/puppet-vim master --squash

Update subtree:

$ git subtree pull --prefix modules/postgresql https://github.com/puppetlabs/puppetlabs-postgresql.git master --squash

icinga-vagrant's People

Contributors

bernd avatar dnsmichi avatar gunnarbeutner avatar hggh avatar kesselb avatar kornm avatar mightydok avatar multi-io avatar nbuchwitz avatar ruzickap avatar tomdc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.