Setup for 1 VM running everything

This commit is contained in:
Tim Kuhlman 2014-05-13 14:52:38 -06:00
parent 65cdce7c99
commit 891502c505
8 changed files with 45 additions and 101 deletions

94
Vagrantfile vendored
View File

@ -7,95 +7,21 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Settings for all vms
config.berkshelf.enabled = true
# To enable hLinux reverse the commented lines below and all of the 'chef.synced_folder_type = rsync' lines
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
#config.vm.box = "hlinux"
#config.vm.box_url = "http://packages.dev.uswest.hpcloud.net/cloud/som/hlinux.box"
#config.vm.guest = :debian # bypass vagrant guest type autodetection
# hlinux is not currently working with virtual box shared folders so minimize shared folders and switch to rsync
config.vm.synced_folder "~/", "/vagrant_home"
#config.vm.synced_folder ".", "/vagrant", disabled: true
# One vm running all the services
config.vm.hostname = 'mini-mon'
config.vm.network :private_network, ip: "192.168.10.4"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "768"]
# vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
# vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
vb.memory = 6144
vb.cpus = 4
end
# VM specific settings, these machines come up in order they are specified.
config.vm.define "mysql" do |mysql|
mysql.vm.hostname = 'mysql'
mysql.vm.network :private_network, ip: "192.168.10.6"
mysql.vm.provision :chef_solo do |chef|
#chef.synced_folder_type = "rsync"
chef.roles_path = "roles"
chef.data_bags_path = "data_bags"
chef.add_role "MySQL"
end
end
config.vm.define "kafka" do |kafka|
kafka.vm.hostname = 'kafka'
kafka.vm.network :private_network, ip: "192.168.10.10"
kafka.vm.provision :chef_solo do |chef|
#chef.synced_folder_type = "rsync"
chef.roles_path = "roles"
chef.data_bags_path = "data_bags"
chef.add_role "Kafka"
end
kafka.vm.provider "virtualbox" do |vb|
vb.memory = 1024
end
end
config.vm.define "vertica" do |vertica|
vertica.vm.hostname = 'vertica'
vertica.vm.network :private_network, ip: "192.168.10.8"
vertica.vm.provision :chef_solo do |chef|
#chef.synced_folder_type = "rsync"
chef.roles_path = "roles"
chef.data_bags_path = "data_bags"
chef.add_role "Vertica"
end
vertica.vm.provider "virtualbox" do |vb|
vb.memory = 2048 # Vertica is pretty strict about its minimum
end
end
config.vm.define "api" do |api|
api.vm.hostname = 'api'
api.vm.network :private_network, ip: "192.168.10.4"
api.vm.provision :chef_solo do |chef|
#chef.synced_folder_type = "rsync"
chef.roles_path = "roles"
chef.data_bags_path = "data_bags"
chef.add_role "Api"
end
end
config.vm.define "persister" do |persister|
persister.vm.hostname = 'persister'
persister.vm.network :private_network, ip: "192.168.10.12"
persister.vm.provision :chef_solo do |chef|
#chef.synced_folder_type = "rsync"
chef.roles_path = "roles"
chef.data_bags_path = "data_bags"
chef.add_role "Persister"
end
persister.vm.provider "virtualbox" do |vb|
vb.memory = 1024
end
end
config.vm.define "thresh" do |thresh|
thresh.vm.hostname = 'thresh'
thresh.vm.network :private_network, ip: "192.168.10.14"
thresh.vm.provision :chef_solo do |chef|
#chef.synced_folder_type = "rsync"
chef.roles_path = "roles"
chef.data_bags_path = "data_bags"
chef.add_role "Thresh"
end
config.vm.provision :chef_solo do |chef|
chef.roles_path = "roles"
chef.data_bags_path = "data_bags"
chef.add_role "Mini-Mon"
end
end

View File

@ -2,12 +2,10 @@
"id" : "mon_agent",
"dimensions" : "Origin:Mini-mon, Environment:Dev",
"log_level" : "DEBUG",
"use_dd": "no",
"dd_url": "https://app.datadoghq.com",
"api_key": "",
"send_to_mon_api": "true",
"api" : {
"mon_api_url" : "http://192.168.10.4:8080/v2.0/metrics",
"mon_api_url" : "http://localhost:8080/v2.0/metrics",
"mon_api_project_id" : "82510970543135",
"use_keystone" : "false",
"aggregate_metrics" : "true"

View File

@ -2,16 +2,16 @@
"id" : "mon_api",
"vertica" : {
"dbname" : "mon",
"hostname" : "192.168.10.8"
"hostname" : "localhost"
},
"zookeeper" : {
"hostname" : "192.168.10.10"
"hostname" : "localhost"
},
"mysql": {
"hostname":"192.168.10.6",
"hostname":"localhost",
"schema": "mon"
},
"kafka": {
"hostname": "192.168.10.10"
"hostname": "localhost"
}
}

View File

@ -7,13 +7,13 @@
"keystore_file":"hpmiddleware-keystore-production.jks"
},
"mysql": {
"hostname": "192.168.10.6",
"hostname": "localhost",
"username": "monapi",
"password": "password",
"schema": "mon"
},
"vertica": {
"hostname": "192.168.10.8",
"hostname": "localhost",
"username": "mon_api",
"password": "password",
"schema": "mon"

View File

@ -1,7 +1,7 @@
{
"id" : "hosts",
"kafka": "192.168.10.10",
"mysql": "192.168.10.6",
"kafka": "localhost",
"mysql": "localhost",
"smtp": "localhost",
"zookeeper": "localhost"
}

View File

@ -21,9 +21,9 @@
},
"vertica": {
"dbname": "mon",
"hostname": "192.168.10.8"
"hostname": "localhost"
},
"zookeeper": {
"hostname": "192.168.10.10"
"hostname": "localhost"
}
}
}

View File

@ -7,16 +7,16 @@
},
"event": {
"group": "thresh-event",
"host": "192.168.10.10:9092",
"host": "localhost:9092",
"consumer_topic": "events",
"producer_topic": "alarm-state-transitions"
}
},
"mysql": {
"db": "mon",
"host": "192.168.10.6:3306"
"host": "localhost:3306"
},
"zookeeper": {
"host": "192.168.10.10:2181"
"host": "localhost:2181"
}
}

20
roles/Mini-Mon.json Normal file
View File

@ -0,0 +1,20 @@
{
"name": "Mini-Mon",
"description": "Sets up the entire monitoring stack on one box",
"json_class": "Chef::Role",
"default_attributes": {
},
"override_attributes": {
},
"chef_type": "role",
"run_list": [
"role[MySQL]",
"role[Kafka]",
"role[Vertica]",
"role[Api]",
"role[Persister]",
"role[Thresh]"
],
"env_run_lists": {
}
}