Steps with explanations to set up a server using:
- Virtualenv
- Virtualenvwrapper
- Django
- Gunicorn
source :rubygems | |
gem "puma" | |
gem "sinatra" |
root@ubuntu1404-4:/var/tmp/serverspec# cat spec/localhost/sample_spec.rb | |
require 'spec_helper' | |
describe package('sensu') do | |
it { should be_installed } | |
end | |
describe package('sensu-plugin') do | |
it { should be_installed.by('gem').with_version('1.3.1') } | |
end |
#!/opt/sensu/embedded/bin/ruby | |
require 'net/http' | |
require 'json' | |
def get_uri(url) | |
URI(url) | |
end |
#!/opt/sensu/embedded/bin/ruby | |
require 'net/http' | |
require 'json' | |
module Sensu | |
class Api | |
attr_reader :server, :port | |
def initialize(server='localhost', port=4567) |
#!/opt/sensu/embedded/bin/ruby | |
require 'net/http' | |
require 'json' | |
require 'optparse' | |
module Sensu | |
class Api | |
attr_reader :server, :port | |
def initialize(server='localhost', port=4567) |
#!/opt/sensu/embedded/bin/ruby | |
require 'net/http' | |
require 'json' | |
require 'optparse' | |
module Sensu | |
class Api | |
attr_reader :server, :port | |
def initialize(server='localhost', port=4567) |
root@master:/etc/puppet# cat /tmp/modules/foo/templates/foo | |
<%- | |
def yaml_indent(conds) | |
return_val = [] | |
tmp_val = conds.to_yaml.split("\n") | |
tmp_val.delete('---') | |
tmp_val.each do |val| | |
return_val << " " + val | |
end | |
return_val.join("\n") |
#MongoDB 3.2.x Sharding Sharding is used when the database is too large to run on a single server and you need to spread the load across multiple servers. The name itself refers to the breaking (sharding) of the data into seperate groups of data which will reside on different servers.
##Configuration Server Start the server on your server (myserver0)
mongod --configsvr --dbpath /data
On myserver1 start the shard giving the configuration server as the --configdb
option
input { | |
beats { | |
port => 5144 | |
codec => json | |
} | |
} | |
filter { |