virtualmonkey 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. data/.document +5 -0
  2. data/LICENSE +20 -0
  3. data/README.rdoc +77 -0
  4. data/Rakefile +51 -0
  5. data/VERSION +1 -0
  6. data/bin/grinder +102 -0
  7. data/bin/mcicp +46 -0
  8. data/bin/monkey +12 -0
  9. data/bin/vary_instance_types +59 -0
  10. data/config/cloud_variables/all_clouds.json +30 -0
  11. data/config/cloud_variables/east.json +9 -0
  12. data/config/cloud_variables/rackspace.json +7 -0
  13. data/config/cloud_variables/west.json +9 -0
  14. data/config/common_inputs/apache_haproxy.json +27 -0
  15. data/config/common_inputs/base.json +5 -0
  16. data/config/common_inputs/ebs_toolbox.json +10 -0
  17. data/config/common_inputs/haproxy.json +15 -0
  18. data/config/common_inputs/lamp.json +30 -0
  19. data/config/common_inputs/mysql.json +24 -0
  20. data/config/common_inputs/none.json +4 -0
  21. data/config/common_inputs/php.json +25 -0
  22. data/config/common_inputs/php_aio_trial_chef_alpha.json +3 -0
  23. data/config/common_inputs/php_app_fe_chef.json +12 -0
  24. data/config/common_inputs/php_elb.json +12 -0
  25. data/config/common_inputs/qstart.json +5 -0
  26. data/config/common_inputs/rails.json +31 -0
  27. data/config/common_inputs/rails_aio_demo_chef_alpha.json +3 -0
  28. data/config/common_inputs/rails_aio_developer_chef_alpha.json +10 -0
  29. data/config/common_inputs/rsgrid.json +10 -0
  30. data/config/common_inputs/tomcat.json +15 -0
  31. data/config/common_inputs/windows_blog_engine.json +3 -0
  32. data/config/common_inputs/windows_net_aio.json +14 -0
  33. data/config/troop/11H1/backup/base.json +10 -0
  34. data/config/troop/11H1/backup/lamp_mysql_50.json +10 -0
  35. data/config/troop/11H1/backup/lamp_mysql_51.json +10 -0
  36. data/config/troop/11H1/backup/loadbalancer-php.json +13 -0
  37. data/config/troop/11H1/backup/loadbalancer.json +14 -0
  38. data/config/troop/11H1/backup/loadbalancer_rails.json +13 -0
  39. data/config/troop/11H1/backup/loadbalancer_tomcat6.json +13 -0
  40. data/config/troop/11H1/backup/mysql50.json +11 -0
  41. data/config/troop/11H1/backup/mysql50_toolbox.json +12 -0
  42. data/config/troop/11H1/backup/mysql51.json +11 -0
  43. data/config/troop/11H1/backup/mysql51_toolbox.json +12 -0
  44. data/config/troop/11H1/backup/php_elb.json +11 -0
  45. data/config/troop/11H1/base.json +10 -0
  46. data/config/troop/11H1/ebs_toolbox.json +12 -0
  47. data/config/troop/11H1/lamp_mysql_50.json +10 -0
  48. data/config/troop/11H1/lamp_mysql_51.json +10 -0
  49. data/config/troop/11H1/loadbalancer-php.json +13 -0
  50. data/config/troop/11H1/loadbalancer.json +17 -0
  51. data/config/troop/11H1/loadbalancer_rails.json +13 -0
  52. data/config/troop/11H1/loadbalancer_tomcat6.json +13 -0
  53. data/config/troop/11H1/mysql50.json +11 -0
  54. data/config/troop/11H1/mysql50_toolbox.json +12 -0
  55. data/config/troop/11H1/mysql51.json +11 -0
  56. data/config/troop/11H1/mysql51_awsdns.json +11 -0
  57. data/config/troop/11H1/mysql51_debug.json +11 -0
  58. data/config/troop/11H1/mysql51_toolbox.json +12 -0
  59. data/config/troop/11H1/php.json +13 -0
  60. data/config/troop/11H1/php_elb.json +11 -0
  61. data/config/troop/11H1/rails.json +13 -0
  62. data/config/troop/11H1/tomcat6.json +13 -0
  63. data/config/troop/chef_quickstart.json +10 -0
  64. data/config/troop/just_elb +10 -0
  65. data/config/troop/lamp_v4.json +10 -0
  66. data/config/troop/patch_test.json +10 -0
  67. data/config/troop/rightlink.json +10 -0
  68. data/config/troop/simple_fail.json +11 -0
  69. data/config/troop/simple_pass.json +11 -0
  70. data/config/troop/windows_blog_engine.json +10 -0
  71. data/config/troop/windows_net_aio.json +10 -0
  72. data/config/troop/windows_quick_start.json +10 -0
  73. data/features/base.rb +31 -0
  74. data/features/db_toolbox.rb +59 -0
  75. data/features/ebs_toolbox.rb +62 -0
  76. data/features/lamp.rb +33 -0
  77. data/features/lb-apache-haproxy.rb +49 -0
  78. data/features/mysql_5.x_v2_v4_from_scratch.rb +71 -0
  79. data/features/mysql_5.x_v2_v4_from_scratch_awsdns.rb +71 -0
  80. data/features/mysql_5.x_v2_v4_from_scratch_dyndns.rb +71 -0
  81. data/features/mysql_v1_upgrade_v2.rb +54 -0
  82. data/features/old_cuke_features/Rakefile +121 -0
  83. data/features/old_cuke_features/Steps-TODO +31 -0
  84. data/features/old_cuke_features/app_state.feature +25 -0
  85. data/features/old_cuke_features/app_test.feature +24 -0
  86. data/features/old_cuke_features/base.feature +16 -0
  87. data/features/old_cuke_features/chef_quickstart.feature +11 -0
  88. data/features/old_cuke_features/db_toolbox.feature +38 -0
  89. data/features/old_cuke_features/ebs_toolbox.feature +39 -0
  90. data/features/old_cuke_features/elb_create_delete.feature +41 -0
  91. data/features/old_cuke_features/elb_generic.feature +27 -0
  92. data/features/old_cuke_features/fe_app_checks.feature +21 -0
  93. data/features/old_cuke_features/just-start.feature +13 -0
  94. data/features/old_cuke_features/lamp.feature +15 -0
  95. data/features/old_cuke_features/lb-apache-haproxy.feature +27 -0
  96. data/features/old_cuke_features/mysql_5.x_v2_v4_from_scratch.feature +33 -0
  97. data/features/old_cuke_features/mysql_5.x_v2_v4_from_scratch_awsdns.feature +33 -0
  98. data/features/old_cuke_features/mysql_5.x_v2_v4_from_scratch_dyndns.feature +33 -0
  99. data/features/old_cuke_features/mysql_chef_premium.feature +27 -0
  100. data/features/old_cuke_features/mysql_chef_premium_from_scratch.feature +37 -0
  101. data/features/old_cuke_features/mysql_v1_upgrade_v2.feature +42 -0
  102. data/features/old_cuke_features/php.feature +27 -0
  103. data/features/old_cuke_features/php_aio_trial_chef_alpha.feature +11 -0
  104. data/features/old_cuke_features/php_chef.feature +21 -0
  105. data/features/old_cuke_features/php_elb.feature +41 -0
  106. data/features/old_cuke_features/rails.feature +26 -0
  107. data/features/old_cuke_features/rails_aio_developer_chef.feature +17 -0
  108. data/features/old_cuke_features/reboot.feature +23 -0
  109. data/features/old_cuke_features/rightlink.feature +19 -0
  110. data/features/old_cuke_features/rsgrid.feature +19 -0
  111. data/features/old_cuke_features/simple.feature +8 -0
  112. data/features/old_cuke_features/simple_fail.feature +9 -0
  113. data/features/old_cuke_features/start-stop.feature +13 -0
  114. data/features/old_cuke_features/step_definitions/app.rb +21 -0
  115. data/features/old_cuke_features/step_definitions/deployment_steps.rb +112 -0
  116. data/features/old_cuke_features/step_definitions/ebs.rb +36 -0
  117. data/features/old_cuke_features/step_definitions/elb.rb +35 -0
  118. data/features/old_cuke_features/step_definitions/lb.rb +22 -0
  119. data/features/old_cuke_features/step_definitions/mysql_steps.rb +84 -0
  120. data/features/old_cuke_features/terminate.feature +7 -0
  121. data/features/old_cuke_features/tomcat6-tests-TODO +29 -0
  122. data/features/old_cuke_features/tomcat6.feature +27 -0
  123. data/features/patch_test.rb +33 -0
  124. data/features/php.rb +54 -0
  125. data/features/php_elb.rb +78 -0
  126. data/features/rails.rb +54 -0
  127. data/features/start_only.rb +26 -0
  128. data/features/tomcat6.rb +54 -0
  129. data/lib/virtualmonkey.rb +28 -0
  130. data/lib/virtualmonkey/application.rb +75 -0
  131. data/lib/virtualmonkey/application_frontend.rb +42 -0
  132. data/lib/virtualmonkey/command.rb +39 -0
  133. data/lib/virtualmonkey/command/clone.rb +50 -0
  134. data/lib/virtualmonkey/command/create.rb +21 -0
  135. data/lib/virtualmonkey/command/destroy.rb +51 -0
  136. data/lib/virtualmonkey/command/list.rb +10 -0
  137. data/lib/virtualmonkey/command/run.rb +76 -0
  138. data/lib/virtualmonkey/command/troop.rb +146 -0
  139. data/lib/virtualmonkey/cuke_monk.rb +184 -0
  140. data/lib/virtualmonkey/deployment_monk.rb +132 -0
  141. data/lib/virtualmonkey/deployment_runner.rb +333 -0
  142. data/lib/virtualmonkey/ebs.rb +161 -0
  143. data/lib/virtualmonkey/ebs_runner.rb +59 -0
  144. data/lib/virtualmonkey/elb_runner.rb +194 -0
  145. data/lib/virtualmonkey/fe_app_runner.rb +7 -0
  146. data/lib/virtualmonkey/file_locations.rb +7 -0
  147. data/lib/virtualmonkey/frontend.rb +124 -0
  148. data/lib/virtualmonkey/http_checks.rb +33 -0
  149. data/lib/virtualmonkey/index.html.erb +109 -0
  150. data/lib/virtualmonkey/lamp_runner.rb +29 -0
  151. data/lib/virtualmonkey/mysql.rb +172 -0
  152. data/lib/virtualmonkey/mysql_runner.rb +108 -0
  153. data/lib/virtualmonkey/mysql_toolbox_runner.rb +51 -0
  154. data/lib/virtualmonkey/patch_runner.rb +46 -0
  155. data/lib/virtualmonkey/php_aio_trial_chef_runner.rb +6 -0
  156. data/lib/virtualmonkey/php_chef_runner.rb +69 -0
  157. data/lib/virtualmonkey/rails_aio_developer_chef_runner.rb +8 -0
  158. data/lib/virtualmonkey/shared_dns.rb +67 -0
  159. data/lib/virtualmonkey/simple.rb +5 -0
  160. data/lib/virtualmonkey/simple_runner.rb +6 -0
  161. data/lib/virtualmonkey/test_case_interface.rb +151 -0
  162. data/lib/virtualmonkey/unified_application.rb +40 -0
  163. data/spec/bug3518.rb +16 -0
  164. data/spec/concurrent_writes_spec.rb +26 -0
  165. data/spec/cuke_job_spec.rb +26 -0
  166. data/spec/ek.rb +28 -0
  167. data/spec/little_ruby.rb +20 -0
  168. data/spec/mini.rb +25 -0
  169. data/spec/monitoring.rb +13 -0
  170. data/spec/release_aws_dns.rb +5 -0
  171. data/spec/release_dns.rb +5 -0
  172. data/spec/release_dyndns.rb +5 -0
  173. data/spec/shared_resources_spec.rb +25 -0
  174. data/spec/spec.opts +1 -0
  175. data/spec/spec_helper.rb +11 -0
  176. data/spec/virtualmonkey_spec.rb +7 -0
  177. data/virtualmonkey.gemspec +265 -0
  178. metadata +428 -0
@@ -0,0 +1,27 @@
1
+ Feature: mysql_db premium resources and master/slave cluster operations
2
+ Tests the RightScale premium ServerTemplate Mysql Chef (alpha)
3
+
4
+ Scenario: Basic cluster failover operations
5
+ Given A deployment.
6
+ And "2" operational servers
7
+ Then I should run a mysql query "drop database mynewtest" on server "1"
8
+ Then I should run a mysql query "drop database mynewtest" on server "2"
9
+ When I run a recipe named "db_mysql::do_restore_and_become_master" on server "1".
10
+ Then it should converge successfully
11
+
12
+ Then I should sleep 10 seconds
13
+
14
+ When I run a recipe named "db_mysql::do_init_slave" on server "2"
15
+ Then it should converge successfully
16
+ When I run a recipe named "db_mysql::do_backup" on server "2"
17
+ Then it should converge successfully
18
+ When I run a recipe named "db_mysql::do_disable_backup" on server "2"
19
+ Then it should converge successfully
20
+ When I run a recipe named "db_mysql::do_enable_backup" on server "2"
21
+ Then it should converge successfully
22
+ When I run a recipe named "db_mysql::do_promote_to_master" on server "2"
23
+ Then it should converge successfully
24
+ When I run a recipe named "db_mysql::do_disable_backup" on server "2"
25
+ Then it should converge successfully
26
+ When I run a recipe named "db_mysql::do_enable_backup" on server "2"
27
+ Then it should converge successfully
@@ -0,0 +1,37 @@
1
+ Feature: mysql_db premium resources and master/slave cluster operations
2
+ Tests the RightScale premium ServerTemplate Mysql Chef (alpha). Starting from a fresh database (no prior backup required)
3
+
4
+ Scenario: Basic cluster failover operations and backup from scratch
5
+ Given A deployment
6
+ Then I should set a variation lineage
7
+ Then I should set a variation bucket
8
+ And "2" operational servers
9
+ Then I should run a mysql query "create database mynewtest" on server "1"
10
+
11
+ When I run a recipe named "db_mysql::setup_admin_privileges" on server "1"
12
+ Then it should converge successfully
13
+ Then the audit entry should NOT contain "Found buggy mysql"
14
+
15
+ When I run a recipe named "db_mysql::setup_replication_privileges" on server "1"
16
+ Then it should converge successfully
17
+
18
+ When I run a recipe named "db_mysql::do_tag_as_master" on server "1"
19
+ Then it should converge successfully
20
+
21
+ When I run a recipe named "db_mysql::do_backup" on server "1"
22
+ Then it should converge successfully
23
+
24
+ Then I should sleep 10 seconds
25
+
26
+ When I run a recipe named "db_mysql::do_init_slave" on server "2"
27
+ Then it should converge successfully
28
+
29
+ When I run a recipe named "db_mysql::do_promote_to_master" on server "2"
30
+ Then it should converge successfully
31
+
32
+ When I run a recipe named "db_mysql::do_enable_backup" on server "2"
33
+ Then it should converge successfully
34
+
35
+ When I run a recipe named "db_mysql::do_disable_backup" on server "2"
36
+ Then it should converge successfully
37
+
@@ -0,0 +1,42 @@
1
+ @mysql_5.x
2
+ Feature: mysql 5.x v1 to v2 upgrade tests
3
+ Tests the RightScale premium ServerTemplate
4
+
5
+ Scenario: Follow the steps in the v1 to v2 upgrade guide. Then run the mysql checks.
6
+ # http://support.rightscale.com/03-Tutorials/02-AWS/02-Website_Edition/2.1_MySQL_Setup/MySQL_Setup_Migration%3a__EBS_to_EBS_Stripe
7
+ #
8
+ # PHASE 1) Launch a v1 master from a known hardcoded snapshot.
9
+ # TODO - add the steps to create the v1 master from scratch. The upgrade is the major
10
+ # concern so lets get that done first.
11
+ # Prerequisite: A Deployment with a running MySQL EBS Master-DB server
12
+ # (launched using a revision of the "MySQL EBS v1" ServerTemplate)
13
+ # Old school hand crafted deployment: https://my.rightscale.com/deployments/49925. Make sure
14
+ # The one server is still up and running as master DB.
15
+ #
16
+ Given A MySQL deployment
17
+ Then I should stop the servers
18
+ Then I should set a variation lineage
19
+ Then I should set a variation stripe count of "3"
20
+ # This is done when the deployment is setup - the master never changes the scripts use the inputs as set
21
+ # Then I should set the master DNS to a hardcoded value
22
+ # Then I should set the v1 ebs prefix to a hardcoded value
23
+
24
+ #
25
+ # PHASE 2) Launch a new v2 server and migrate from v1
26
+ #
27
+ Then I should launch all servers
28
+ Then I should wait for the state of "all" servers to be "operational"
29
+ # Run "DB EBS create migrate script from EBS non-stripe master"
30
+ Then I should create the migration script
31
+ # ssh to box and run "/tmp/init_slave.sh"
32
+ Then I should migrate a new slave
33
+ # Then I should test that new slave is working
34
+
35
+ #
36
+ # PHASE 3) Initialize additional slave from v2 snapshots
37
+ #
38
+ Then I should init a new v2 slave
39
+ Then I should test the new v2 slave
40
+ # Then I should run mysqlslap stress test
41
+ Then I should check that ulimit was set correctly
42
+
@@ -0,0 +1,27 @@
1
+ @lb_test
2
+
3
+ Feature: PHP Server Templates
4
+ Tests the PHP servers
5
+
6
+ Scenario: PHP server test
7
+
8
+ Given A frontend with application servers deployment
9
+ Then I should stop the servers
10
+ Then I should set a variation for connecting to shared database host
11
+
12
+ When I launch the "Front End" servers
13
+ Then I should wait for the state of "Front End" servers to be "booting"
14
+ Then I should wait for the state of "Front End" servers to be "operational"
15
+ Then I should set a variation LB_HOSTNAME
16
+ When I launch the "App Server" servers
17
+ Then I should wait for the state of "App Server" servers to be "booting"
18
+ Then I should wait for the state of "App Server" servers to be "operational"
19
+ Then I should cross connect the frontends
20
+
21
+ Then I should run unified application checks
22
+ Then I should run frontend checks
23
+ Then I should run log rotation checks
24
+
25
+ Then I should test reboot operations on the deployment
26
+
27
+ Then I should check that monitoring is enabled
@@ -0,0 +1,11 @@
1
+ @php_aio_trial_chef_test
2
+
3
+ Feature: PHP AIO Trial (Chef Alpha) Server Template Test
4
+ Tests the deployment
5
+
6
+ Scenario: PHP AIO Trial Server Template test
7
+
8
+ Given A PHP AIO Trial Chef deployment
9
+ Then I should stop the servers
10
+ Then I should launch all servers
11
+ Then I should wait for the state of "all" servers to be "operational"
@@ -0,0 +1,21 @@
1
+ @lb_test
2
+
3
+ Feature: PHP Chef Server Template
4
+ Tests the deployment
5
+
6
+ Scenario: PHP Chef Server Templates, PHP FrontEnd and PHP App
7
+
8
+ Given A PHP Chef deployment
9
+ Then I should stop the servers
10
+ Then I should set a variation for connecting to shared database host
11
+
12
+ Then I should launch the deployment
13
+
14
+ Then I should cross connect the frontends
15
+
16
+ Then I should run unified application checks
17
+ Then I should run frontend checks
18
+ Then I should run log rotation checks
19
+
20
+ Then I should test reboot operations on the deployment
21
+ Then I should check that monitoring is enabled
@@ -0,0 +1,41 @@
1
+ @elb_test
2
+
3
+ Feature: PHP App Server Elastic Load Balancing test
4
+ Tests the Elastic Load Balancing RightScripts using PHP App Server
5
+
6
+ Scenario: Connect/Disconnect PHP App Server to ELB
7
+
8
+ Given An ELB Test deployment
9
+
10
+ When I create EC2 Elastic Load Balancer
11
+
12
+ Then I should stop the servers
13
+ Then I should set a variation for connecting to shared database host
14
+ Then I should set a variation ELB_NAME
15
+ When I launch the "App Server" servers
16
+ Then I should wait for the state of "App Server" servers to be "booting"
17
+ Then I should wait for the state of "App Server" servers to be "operational"
18
+
19
+ Then I should run EC2 Elastic Load Balancer unified_app checks
20
+ Then all instances should be registered with ELB
21
+ # Then I should run log rotation checks
22
+ # Then I should check that monitoring is enabled
23
+
24
+ # Then I should reboot the servers
25
+
26
+ # Then I should run EC2 Elastic Load Balancer unified_app checks
27
+ # Then all instances should be registered with ELB
28
+ # Then I should run log rotation checks
29
+ # Then I should check that monitoring is enabled
30
+
31
+ Then I should stop the servers
32
+ Then no instances should be registered with ELB
33
+
34
+ When I delete EC2 Elastic Load Balancer
35
+ # When I launch the "App Server" servers
36
+ # When I should wait for the state of "App Server" servers to be "booting"
37
+
38
+ # Then I should wait for the state of "App Server" servers to be "stranded"
39
+ # Then I should stop the servers
40
+
41
+
@@ -0,0 +1,26 @@
1
+ @lb_test
2
+
3
+ Feature: Rails Server Test
4
+ Tests the Rails servers
5
+
6
+ Scenario: Rails server test
7
+
8
+ Given A frontend with application servers deployment
9
+ Then I should stop the servers
10
+ Then I should set a variation for connecting to shared database host
11
+ When I launch the "Front End" servers
12
+ Then I should wait for the state of "Front End" servers to be "booting"
13
+ Then I should wait for the state of "Front End" servers to be "operational"
14
+ Then I should set a variation LB_HOSTNAME
15
+ When I launch the "App Server" servers
16
+ Then I should wait for the state of "App Server" servers to be "booting"
17
+ Then I should wait for the state of "App Server" servers to be "operational"
18
+ Then I should cross connect the frontends
19
+
20
+ Then I should run unified application checks
21
+ Then I should run frontend checks
22
+ Then I should run log rotation checks
23
+
24
+ Then I should test reboot operations on the deployment
25
+
26
+ Then I should check that monitoring is enabled
@@ -0,0 +1,17 @@
1
+ @rails_aio_developer_chef
2
+
3
+ Feature: Rails AIO Developer (Chef Alpha) Server Template Test
4
+ Rails AIO Developer (Chef Alpha) Server Template Test AND
5
+ Rails AIO Demo (Chef Alpha) Server Template Test
6
+
7
+ Scenario: Rails AIO (Chef Alpha) Server Template Test
8
+
9
+ Given A Rails AIO Developer Chef deployment
10
+ #Then I should stop the servers
11
+ Then I should launch all servers
12
+ Then I should wait for the state of "all" servers to be "booting"
13
+ Then I should wait for the state of "all" servers to be "operational"
14
+ Then I should run AIO rails demo application checks
15
+ Then I should run log rotation checks
16
+
17
+ #Then I should test reboot operations on the deployment
@@ -0,0 +1,23 @@
1
+ @reboot_test
2
+
3
+ Feature: Reboot Server Test
4
+ Tests the Reboot servers
5
+
6
+ Scenario: Reboot server test
7
+
8
+ Given A deployment
9
+
10
+ When I launch the "frontend" servers
11
+ Then the "frontend" servers become operational
12
+
13
+ When I launch the "app" servers
14
+ Then the "frontend" servers become operational
15
+
16
+ Given I am testing the "frontend"
17
+ When I reboot the servers
18
+ And the "frontend" servers become operational
19
+
20
+ Given I am testing the "app"
21
+ When I reboot the servers
22
+ And the "app" servers become operational
23
+
@@ -0,0 +1,19 @@
1
+ @rightlink
2
+ Feature: RightLink Feature Tests
3
+
4
+ Make sure rightlink supports the expected functionality
5
+
6
+ Scenario: The RightLink Test template should go operational
7
+ Given A simple deployment
8
+ Then I should stop the servers
9
+ Then I should launch all servers
10
+ Then I should wait for the state of "all" servers to be "operational"
11
+
12
+ Then all servers should successfully run a recipe named "rightlink_test::state_test_check_value".
13
+
14
+ When I run a recipe named "rightlink_test::resource_remote_recipe_test_start" on server "1".
15
+ Then it should converge successfully.
16
+ Then I should sleep 10 seconds.
17
+ Then I should see "resource_remote_recipe_ping" in the log on server "2".
18
+
19
+ Then I should check that monitoring is enabled
@@ -0,0 +1,19 @@
1
+ @grid
2
+
3
+ Feature: Grid Server Test
4
+ Tests the Reboot servers
5
+
6
+ Scenario: Grid server test
7
+
8
+ Given A deployment with "16" servers
9
+
10
+ When I launch all servers
11
+ Then the "all" servers become operational
12
+
13
+ Given I am testing the "all"
14
+ When I reboot the servers
15
+ And the "all" servers become operational
16
+
17
+ # Just reboot the controllers - the workers will terminate if rebooted
18
+ #
19
+ # Run the Grid macro - then update the rsgrid.json with the input for the new deployment
@@ -0,0 +1,8 @@
1
+ @lb_test
2
+
3
+ Feature: PHP Server Test
4
+ Tests the PHP servers
5
+
6
+ Scenario: PHP server test
7
+
8
+ Given A simple deployment
@@ -0,0 +1,9 @@
1
+ @lb_test
2
+
3
+ Feature: PHP Server Test
4
+ Tests the PHP servers
5
+
6
+ Scenario: PHP server test
7
+
8
+ Given A simple deployment
9
+ Then I will fail
@@ -0,0 +1,13 @@
1
+ @base
2
+
3
+ Feature: Base Server Test
4
+ Tests the base server functions
5
+
6
+ Scenario: base server test
7
+
8
+ Given A simple deployment
9
+ # Then I should stop the servers
10
+ # Then I should relaunch all servers
11
+ Then I should launch all servers
12
+ Then I should wait for the state of "all" servers to be "operational"
13
+ Then I should perform start stop operations.
@@ -0,0 +1,21 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__) , '..','..','spec','spec_helper'))
2
+
3
+ Then /I should run unified application checks/ do
4
+ @runner.run_unified_application_checks
5
+ end
6
+
7
+ Then /I should run LAMP checks/ do
8
+ @runner.run_lamp_checks
9
+ end
10
+
11
+ Then /I should run AIO rails demo application checks/ do
12
+ @runner.run_rails_demo_application_checks
13
+ end
14
+
15
+ Then /^I should set a variation for connecting to shared database host/ do
16
+ @runner.set_master_db_dnsname
17
+ end
18
+
19
+ Then /^I should launch the deployment/ do
20
+ @runner.startup_sequence
21
+ end
@@ -0,0 +1,112 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__) , '..','..','spec','spec_helper'))
2
+
3
+ Given /^A simple deployment/ do
4
+ raise "FATAL: Please set the environment variable $DEPLOYMENT" unless ENV['DEPLOYMENT']
5
+ @runner = VirtualMonkey::SimpleRunner.new(ENV['DEPLOYMENT'])
6
+ end
7
+
8
+ Given /^A LAMP deployment/ do
9
+ raise "FATAL: Please set the environment variable $DEPLOYMENT" unless ENV['DEPLOYMENT']
10
+ @runner = VirtualMonkey::LampRunner.new(ENV['DEPLOYMENT'])
11
+ end
12
+
13
+ Given /^An ELB Test deployment/ do
14
+ raise "FATAL: Please set the environment variable $DEPLOYMENT" unless ENV['DEPLOYMENT']
15
+ @runner = VirtualMonkey::ELBRunner.new(ENV['DEPLOYMENT'])
16
+ @runner.lookup_scripts
17
+ end
18
+
19
+ Given /^A PHP Chef deployment/ do
20
+ raise "FATAL: Please set the environment variable $DEPLOYMENT" unless ENV['DEPLOYMENT']
21
+ @runner = VirtualMonkey::PhpChefRunner.new(ENV['DEPLOYMENT'])
22
+ end
23
+
24
+ Given /A Rails AIO Developer Chef deployment/ do
25
+ raise "FATAL: Please set the environment variable $DEPLOYMENT" unless ENV['DEPLOYMENT']
26
+ @runner = VirtualMonkey::RailsAioDeveloperChefRunner.new(ENV['DEPLOYMENT'])
27
+ end
28
+
29
+ Given /^A PHP AIO Trial Chef deployment/ do
30
+ raise "FATAL: Please set the environment variable $DEPLOYMENT" unless ENV['DEPLOYMENT']
31
+ @runner = VirtualMonkey::PhpAioTrialChefRunner.new(ENV['DEPLOYMENT'])
32
+ end
33
+
34
+ Given /^A MySQL Toolbox deployment$/ do
35
+ raise "FATAL: Please set the environment variable $DEPLOYMENT" unless ENV['DEPLOYMENT']
36
+
37
+ @runner = VirtualMonkey::MysqlToolboxRunner.new(ENV['DEPLOYMENT'])
38
+ @runner.lookup_scripts
39
+ end
40
+
41
+ Given /A MySQL deployment/ do
42
+ raise "FATAL: Please set the environment variable $DEPLOYMENT" unless ENV['DEPLOYMENT']
43
+
44
+ @runner = VirtualMonkey::MysqlRunner.new(ENV['DEPLOYMENT'])
45
+ @runner.lookup_scripts
46
+ end
47
+
48
+ Given /A frontend with application servers deployment/ do
49
+ raise "FATAL: Please set the environment variable $DEPLOYMENT" unless ENV['DEPLOYMENT']
50
+
51
+ # EXPERIMENTAL
52
+ # sleep here to delay the run of the cucumber initial calls to the api. (be nice)
53
+ # num = rand(120)
54
+ # puts "delaying start of test by #{num} seconds"
55
+ # sleep num
56
+ # Don't think this really helped, but, if we start really really pounding the site we may want to add
57
+ # it back in
58
+ @runner = VirtualMonkey::FeAppRunner.new(ENV['DEPLOYMENT'])
59
+ @runner.lookup_scripts
60
+ end
61
+
62
+ Then /I will fail/ do
63
+ raise "Test failure simulation!"
64
+ end
65
+
66
+ Then /I should test reboot operations on the deployment/ do
67
+ @runner.run_reboot_operations
68
+ end
69
+
70
+ When /^I launch the "([^\"]*)" servers$/ do |server_set|
71
+ @runner.launch_set(server_set)
72
+ end
73
+
74
+ Then /^I should relaunch all servers$/ do
75
+ @runner.relaunch_all
76
+ end
77
+
78
+ Then /I should wait for the state of \"(.*)\" servers to be \"(.*)\"/ do |set,state|
79
+ if set == "all"
80
+ @runner.wait_for_all(state)
81
+ else
82
+ @runner.wait_for_set(set, state)
83
+ end
84
+ end
85
+
86
+ Then /^I should stop_ebs all servers$/ do
87
+ @runner.stop_ebs_all
88
+ end
89
+
90
+ Then /^I should start_ebs all servers$/ do
91
+ @runner.start_ebs_all
92
+ end
93
+
94
+ Then /I should reboot the servers$/ do
95
+ @runner.reboot_all
96
+ end
97
+
98
+ Then /I should stop the servers$/ do
99
+ @runner.stop_all
100
+ end
101
+
102
+ Then /I should launch all servers$/ do
103
+ @runner.launch_all
104
+ end
105
+
106
+ Then /I should check that monitoring is enabled$/ do
107
+ @runner.check_monitoring
108
+ end
109
+
110
+ Then /^I should perform start stop operations\.$/ do
111
+ @runner.perform_start_stop_operations
112
+ end