AWS
EC2
インスタンスCentOS 6.5
Chef
はOmnibus Installer
にてインストール済みChef Handlers
→chef-handler-graphite
→Graphite
とかで結果を可視化している(Sensu Server
とはあまり関係無いw)
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
Warning: Deprecation notice: Resource references should now be capitalized on line 11 in file /etc/puppet/manifests/site.pp | |
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults | |
Notice: Compiled catalog for ip-xxx-xxx-xxx-xxx.ec2.internal in environment production in 4.85 seconds | |
Notice: /Stage[main]/Main/Node[default]/Rabbitmq_vhost[/sensu]/ensure: created | |
Notice: /Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure: ensure changed 'stopped' to 'running' | |
Notice: /Stage[main]/Sensu::Api::Service/Service[sensu-api]/ensure: ensure changed 'stopped' to 'running' | |
Notice: /Stage[main]/Sensu::Server::Service/Service[sensu-server]/ensure: ensure changed 'stopped' to 'running' | |
Notice: /Stage[main]/Sensu::Dashboard::Service/Service[sensu-dashboard]/ensure: ensure changed 'stopped' to 'running' | |
Notice: /Stage[main]/Main/Node[default]/Rabbitmq_user_permissions[sensu@/sensu]/ensure: created | |
Notice: Finished catalog run in 23.26 seconds |
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
require 'spec_helper' | |
PACKAGES = [ | |
'sensu' , | |
'redis' , | |
'rabbitmq-server' | |
] | |
PACKAGES.each do |pkg| | |
describe package pkg do | |
it { should be_installed } |
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
node default { | |
include 'docker' | |
$IMAGES = ['centos','ubuntu'] | |
docker::image { $IMAGES : | |
ensure => 'present', | |
} | |
$CONTAINER = ['container1','container2'] | |
docker::run { $CONTAINER : | |
image => 'centos', | |
command => 'echo "a"', |
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
include_recipe "docker" | |
# | |
docker_image 'centos' | |
# | |
docker_container 'centos' do | |
command 'echo "a"' | |
detach true | |
end |
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
Recipe: docker-test::default | |
* docker_image[centos] action pull[2014-05-04T21:41:21+00:00] INFO: Processing docker_image[centos] action pull (docker-test::default line 3) | |
* docker_container[centos] action run[2014-05-04T21:42:26+00:00] INFO: Processing docker_container[centos] action run (docker-test::default line 5) | |
Recipe: <Dynamically Defined Resource> | |
* template[/etc/init.d/centos] action create[2014-05-04T21:42:27+00:00] INFO: Processing template[/etc/init.d/centos] action create (/root/chef-repo-test/cookbooks/docker/providers/container.rb line 402) | |
[2014-05-04T21:42:28+00:00] INFO: template[/etc/init.d/centos] created file /etc/init.d/centos |
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
{ | |
"node": { | |
"name": "ip-xxx-xxx-x-xxx.ec2.internal", | |
"chef_environment": "_default", | |
"json_class": "Chef::Node", | |
"automatic": { | |
"chef_packages": { | |
"ohai": { | |
"version": "7.0.4", | |
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.0.4/lib/ohai" |
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
[root@ip-xxx-xxx-x-xx]# /usr/lib/python2.6/site-packages/graphite/manage.py syncdb | |
/usr/lib/python2.6/site-packages/graphite/settings.py:231: UserWarning: SECRET_KEY is set to an unsafe default. This should be set in local_settings.py for better security | |
warn('SECRET_KEY is set to an unsafe default. This should be set in local_settings.py for better security') | |
/usr/lib/python2.6/site-packages/django/conf/__init__.py:75: DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead. | |
"use STATIC_URL instead.", DeprecationWarning) | |
/usr/lib/python2.6/site-packages/django/core/cache/__init__.py:82: DeprecationWarning: settings.CACHE_* is deprecated; use settings.CACHES instead. | |
DeprecationWarning | |
Creating tables ... | |
Creating table account_profile | |
Creating table account_variable |
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
{ | |
"name": "sensu-client", | |
"default_attributes": { | |
}, | |
"override_attributes": { | |
}, | |
"run_list": [ | |
"sensu::default", | |
"sensu::client_service" | |
] |