This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
cluster = { | |
"master" => { :ip => "192.168.33.10", :cpus => 1, :mem => 1024 }, | |
"slave" => { :ip => "192.168.33.11", :cpus => 1, :mem => 1024 } | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description="Hello Service 01" | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
TimeoutStartSec=0 | |
ExecStartPre=-/usr/bin/docker kill busybox1 | |
ExecStartPre=-/usr/bin/docker rm busybox1 | |
ExecStartPre=-/usr/bin/docker pull busybox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from flask import g | |
from flask import Response | |
from flask import request | |
import json | |
import MySQLdb | |
app = Flask(__name__) | |
@app.before_request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import random | |
import time | |
import statsd | |
ctr_name = 'stats.test.1' | |
while True: | |
client = statsd.StatsClient('localhost', 8125) | |
rand = random.randrange(1, 250) | |
print('count: (%d)' % rand) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#=============================================================================== | |
# BROKER (S1_Broker) | |
#=============================================================================== | |
# Description: The broker is responsible for: | |
# - Exporting centralized logs of all Shinken daemon processes | |
# - Exporting status data | |
# - Exporting performance data | |
# - Exposing Shinken APIs: | |
# - Status data | |
# - Performance data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Module: webui | |
## Loaded by: Broker | |
# The Shinken web interface and integrated web server. | |
define module { | |
module_name webui | |
module_type webui | |
host 0.0.0.0 ; All interfaces = 0.0.0.0 | |
port 7767 | |
auth_secret CHANGE_ME ; CHANGE THIS or someone could forge cookies | |
allow_html_output 1 ; Allow or not HTML chars in plugins output. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define host{ | |
use linux,ssh | |
contact_groups admins | |
host_name localhost | |
address localhost | |
_SNMPCOMMUNITY snmpP@ss | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define host { | |
use linux-snmp,ftp,ssh | |
host_name hostname2 | |
address 192.168.33.11 | |
_SNMPCOMMUNITY snmpP@ss | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description="My Service" | |
[Service] | |
ExecStart=/usr/bin/printf "Service trigger" | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
coreos: | |
etcd: | |
# generate a new token for each unique cluster from https://discovery.etcd.io/new | |
# WARNING: replace each time you 'vagrant destroy' | |
discovery: https://discovery.etcd.io/c1b9507afe3f4f7c75430a138f5886c | |
addr: $public_ipv4:4001 | |
peer-addr: $public_ipv4:7001 | |
etcd2: |
NewerOlder