wakame 0.4.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. data/History.txt +8 -0
  2. data/Rakefile +3 -3
  3. data/VERSION +1 -1
  4. data/app_generators/wakame/templates/cluster/resources/markers/http_application_server.rb +3 -0
  5. data/app_generators/wakame/templates/cluster/resources/markers/http_asset_server.rb +2 -0
  6. data/app_generators/wakame/templates/cluster/resources/markers/http_server.rb +9 -0
  7. data/app_generators/wakame/templates/config/cluster.rb +36 -99
  8. data/app_generators/wakame/templates/config/init.d/wakame-agent +3 -3
  9. data/app_generators/wakame/templates/config/init.d/wakame-master +3 -3
  10. data/app_generators/wakame/wakame_generator.rb +5 -1
  11. data/contrib/imagesetup.sh +9 -5
  12. data/lib/ext/uri.rb +13 -0
  13. data/lib/wakame/action.rb +46 -21
  14. data/lib/wakame/{rule_engine.rb → action_manager.rb} +148 -36
  15. data/lib/wakame/actions/deploy_config.rb +35 -0
  16. data/lib/wakame/actions/launch_cluster.rb +8 -10
  17. data/lib/wakame/actions/launch_vm.rb +26 -20
  18. data/lib/wakame/actions/migrate_service.rb +30 -19
  19. data/lib/wakame/actions/notify_child_changed.rb +34 -0
  20. data/lib/wakame/actions/notify_parent_changed.rb +34 -0
  21. data/lib/wakame/actions/propagate_resource.rb +27 -0
  22. data/lib/wakame/actions/propagate_service.rb +27 -0
  23. data/lib/wakame/actions/reload_service.rb +21 -9
  24. data/lib/wakame/actions/shutdown_cluster.rb +3 -3
  25. data/lib/wakame/actions/shutdown_vm.rb +14 -5
  26. data/lib/wakame/actions/start_service.rb +53 -47
  27. data/lib/wakame/actions/stop_service.rb +35 -23
  28. data/lib/wakame/actor/system.rb +6 -3
  29. data/lib/wakame/agent.rb +29 -7
  30. data/lib/wakame/amqp_client.rb +26 -5
  31. data/lib/wakame/command/action_status.rb +7 -7
  32. data/lib/wakame/command/actor.rb +10 -10
  33. data/lib/wakame/command/import_cluster_config.rb +10 -0
  34. data/lib/wakame/command/launch_cluster.rb +2 -2
  35. data/lib/wakame/command/launch_vm.rb +3 -3
  36. data/lib/wakame/command/migrate_service.rb +7 -7
  37. data/lib/wakame/command/propagate_resource.rb +42 -0
  38. data/lib/wakame/command/propagate_service.rb +21 -19
  39. data/lib/wakame/command/reload_service.rb +3 -13
  40. data/lib/wakame/command/shutdown_cluster.rb +2 -2
  41. data/lib/wakame/command/start_service.rb +14 -0
  42. data/lib/wakame/command/status.rb +32 -10
  43. data/lib/wakame/command/stop_service.rb +27 -21
  44. data/lib/wakame/command.rb +19 -3
  45. data/lib/wakame/command_queue.rb +87 -67
  46. data/lib/wakame/configuration.rb +6 -0
  47. data/lib/wakame/event.rb +17 -0
  48. data/lib/wakame/event_dispatcher.rb +32 -23
  49. data/lib/wakame/graph.rb +2 -1
  50. data/lib/wakame/initializer.rb +11 -8
  51. data/lib/wakame/master.rb +327 -209
  52. data/lib/wakame/monitor/agent.rb +5 -1
  53. data/lib/wakame/monitor/service.rb +6 -5
  54. data/lib/wakame/packets.rb +13 -21
  55. data/lib/wakame/runner/administrator_command.rb +383 -264
  56. data/lib/wakame/runner/agent.rb +1 -5
  57. data/lib/wakame/runner/master.rb +0 -3
  58. data/lib/wakame/service.rb +817 -538
  59. data/lib/wakame/status_db.rb +383 -0
  60. data/lib/wakame/template.rb +27 -130
  61. data/lib/wakame/trigger.rb +10 -18
  62. data/lib/wakame/triggers/instance_count_update.rb +1 -1
  63. data/lib/wakame/triggers/load_history.rb +1 -1
  64. data/lib/wakame/triggers/maintain_ssh_known_hosts.rb +8 -5
  65. data/lib/wakame/triggers/shutdown_unused_vm.rb +1 -1
  66. data/lib/wakame/util.rb +64 -55
  67. data/lib/wakame.rb +4 -0
  68. data/tests/test_action_manager.rb +111 -0
  69. data/tests/test_service.rb +128 -23
  70. data/tests/test_status_db.rb +82 -0
  71. data/tests/test_uri_amqp.rb +10 -0
  72. data/wakame_generators/resource/templates/apache_app/apache_app.rb +19 -18
  73. data/wakame_generators/resource/templates/apache_app/conf/apache2.conf +14 -2
  74. data/wakame_generators/resource/templates/apache_app/conf/system-app.conf +1 -1
  75. data/wakame_generators/resource/templates/apache_app/conf/vh/aaa.test.conf +9 -0
  76. data/wakame_generators/resource/templates/apache_lb/apache_lb.rb +21 -20
  77. data/wakame_generators/resource/templates/apache_lb/conf/apache2.conf +14 -2
  78. data/wakame_generators/resource/templates/apache_lb/conf/system-lb.conf +17 -2
  79. data/wakame_generators/resource/templates/apache_lb/conf/vh/aaa.test.conf +37 -0
  80. data/wakame_generators/resource/templates/apache_www/apache_www.rb +20 -18
  81. data/wakame_generators/resource/templates/apache_www/conf/apache2.conf +14 -2
  82. data/wakame_generators/resource/templates/apache_www/conf/system-www.conf +1 -1
  83. data/wakame_generators/resource/templates/apache_www/conf/vh/aaa.test.conf +9 -0
  84. data/wakame_generators/resource/templates/ec2_elastic_ip/ec2_elastic_ip.rb +6 -8
  85. data/wakame_generators/resource/templates/ec2_elb/ec2_elb.rb +7 -6
  86. data/wakame_generators/resource/templates/memcached/conf/memcached.conf +47 -0
  87. data/wakame_generators/resource/templates/memcached/init.d/memcached +61 -0
  88. data/wakame_generators/resource/templates/memcached/memcached.rb +73 -0
  89. data/wakame_generators/resource/templates/mysql_master/conf/my.cnf +5 -7
  90. data/wakame_generators/resource/templates/mysql_master/mysql_master.rb +35 -34
  91. data/wakame_generators/resource/templates/mysql_slave/conf/my.cnf +6 -6
  92. data/wakame_generators/resource/templates/mysql_slave/mysql_slave.rb +21 -24
  93. data/wakame_generators/resource/templates/nginx/conf/nginx.conf +17 -27
  94. data/wakame_generators/resource/templates/nginx/conf/vh/aaa.test.conf +30 -0
  95. data/wakame_generators/resource/templates/nginx/nginx.rb +18 -18
  96. metadata +34 -21
  97. data/lib/wakame/actions/propagate_instances.rb +0 -70
  98. data/lib/wakame/manager/commands.rb +0 -134
  99. data/lib/wakame/rule.rb +0 -116
  100. data/lib/wakame/triggers/process_command.rb +0 -41
  101. data/tests/test_rule_engine.rb +0 -127
  102. data/wakame_generators/resource/templates/apache_app/conf/sites-app.conf +0 -23
  103. data/wakame_generators/resource/templates/apache_lb/conf/sites-lb.conf +0 -54
  104. data/wakame_generators/resource/templates/apache_www/conf/sites-www.conf +0 -23
@@ -1,11 +1,7 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
-
4
- require 'amqp'
5
-
6
- require 'uri'
7
- require 'ext/uri'
8
3
  require 'optparse'
4
+ require 'amqp'
9
5
 
10
6
  module Wakame
11
7
  module Runner
@@ -1,7 +1,4 @@
1
- require 'uri'
2
- require 'ext/uri'
3
1
  require 'optparse'
4
-
5
2
  require 'amqp'
6
3
 
7
4
  module Wakame