Whirr
  1. Whirr
  2. WHIRR-49

Allow Whirr to use Chef for configuration management

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7.0
    • Component/s: core
    • Labels:
      None

      Description

      As discussed in https://cwiki.apache.org/confluence/display/WHIRR/WhirrDesign, Whirr should be agnostic to the tool used to bring the images up to a state where they're ready to run the service.

      1. WHIRR-49.patch
        29 kB
        David Alves
      2. WHIRR-49.patch
        34 kB
        David Alves
      3. WHIRR-49.patch
        34 kB
        David Alves
      4. WHIRR-49.patch
        35 kB
        David Alves
      5. WHIRR-49.patch
        36 kB
        David Alves
      6. WHIRR-49.patch
        36 kB
        David Alves
      7. WHIRR-49.patch
        40 kB
        Adrian Cole
      8. WHIRR-49.patch
        56 kB
        David Alves
      9. WHIRR-49.patch
        37 kB
        David Alves
      10. WHIRR-49-pom.patch
        1 kB
        David Alves
      11. WHIRR-49-cc.patch
        4 kB
        David Alves
      12. WHIRR-49.patch
        54 kB
        David Alves
      13. WHIRR-49.patch
        54 kB
        David Alves
      14. WHIRR-49.patch
        54 kB
        David Alves
      15. WHIRR-49.patch
        53 kB
        David Alves
      16. WHIRR-49.patch
        51 kB
        David Alves
      17. WHIRR-49.patch
        51 kB
        David Alves
      18. WHIRR-49.patch
        52 kB
        David Alves
      19. WHIRR-49.patch
        52 kB
        Andrei Savu
      20. WHIRR-49.patch
        54 kB
        David Alves

        Issue Links

          Activity

          Hide
          David Alves added a comment -

          Commited.

          Show
          David Alves added a comment - Commited.
          Hide
          Alex Heneveld added a comment -

          +1 working perfectly for me (unit and EC2) and good clean code

          Show
          Alex Heneveld added a comment - +1 working perfectly for me (unit and EC2) and good clean code
          Hide
          Andrei Savu added a comment -

          +1 looks great and integration tests passing on aws-ec2 (without the change from WHIRR-410 - it seems like the 32bit AMI is now working as expected). Alex, Tom, Jeff any feedback to add before David can commit the patch?

          Show
          Andrei Savu added a comment - +1 looks great and integration tests passing on aws-ec2 (without the change from WHIRR-410 - it seems like the 32bit AMI is now working as expected). Alex, Tom, Jeff any feedback to add before David can commit the patch?
          Hide
          David Alves added a comment -

          Solved the last issues that came up on IRC, namely:

          -An NPE issue when RetryablePredicate failed.
          -Cluster selection (added method to ClusterController)
          -Cut sleep to 2 sec (seems to be enough)
          -FW rules for ec2

          Tested:
          unit (maven build)
          cloudservers-us
          ec2

          Show
          David Alves added a comment - Solved the last issues that came up on IRC, namely: -An NPE issue when RetryablePredicate failed. -Cluster selection (added method to ClusterController) -Cut sleep to 2 sec (seems to be enough) -FW rules for ec2 Tested: unit (maven build) cloudservers-us ec2
          Hide
          Alex Heneveld added a comment -

          Abandoned Amazon Linux – although Chef recognises it as such, java and other cookbooks don't, and Chef doesn't have the option to fallback to centos. Similar issues wrt Puppet btw, fails on Amazon Linux. Returning to stock Ubuntu given by jclouds.

          Fixing one bug where the tests run some of the commands using jclouds compute service allNodes which fails when there are unrelated VMs active. Patch coming soon. Hopefully that will do it.

          Show
          Alex Heneveld added a comment - Abandoned Amazon Linux – although Chef recognises it as such, java and other cookbooks don't, and Chef doesn't have the option to fallback to centos. Similar issues wrt Puppet btw, fails on Amazon Linux. Returning to stock Ubuntu given by jclouds. Fixing one bug where the tests run some of the commands using jclouds compute service allNodes which fails when there are unrelated VMs active. Patch coming soon. Hopefully that will do it.
          Hide
          David Alves added a comment -

          Thanks, I must have mistakenly have changed that after the I ran the maven build.

          Show
          David Alves added a comment - Thanks, I must have mistakenly have changed that after the I ran the maven build.
          Hide
          Andrei Savu added a comment -

          Attached an updated version of the patch. One unit test was failing because you are now using Statements.createOrOverwrite

          Show
          Andrei Savu added a comment - Attached an updated version of the patch. One unit test was failing because you are now using Statements.createOrOverwrite
          Hide
          David Alves added a comment -

          added a comment explaining the Thread.sleep in the handler.

          Show
          David Alves added a comment - added a comment explaining the Thread.sleep in the handler.
          Hide
          David Alves added a comment -

          Ok, hopefully this will be it.

          changed Recipe to use Statement.createOrOverwrite

          Changed the chef handler to wait a configurable amount of time (5secs by default)

          all unit tests are passing

          all itests are passing on rackspace

          Show
          David Alves added a comment - Ok, hopefully this will be it. changed Recipe to use Statement.createOrOverwrite Changed the chef handler to wait a configurable amount of time (5secs by default) all unit tests are passing all itests are passing on rackspace
          Hide
          David Alves added a comment -

          Thanks for the thorough review and testing.
          Will look into the issues asap as I'd like to close this.

          I'll move the sleep code to the handler.

          Show
          David Alves added a comment - Thanks for the thorough review and testing. Will look into the issues asap as I'd like to close this. I'll move the sleep code to the handler.
          Hide
          Alex Heneveld added a comment -

          issues summary:

          • to support new jclouds, need a change in ChefServiceDryRunTest.getScriptName: replace RunScript...class to SudoAwareInitManager.class (note: jclouds issue 736 http://code.google.com/p/jclouds/issues/detail?id=736)
          • AMI linux needs following to get chef to build: yum -y install gcc make ruby-devel
          • AMI linux needs version for chef openjdk
          • we still have the ugly sleep while waiting for recipes to be available

          Note for testing on AMI linux (since jclouds default Ubuntu has other issues) the following is handy:

          whirr.image-id=us-east-1/ami-7341831a
          whirr.location-id=us-east-1d
          whirr.private-key-file=/Users/alex/dev/projects/whirr/alex/id_rsa
          whirr.public-key-file=/Users/alex/dev/projects/whirr/alex/id_rsa.pub

          Show
          Alex Heneveld added a comment - issues summary: to support new jclouds, need a change in ChefServiceDryRunTest.getScriptName: replace RunScript...class to SudoAwareInitManager.class (note: jclouds issue 736 http://code.google.com/p/jclouds/issues/detail?id=736 ) AMI linux needs following to get chef to build: yum -y install gcc make ruby-devel AMI linux needs version for chef openjdk we still have the ugly sleep while waiting for recipes to be available Note for testing on AMI linux (since jclouds default Ubuntu has other issues) the following is handy: whirr.image-id=us-east-1/ami-7341831a whirr.location-id=us-east-1d whirr.private-key-file=/Users/alex/dev/projects/whirr/alex/id_rsa whirr.public-key-file=/Users/alex/dev/projects/whirr/alex/id_rsa.pub
          Hide
          David Alves added a comment -

          jclouds upgrade issue, I knew that reflection call would come back to haunt me.
          I'll look into it a bit later.

          Show
          David Alves added a comment - jclouds upgrade issue, I knew that reflection call would come back to haunt me. I'll look into it a bit later.
          Hide
          Andrei Savu added a comment -

          I'm seeing a unit test failure:

          testChefOnly(org.apache.whirr.service.chef.ChefServiceDryRunTest)  Time elapsed: 2.318 sec  <<< ERROR!
          java.lang.NoSuchFieldException: init
              at java.lang.Class.getDeclaredField(Class.java:1882)
              at org.apache.whirr.service.chef.ChefServiceDryRunTest.getScriptName(ChefServiceDryRunTest.java:217)
              at org.apache.whirr.service.chef.ChefServiceDryRunTest.getEntryForPhase(ChefServiceDryRunTest.java:208)
              at org.apache.whirr.service.chef.ChefServiceDryRunTest.assertInstallFunctionsWereExecuted(ChefServiceDryRunTest.java:186)
              at org.apache.whirr.service.chef.ChefServiceDryRunTest.testChefOnly(ChefServiceDryRunTest.java:101)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          
          Show
          Andrei Savu added a comment - I'm seeing a unit test failure: testChefOnly(org.apache.whirr.service.chef.ChefServiceDryRunTest) Time elapsed: 2.318 sec <<< ERROR! java.lang.NoSuchFieldException: init at java.lang.Class.getDeclaredField(Class.java:1882) at org.apache.whirr.service.chef.ChefServiceDryRunTest.getScriptName(ChefServiceDryRunTest.java:217) at org.apache.whirr.service.chef.ChefServiceDryRunTest.getEntryForPhase(ChefServiceDryRunTest.java:208) at org.apache.whirr.service.chef.ChefServiceDryRunTest.assertInstallFunctionsWereExecuted(ChefServiceDryRunTest.java:186) at org.apache.whirr.service.chef.ChefServiceDryRunTest.testChefOnly(ChefServiceDryRunTest.java:101) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          Hide
          Andrei Savu added a comment -

          Statements.createOrOverwriteFile doesn't exist for me is it in trunk?

          It should - part of the jclouds 1.2.1 upgrade.

          the cookbooks are a "temporary download" IMHO

          I understand and now I see why it makes sense to put them into /tmp

          right now they are bound to a revision we know works and use the main opscode repo, maybe that could be an improvement on another jira?

          Let's go for another JIRA but we should push a fix or document the used revision for the next release. Same is true for 6.

          The only thing I'm not happy about is that we are using Thread.sleep in tests but until we find the root issue I think it's fine. Can you open an issue so that we can check if the configure phase is ending before the remote script is executed completely?

          Now testing against cloudservers-us and aws (Amazon linux AMI - we have some issue connecting to the Ubuntu ones).

          Show
          Andrei Savu added a comment - Statements.createOrOverwriteFile doesn't exist for me is it in trunk? It should - part of the jclouds 1.2.1 upgrade. the cookbooks are a "temporary download" IMHO I understand and now I see why it makes sense to put them into /tmp right now they are bound to a revision we know works and use the main opscode repo, maybe that could be an improvement on another jira? Let's go for another JIRA but we should push a fix or document the used revision for the next release. Same is true for 6. The only thing I'm not happy about is that we are using Thread.sleep in tests but until we find the root issue I think it's fine. Can you open an issue so that we can check if the configure phase is ending before the remote script is executed completely? Now testing against cloudservers-us and aws (Amazon linux AMI - we have some issue connecting to the Ubuntu ones).
          Hide
          David Alves added a comment -

          use external scripts for git and ruby

          Show
          David Alves added a comment - use external scripts for git and ruby
          Hide
          David Alves added a comment -

          Use migrated script to avoid duplication

          Show
          David Alves added a comment - Use migrated script to avoid duplication
          Hide
          David Alves added a comment -

          1 - use the same indenting rules in all files - 2 spaces - both for new and old code (I know this is annoying but consistency improves readability) - I'm reviewing the patch uploaded 24/Oct/11 19:20 - is this the latest version?
          2- when creating remote files I think it's better to use Statements.createOrOverwriteFile or Statements.appendFile as needed
          3- is it really a good idea to store the cookbooks in /tmp? How about /etc/chef? Or /opt?
          4- I think we need a way to specify both the cookbooks repo and the revision
          5- can we make the exclude cookbooks a config property? does it make sense?
          6- install_chef_deb() & install_chef_rpm() are only used for installing git - we should rename them (install_git() in services/common ?)
          7- there are still some commented test methods in integration tests.
          8- remember to add whirr-chef to cli/pom.xml

          1 - wrong patch. done!
          2 - Statements.createOrOverwriteFile doesn't exist for me is it in trunk?
          3 - the cookbooks are a "temporary download" IMHO, they are not config files (etc/tmp/) or binaries so I could go either way, maybe they should go wherever apt stuff goes
          4 - right now they are bound to a revision we know works and use the main opscode repo, maybe that could be an improvement on another jira?
          5 - that depends on the revision we are using, see 4
          6 - agreed, but again that should probably go in on another jira right? (push chef whn its ready then use another jira to do that all over)
          7 - wrong patch. done1
          8 - done!

          Show
          David Alves added a comment - 1 - use the same indenting rules in all files - 2 spaces - both for new and old code (I know this is annoying but consistency improves readability) - I'm reviewing the patch uploaded 24/Oct/11 19:20 - is this the latest version? 2- when creating remote files I think it's better to use Statements.createOrOverwriteFile or Statements.appendFile as needed 3- is it really a good idea to store the cookbooks in /tmp? How about /etc/chef? Or /opt? 4- I think we need a way to specify both the cookbooks repo and the revision 5- can we make the exclude cookbooks a config property? does it make sense? 6- install_chef_deb() & install_chef_rpm() are only used for installing git - we should rename them (install_git() in services/common ?) 7- there are still some commented test methods in integration tests. 8- remember to add whirr-chef to cli/pom.xml 1 - wrong patch. done! 2 - Statements.createOrOverwriteFile doesn't exist for me is it in trunk? 3 - the cookbooks are a "temporary download" IMHO, they are not config files (etc/tmp/) or binaries so I could go either way, maybe they should go wherever apt stuff goes 4 - right now they are bound to a revision we know works and use the main opscode repo, maybe that could be an improvement on another jira? 5 - that depends on the revision we are using, see 4 6 - agreed, but again that should probably go in on another jira right? (push chef whn its ready then use another jira to do that all over) 7 - wrong patch. done1 8 - done!
          Hide
          David Alves added a comment -

          Previous was the wrong patch.

          Show
          David Alves added a comment - Previous was the wrong patch.
          Hide
          Alex Heneveld added a comment -

          New issue WHIRR-411 adds install_git and install_ruby to core.

          Could you try applying that, removing the git references from install_chef, and adding install_git call in ChefClusterActionHandler.parseCookbookAndRecipe ?

          Show
          Alex Heneveld added a comment - New issue WHIRR-411 adds install_git and install_ruby to core. Could you try applying that, removing the git references from install_chef, and adding install_git call in ChefClusterActionHandler.parseCookbookAndRecipe ?
          Hide
          Alex Heneveld added a comment -

          Great stuff!

          As part of puppet WHIRR-385 we tidied the install_git* calls, in /services/puppet/src/main/resources/functions/install_puppet.sh which was based on install_chef.sh so may be simpler just to grab from there. (We also put in some echo WARNING calls which helps when things don't go quite as expected.)

          +1 to new jira for sharing common scripts (including install_git and install_ruby which should probably be teased apart).

          Show
          Alex Heneveld added a comment - Great stuff! As part of puppet WHIRR-385 we tidied the install_git* calls, in /services/puppet/src/main/resources/functions/install_puppet.sh which was based on install_chef.sh so may be simpler just to grab from there. (We also put in some echo WARNING calls which helps when things don't go quite as expected.) +1 to new jira for sharing common scripts (including install_git and install_ruby which should probably be teased apart).
          Hide
          Andrei Savu added a comment -

          I think we are almost done. Great job!

          Some things I've noticed:

          • use the same indenting rules in all files - 2 spaces - both for new and old code (I know this is annoying but consistency improves readability) - I'm reviewing the patch uploaded 24/Oct/11 19:20 - is this the latest version?
          • when creating remote files I think it's better to use Statements.createOrOverwriteFile or Statements.appendFile as needed
          • is it really a good idea to store the cookbooks in /tmp? How about /etc/chef? Or /opt?
          • I think we need a way to specify both the cookbooks repo and the revision
          • can we make the exclude cookbooks a config property? does it make sense?
          • install_chef_deb() & install_chef_rpm() are only used for installing git - we should rename them (install_git() in services/common ?)
          • there are still some commented test methods in integration tests.
          • remember to add whirr-chef to cli/pom.xml

          I can help you test on aws-ec2 as soon as we manage to solve WHIRR-410.

          It's going to be awesome if we ship 0.7.0 with support for both Puppet and Chef!

          Show
          Andrei Savu added a comment - I think we are almost done. Great job! Some things I've noticed: use the same indenting rules in all files - 2 spaces - both for new and old code (I know this is annoying but consistency improves readability) - I'm reviewing the patch uploaded 24/Oct/11 19:20 - is this the latest version? when creating remote files I think it's better to use Statements.createOrOverwriteFile or Statements.appendFile as needed is it really a good idea to store the cookbooks in /tmp? How about /etc/chef? Or /opt? I think we need a way to specify both the cookbooks repo and the revision can we make the exclude cookbooks a config property? does it make sense? install_chef_deb() & install_chef_rpm() are only used for installing git - we should rename them (install_git() in services/common ?) there are still some commented test methods in integration tests. remember to add whirr-chef to cli/pom.xml I can help you test on aws-ec2 as soon as we manage to solve WHIRR-410 . It's going to be awesome if we ship 0.7.0 with support for both Puppet and Chef!
          Hide
          David Alves added a comment -

          Forgot to uncomment cluster destruction.

          Show
          David Alves added a comment - Forgot to uncomment cluster destruction.
          Hide
          David Alves added a comment -

          Please Review!

          Show
          David Alves added a comment - Please Review!
          Hide
          David Alves added a comment -

          ITests are passing on rackspace, any volunteers for ec2?

          Changed the spacing.

          Uncommented commented out itests by running the recipe scripts directly against the ComputeService available from ComputeCache, instead of against ClusterController, this way I was able to run recipes as initscripts.

          Note: In order for itests to pass I've had to introduce a small (5sec) sleep between installing recipes and testing for their installation.

          I'm not sure why this is happening. Jclouds script timeout should not be an issue here (tests takes less than the default 10 min timeout). So either jclouds is returning before the script is complete or there is some visibility issue with chef and/or with script execution visibility in general.

          In practice as chef is used to provision stuff for other services this is not an issue (i've been provisioning sun's java and postgres through chef without problems).

          Show
          David Alves added a comment - ITests are passing on rackspace, any volunteers for ec2? Changed the spacing. Uncommented commented out itests by running the recipe scripts directly against the ComputeService available from ComputeCache, instead of against ClusterController, this way I was able to run recipes as initscripts. Note: In order for itests to pass I've had to introduce a small (5sec) sleep between installing recipes and testing for their installation. I'm not sure why this is happening. Jclouds script timeout should not be an issue here (tests takes less than the default 10 min timeout). So either jclouds is returning before the script is complete or there is some visibility issue with chef and/or with script execution visibility in general. In practice as chef is used to provision stuff for other services this is not an issue (i've been provisioning sun's java and postgres through chef without problems).
          Hide
          David Alves added a comment -

          The commented out tests refer to testing using recipes outside of handlers, which can come in handy (I use them).
          The thing is that recipe scripts should run as initscript by jclouds, and this requires an additional method on ClusterController, which Adrian implemented and that I have but should probably go on another jira.
          When/If this method is available we can uncomment the test, I just didn't want to loose the code.

          I'll change the formatter setup for whirr, to comply, thank you.

          Moving common scripts to services/common seems like a nice idea, but we could probably do it form another jira, right?

          Show
          David Alves added a comment - The commented out tests refer to testing using recipes outside of handlers, which can come in handy (I use them). The thing is that recipe scripts should run as initscript by jclouds, and this requires an additional method on ClusterController, which Adrian implemented and that I have but should probably go on another jira. When/If this method is available we can uncomment the test, I just didn't want to loose the code. I'll change the formatter setup for whirr, to comply, thank you. Moving common scripts to services/common seems like a nice idea, but we could probably do it form another jira, right?
          Hide
          Andrei Savu added a comment -

          Nice work David! I really like the tests based on dry run. We have to use 2 spaces for indentation just to keep the code base consistent and remove the @author javadoc. Two tests are commented (testChefRunRecipeFromURL and testChefRunRecipesFromProvidedCookbooks) - do we need them?

          What do you think about creating something like services/common for common scripts? (e.g. install_ruby for chef and puppet)

          Show
          Andrei Savu added a comment - Nice work David! I really like the tests based on dry run. We have to use 2 spaces for indentation just to keep the code base consistent and remove the @author javadoc. Two tests are commented (testChefRunRecipeFromURL and testChefRunRecipesFromProvidedCookbooks) - do we need them? What do you think about creating something like services/common for common scripts? (e.g. install_ruby for chef and puppet)
          Hide
          David Alves added a comment - - edited

          Ok Here we go!

          Beyond the old approach (where the user would build recipes as new Recipe(ck,rcp) which could be added as statements) the service now supports doing everything by configuration.

          The first instance template to use the "chef" role will trigger the installation of ruby and chef.
          In the instance templates now the following usages are supported:

          chef only: "1 chef" installs chef but runs no cookbooks (as was before)

          chef with default cookbook: "1 chef:java" in this case chef installs chef, the cookbook and runs the default recipe.

          chef with particular recipe: "1 chef:java:sun" as before but for a particular recipe.

          passing attributes through configuration: attributes were already supported in the Recipe but they now can be specified by configuration as
          cookbook_name.attribute_name=value

          There is only a special case, when the attribute_name is "url" in this case the cookbook will be fetched from the url (vs using the default cookbooks).

          A final note attribute values can be anything that would possible in a typical chef ruby definition file which is usually json

          Important Notes:

          As recipes are long running scripts, using recipes outside of handlers required a change to ClusterController where Adrian introduced runScriptOnNodesMatching method that supported passing RunScriptOptions. I commented out the portion of the tests that used this as this change, to be introduced (and in IMHO it should because it is useful), should probably go on another jira.

          Finally I ran unit tests and pretty extensive sys tests with the dry run module but I'm still missing itests.

          Please review!!!

          Show
          David Alves added a comment - - edited Ok Here we go! Beyond the old approach (where the user would build recipes as new Recipe(ck,rcp) which could be added as statements) the service now supports doing everything by configuration. The first instance template to use the "chef" role will trigger the installation of ruby and chef. In the instance templates now the following usages are supported: chef only: "1 chef" installs chef but runs no cookbooks (as was before) chef with default cookbook: "1 chef:java" in this case chef installs chef, the cookbook and runs the default recipe. chef with particular recipe: "1 chef:java:sun" as before but for a particular recipe. passing attributes through configuration: attributes were already supported in the Recipe but they now can be specified by configuration as cookbook_name.attribute_name=value There is only a special case, when the attribute_name is "url" in this case the cookbook will be fetched from the url (vs using the default cookbooks). A final note attribute values can be anything that would possible in a typical chef ruby definition file which is usually json Important Notes: As recipes are long running scripts, using recipes outside of handlers required a change to ClusterController where Adrian introduced runScriptOnNodesMatching method that supported passing RunScriptOptions. I commented out the portion of the tests that used this as this change, to be introduced (and in IMHO it should because it is useful), should probably go on another jira. Finally I ran unit tests and pretty extensive sys tests with the dry run module but I'm still missing itests. Please review!!!
          Hide
          David Alves added a comment -

          I'm looking at this right now.
          I'll just re-implement the properties stuff (turns out its not easily abstractable from puppet's).
          more news later.

          Show
          David Alves added a comment - I'm looking at this right now. I'll just re-implement the properties stuff (turns out its not easily abstractable from puppet's). more news later.
          Hide
          David Alves added a comment -

          I followed WHIRR-385 and I think it won't be that hard (it's only missing the properties stuff, I think).
          I'll probably simply copy some of the code on the first attempt, later we can try and extract common parts.
          I'll try and take a look later today or tomorrow.

          Show
          David Alves added a comment - I followed WHIRR-385 and I think it won't be that hard (it's only missing the properties stuff, I think). I'll probably simply copy some of the code on the first attempt, later we can try and extract common parts. I'll try and take a look later today or tomorrow.
          Hide
          Andrei Savu added a comment -

          David do you think we can rework this patch to use an approach similar to WHIRR-385?

          Show
          Andrei Savu added a comment - David do you think we can rework this patch to use an approach similar to WHIRR-385 ?
          Hide
          David Alves added a comment - - edited

          risk that, AFAIK roles are always kept in linkedhashsets.

          Show
          David Alves added a comment - - edited risk that, AFAIK roles are always kept in linkedhashsets.
          Hide
          Andrei Savu added a comment -

          I'm glad to see this working. I will review the code tonight.

          Show
          Andrei Savu added a comment - I'm glad to see this working. I will review the code tonight.
          Hide
          David Alves added a comment -

          Corrected a problem where recipes run within other services boostrap would fail to install.

          Added a test for this case. Problem is that while recipes are now actually installed the test is failing and I don't know why.

          Separated the patch in multiple files, the cc portion should probably go on another jira.

          Show
          David Alves added a comment - Corrected a problem where recipes run within other services boostrap would fail to install. Added a test for this case. Problem is that while recipes are now actually installed the test is failing and I don't know why. Separated the patch in multiple files, the cc portion should probably go on another jira.
          Hide
          David Alves added a comment -

          Still not finished after all.

          Although chef already works if recipes are called after the cluster is bootstrapped and configured there is still a problem in calling recipes from other services.

          Particularly and I don't quite understand why, although chef is installed, if the service using chef add two recipe statements instead of getting 2 files timestamp1.json timestamp2.json there is actually only one file with both json strings concatenated.

          Should be easy to fix though.

          Show
          David Alves added a comment - Still not finished after all. Although chef already works if recipes are called after the cluster is bootstrapped and configured there is still a problem in calling recipes from other services. Particularly and I don't quite understand why, although chef is installed, if the service using chef add two recipe statements instead of getting 2 files timestamp1.json timestamp2.json there is actually only one file with both json strings concatenated. Should be easy to fix though.
          Hide
          David Alves added a comment -

          Final patch with everything working:

          • Changed git install to git only
          • Bound git cookbook checkout to a working hash
          • Added a method to ClusterController to allow to run scripts as initscripts to avoid SocketTimeoutExceptions while running recipes. (thanks Adrian).

          Please review.

          PS: Final patch should probably separate services/chef stuff from the ClusterController change, please let me know what you think.

          Show
          David Alves added a comment - Final patch with everything working: Changed git install to git only Bound git cookbook checkout to a working hash Added a method to ClusterController to allow to run scripts as initscripts to avoid SocketTimeoutExceptions while running recipes. (thanks Adrian). Please review. PS: Final patch should probably separate services/chef stuff from the ClusterController change, please let me know what you think.
          Hide
          Adrian Cole added a comment -

          Work in progress patch that allows us to run longer commands ex. chef-client

          Show
          Adrian Cole added a comment - Work in progress patch that allows us to run longer commands ex. chef-client
          Hide
          David Alves added a comment -

          Latest patch. Still Working on it. Please not the cluster is NOT being destroyed after the test is executed.

          Show
          David Alves added a comment - Latest patch. Still Working on it. Please not the cluster is NOT being destroyed after the test is executed.
          Hide
          David Alves added a comment -

          I agree and will solve the problem like that at least for now.

          On another matter, I'm getting SocketTimeoutExceptions when waiting for chef recipes to execute (st at the end).

          Is there any way to increase the timeout of the sshj sockets?

          2011-09-01 21:26:59,960 ERROR [net.schmizz.sshj.transport.TransportImpl] (reader) Dying because - java.net.SocketTimeoutException: Read timed out
          2011-09-01 21:26:59,964 WARN [jclouds.ssh] (user thread 4) << (dralves@184.106.195.177:22) error closing connection
          net.schmizz.sshj.connection.ConnectionException: Read timed out
          at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:32)
          at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:26)
          at net.schmizz.concurrent.Promise.deliverError(Promise.java:95)
          at net.schmizz.concurrent.Event.deliverError(Event.java:72)
          at net.schmizz.concurrent.ErrorDeliveryUtil.alertEvents(ErrorDeliveryUtil.java:34)
          at net.schmizz.sshj.connection.channel.AbstractChannel.notifyError(AbstractChannel.java:239)
          at net.schmizz.sshj.connection.channel.direct.SessionChannel.notifyError(SessionChannel.java:250)
          at net.schmizz.sshj.common.ErrorNotifiable$Util.alertAll(ErrorNotifiable.java:35)
          at net.schmizz.sshj.connection.ConnectionImpl.notifyError(ConnectionImpl.java:250)
          at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:578)
          at net.schmizz.sshj.transport.Reader.run(Reader.java:79)
          Caused by: net.schmizz.sshj.common.SSHException: Read timed out
          at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:56)
          at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:49)
          at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:572)
          ... 1 more
          Caused by: java.net.SocketTimeoutException: Read timed out
          at java.net.SocketInputStream.socketRead0(Native Method)
          at java.net.SocketInputStream.read(SocketInputStream.java:129)
          at net.schmizz.sshj.transport.Reader.run(Reader.java:68)
          2011-09-01 21:26:59,966 WARN [jclouds.ssh] (user thread 4) << (dralves@184.106.195.177:22) error acquiring ExecResponse(dralves@184.106.195.177:22)[echo '{"java":

          {"install_flavor":"sun"}

          ,"run_list":["recipe[java]"]}' >> /tmp/1314908743434.json
          sudo -i chef-solo -j /tmp/1314908743434.json
          ]: Read timed out
          net.schmizz.sshj.connection.ConnectionException: Read timed out
          at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:32)
          at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:26)
          at net.schmizz.concurrent.Promise.deliverError(Promise.java:95)
          at net.schmizz.concurrent.Event.deliverError(Event.java:72)
          at net.schmizz.concurrent.ErrorDeliveryUtil.alertEvents(ErrorDeliveryUtil.java:34)
          at net.schmizz.sshj.connection.channel.AbstractChannel.notifyError(AbstractChannel.java:239)
          at net.schmizz.sshj.connection.channel.direct.SessionChannel.notifyError(SessionChannel.java:250)
          at net.schmizz.sshj.common.ErrorNotifiable$Util.alertAll(ErrorNotifiable.java:35)
          at net.schmizz.sshj.connection.ConnectionImpl.notifyError(ConnectionImpl.java:250)
          at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:578)
          at net.schmizz.sshj.transport.Reader.run(Reader.java:79)
          Caused by: net.schmizz.sshj.common.SSHException: Read timed out
          at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:56)
          at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:49)
          at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:572)
          ... 1 more
          Caused by: java.net.SocketTimeoutException: Read timed out
          at java.net.SocketInputStream.socketRead0(Native Method)
          at java.net.SocketInputStream.read(SocketInputStream.java:129)
          at net.schmizz.sshj.transport.Reader.run(Reader.java:68)
          t2011-09-01 21:27:00,167 WARN [jclouds.ssh] (user thread 4) << (dralves@184.106.195.177:22) error closing connection
          net.schmizz.sshj.connection.ConnectionException: Read timed out
          at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:32)
          at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:26)
          at net.schmizz.concurrent.Promise.deliverError(Promise.java:95)
          at net.schmizz.concurrent.Event.deliverError(Event.java:72)
          at net.schmizz.concurrent.ErrorDeliveryUtil.alertEvents(ErrorDeliveryUtil.java:34)
          at net.schmizz.sshj.connection.channel.AbstractChannel.notifyError(AbstractChannel.java:239)
          at net.schmizz.sshj.connection.channel.direct.SessionChannel.notifyError(SessionChannel.java:250)
          at net.schmizz.sshj.common.ErrorNotifiable$Util.alertAll(ErrorNotifiable.java:35)
          at net.schmizz.sshj.connection.ConnectionImpl.notifyError(ConnectionImpl.java:250)
          at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:578)
          at net.schmizz.sshj.transport.Reader.run(Reader.java:79)
          Caused by: net.schmizz.sshj.common.SSHException: Read timed out
          at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:56)
          at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:49)
          at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:572)
          ... 1 more
          Caused by: java.net.SocketTimeoutException: Read timed out
          at java.net.SocketInputStream.socketRead0(Native Method)
          at java.net.SocketInputStream.read(SocketInputStream.java:129)
          at net.schmizz.sshj.transport.Reader.run(Reader.java:68)
          2011-09-01 21:27:00,167 WARN [jclouds.ssh] (user thread 4) << (dralves@184.106.195.177:22) error acquiring ExecResponse(dralves@184.106.195.177:22)[echo '{"java":

          {"install_flavor":"sun"}

          ,"run_list":["recipe[java]"]}' >> /tmp/1314908743434.json
          sudo -i chef-solo -j /tmp/1314908743434.json
          ]: Read timed out
          net.schmizz.sshj.connection.ConnectionException: Read timed out
          at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:32)
          at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:26)
          at net.schmizz.concurrent.Promise.deliverError(Promise.java:95)
          at net.schmizz.concurrent.Event.deliverError(Event.java:72)
          at net.schmizz.concurrent.ErrorDeliveryUtil.alertEvents(ErrorDeliveryUtil.java:34)
          at net.schmizz.sshj.connection.channel.AbstractChannel.notifyError(AbstractChannel.java:239)
          at net.schmizz.sshj.connection.channel.direct.SessionChannel.notifyError(SessionChannel.java:250)
          at net.schmizz.sshj.common.ErrorNotifiable$Util.alertAll(ErrorNotifiable.java:35)
          at net.schmizz.sshj.connection.ConnectionImpl.notifyError(ConnectionImpl.java:250)
          at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:578)
          at net.schmizz.sshj.transport.Reader.run(Reader.java:79)
          Caused by: net.schmizz.sshj.common.SSHException: Read timed out
          at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:56)
          at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:49)
          at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:572)
          ... 1 more
          Caused by: java.net.SocketTimeoutException: Read timed out
          at java.net.SocketInputStream.socketRead0(Native Method)
          at java.net.SocketInputStream.read(SocketInputStream.java:129)
          at net.schmizz.sshj.transport.Reader.run(Reader.java:68)

          Show
          David Alves added a comment - I agree and will solve the problem like that at least for now. On another matter, I'm getting SocketTimeoutExceptions when waiting for chef recipes to execute (st at the end). Is there any way to increase the timeout of the sshj sockets? 2011-09-01 21:26:59,960 ERROR [net.schmizz.sshj.transport.TransportImpl] (reader) Dying because - java.net.SocketTimeoutException: Read timed out 2011-09-01 21:26:59,964 WARN [jclouds.ssh] (user thread 4) << (dralves@184.106.195.177:22) error closing connection net.schmizz.sshj.connection.ConnectionException: Read timed out at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:32) at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:26) at net.schmizz.concurrent.Promise.deliverError(Promise.java:95) at net.schmizz.concurrent.Event.deliverError(Event.java:72) at net.schmizz.concurrent.ErrorDeliveryUtil.alertEvents(ErrorDeliveryUtil.java:34) at net.schmizz.sshj.connection.channel.AbstractChannel.notifyError(AbstractChannel.java:239) at net.schmizz.sshj.connection.channel.direct.SessionChannel.notifyError(SessionChannel.java:250) at net.schmizz.sshj.common.ErrorNotifiable$Util.alertAll(ErrorNotifiable.java:35) at net.schmizz.sshj.connection.ConnectionImpl.notifyError(ConnectionImpl.java:250) at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:578) at net.schmizz.sshj.transport.Reader.run(Reader.java:79) Caused by: net.schmizz.sshj.common.SSHException: Read timed out at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:56) at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:49) at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:572) ... 1 more Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at net.schmizz.sshj.transport.Reader.run(Reader.java:68) 2011-09-01 21:26:59,966 WARN [jclouds.ssh] (user thread 4) << (dralves@184.106.195.177:22) error acquiring ExecResponse(dralves@184.106.195.177:22)[echo '{"java": {"install_flavor":"sun"} ,"run_list":["recipe [java] "]}' >> /tmp/1314908743434.json sudo -i chef-solo -j /tmp/1314908743434.json ]: Read timed out net.schmizz.sshj.connection.ConnectionException: Read timed out at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:32) at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:26) at net.schmizz.concurrent.Promise.deliverError(Promise.java:95) at net.schmizz.concurrent.Event.deliverError(Event.java:72) at net.schmizz.concurrent.ErrorDeliveryUtil.alertEvents(ErrorDeliveryUtil.java:34) at net.schmizz.sshj.connection.channel.AbstractChannel.notifyError(AbstractChannel.java:239) at net.schmizz.sshj.connection.channel.direct.SessionChannel.notifyError(SessionChannel.java:250) at net.schmizz.sshj.common.ErrorNotifiable$Util.alertAll(ErrorNotifiable.java:35) at net.schmizz.sshj.connection.ConnectionImpl.notifyError(ConnectionImpl.java:250) at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:578) at net.schmizz.sshj.transport.Reader.run(Reader.java:79) Caused by: net.schmizz.sshj.common.SSHException: Read timed out at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:56) at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:49) at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:572) ... 1 more Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at net.schmizz.sshj.transport.Reader.run(Reader.java:68) t2011-09-01 21:27:00,167 WARN [jclouds.ssh] (user thread 4) << (dralves@184.106.195.177:22) error closing connection net.schmizz.sshj.connection.ConnectionException: Read timed out at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:32) at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:26) at net.schmizz.concurrent.Promise.deliverError(Promise.java:95) at net.schmizz.concurrent.Event.deliverError(Event.java:72) at net.schmizz.concurrent.ErrorDeliveryUtil.alertEvents(ErrorDeliveryUtil.java:34) at net.schmizz.sshj.connection.channel.AbstractChannel.notifyError(AbstractChannel.java:239) at net.schmizz.sshj.connection.channel.direct.SessionChannel.notifyError(SessionChannel.java:250) at net.schmizz.sshj.common.ErrorNotifiable$Util.alertAll(ErrorNotifiable.java:35) at net.schmizz.sshj.connection.ConnectionImpl.notifyError(ConnectionImpl.java:250) at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:578) at net.schmizz.sshj.transport.Reader.run(Reader.java:79) Caused by: net.schmizz.sshj.common.SSHException: Read timed out at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:56) at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:49) at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:572) ... 1 more Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at net.schmizz.sshj.transport.Reader.run(Reader.java:68) 2011-09-01 21:27:00,167 WARN [jclouds.ssh] (user thread 4) << (dralves@184.106.195.177:22) error acquiring ExecResponse(dralves@184.106.195.177:22)[echo '{"java": {"install_flavor":"sun"} ,"run_list":["recipe [java] "]}' >> /tmp/1314908743434.json sudo -i chef-solo -j /tmp/1314908743434.json ]: Read timed out net.schmizz.sshj.connection.ConnectionException: Read timed out at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:32) at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:26) at net.schmizz.concurrent.Promise.deliverError(Promise.java:95) at net.schmizz.concurrent.Event.deliverError(Event.java:72) at net.schmizz.concurrent.ErrorDeliveryUtil.alertEvents(ErrorDeliveryUtil.java:34) at net.schmizz.sshj.connection.channel.AbstractChannel.notifyError(AbstractChannel.java:239) at net.schmizz.sshj.connection.channel.direct.SessionChannel.notifyError(SessionChannel.java:250) at net.schmizz.sshj.common.ErrorNotifiable$Util.alertAll(ErrorNotifiable.java:35) at net.schmizz.sshj.connection.ConnectionImpl.notifyError(ConnectionImpl.java:250) at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:578) at net.schmizz.sshj.transport.Reader.run(Reader.java:79) Caused by: net.schmizz.sshj.common.SSHException: Read timed out at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:56) at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:49) at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:572) ... 1 more Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at net.schmizz.sshj.transport.Reader.run(Reader.java:68)
          Hide
          Andrei Savu added a comment -

          +1 for "bind the git clone to a specific version we know works" and we can change that as the cookbooks repo changes.

          Show
          Andrei Savu added a comment - +1 for "bind the git clone to a specific version we know works" and we can change that as the cookbooks repo changes.
          Hide
          David Alves added a comment -

          I chased it down and turns out this is not an EC2 problem.

          Let me explain the problem:

          cookbooks are provided to chef by downloading directly from the opscodes git repo.

          Whenever chef bootstraps it actually runs a portion of every cookbook is its cookbooks path.

          When I first started this bootstrap failed because of two cookbooks (openldap and windows) failed and therefore nothing else could proceed.

          I solved this problem by removing said cookbooks elegantly (rm -rf) but now it turns out there is a new cookbook on the repo (iis) and it depends on one of those that were removed (windows).

          I will again solve the problem elegantly (rm -rf) but this may not be the best approach.

          What do you think we can do?

          • bind the git clone to a specific version we know works?
          • download the entire cookbook set and keep in whirr, upgrading it periodically.
          • leave as is and solve the problem whenever it occurs?
          Show
          David Alves added a comment - I chased it down and turns out this is not an EC2 problem. Let me explain the problem: cookbooks are provided to chef by downloading directly from the opscodes git repo. Whenever chef bootstraps it actually runs a portion of every cookbook is its cookbooks path. When I first started this bootstrap failed because of two cookbooks (openldap and windows) failed and therefore nothing else could proceed. I solved this problem by removing said cookbooks elegantly (rm -rf) but now it turns out there is a new cookbook on the repo (iis) and it depends on one of those that were removed (windows). I will again solve the problem elegantly (rm -rf) but this may not be the best approach. What do you think we can do? bind the git clone to a specific version we know works? download the entire cookbook set and keep in whirr, upgrading it periodically. leave as is and solve the problem whenever it occurs?
          Hide
          David Alves added a comment -

          Adrian, I don't have a personal EC2 account at the moment.
          I will create one but at the mean time if you could provide the logs that would be great.

          The issue seems to be either with the installation of the chef gem or, most probably, with PATH and the way the commands are ran.

          Show
          David Alves added a comment - Adrian, I don't have a personal EC2 account at the moment. I will create one but at the mean time if you could provide the logs that would be great. The issue seems to be either with the installation of the chef gem or, most probably, with PATH and the way the commands are ran.
          Hide
          Andrei Savu added a comment -

          Amazon EC2

          Show
          Andrei Savu added a comment - Amazon EC2
          Hide
          David Alves added a comment -

          btw, where are you running your tests? rackspace?

          Show
          David Alves added a comment - btw, where are you running your tests? rackspace?
          Hide
          David Alves added a comment -

          Thanks for the review Adrian.

          Will look into the issues you mentioned. You'r right about gitosis.

          Patch follow up later.

          Show
          David Alves added a comment - Thanks for the review Adrian. Will look into the issues you mentioned. You'r right about gitosis. Patch follow up later.
          Hide
          Andrei Savu added a comment -

          Is gitosis a requirement for chef? Why not install just git / git-core? Before committing we need to remove author javadoc tag in ChefClusterActionHandler.java & Recipe.java.

          Integration tests are failing for me with the automatically selected Ubuntu 10.04 LTS ami packaged by Canonical:

          2011-08-29 22:18:22,970 DEBUG [org.apache.whirr.service.chef.integration.ChefServiceTest] (main) Responses for Statement: org.apache.whirr.service.chef.Recipe@1127c4d
          2011-08-29 22:18:22,970 DEBUG [org.apache.whirr.service.chef.integration.ChefServiceTest] (main) Node[us-east-1/i-89f4eae8]: [output=-bash: chef-solo: command not found
          , error=, exitCode=127]
          

          Tomorrow I will try to collect the logs for more info.

          Overall it looks good to me. I'm excited about this improvement. Great work David!

          Show
          Andrei Savu added a comment - Is gitosis a requirement for chef? Why not install just git / git-core? Before committing we need to remove author javadoc tag in ChefClusterActionHandler.java & Recipe.java. Integration tests are failing for me with the automatically selected Ubuntu 10.04 LTS ami packaged by Canonical: 2011-08-29 22:18:22,970 DEBUG [org.apache.whirr.service.chef.integration.ChefServiceTest] (main) Responses for Statement: org.apache.whirr.service.chef.Recipe@1127c4d 2011-08-29 22:18:22,970 DEBUG [org.apache.whirr.service.chef.integration.ChefServiceTest] (main) Node[us-east-1/i-89f4eae8]: [output=-bash: chef-solo: command not found , error=, exitCode=127] Tomorrow I will try to collect the logs for more info. Overall it looks good to me. I'm excited about this improvement. Great work David!
          Hide
          David Alves added a comment -

          Style corrections to comply with checkstyle

          Show
          David Alves added a comment - Style corrections to comply with checkstyle
          Hide
          David Alves added a comment -

          From my side I'd say this is pretty much it.

          If someone could review/test in rpm distro it would be great!

          Show
          David Alves added a comment - From my side I'd say this is pretty much it. If someone could review/test in rpm distro it would be great!
          Hide
          David Alves added a comment -

          -Changed Recipe so it would implement Statement (can be passed directly)

          • Final changes to support rpm based distros (not tested though)
          • Finalized test of postgresql installation
          Show
          David Alves added a comment - -Changed Recipe so it would implement Statement (can be passed directly) Final changes to support rpm based distros (not tested though) Finalized test of postgresql installation
          Hide
          David Alves added a comment -

          Added the rpm ruby installation stuff as per Andrei's suggestion. Still missing the test in non debian distros though.

          Show
          David Alves added a comment - Added the rpm ruby installation stuff as per Andrei's suggestion. Still missing the test in non debian distros though.
          Hide
          David Alves added a comment -

          Added multiple stuff:

          • The ability to run all the recipes in Opscode's central repo without providing an url.
          • The ability to specify non default recipes.
          • Added test for java and postgresql installation

          Stuff like:
          Recipe java = new Recipe("java")
          java.attribs.put("install_flavor",sun");

          now works along with probably most of the recipes in opscode's central repo.

          Still Missing:

          • Test for the installation of postgres (is included in the test but confirmation is still manual)
          • Order stuff. If other services will require chef to be installed then prob. order should be enforced (WHIRR-221).
          • Test for non debian distros
          • Test for other providers than rackspace
          Show
          David Alves added a comment - Added multiple stuff: The ability to run all the recipes in Opscode's central repo without providing an url. The ability to specify non default recipes. Added test for java and postgresql installation Stuff like: Recipe java = new Recipe("java") java.attribs.put("install_flavor",sun"); now works along with probably most of the recipes in opscode's central repo. Still Missing: Test for the installation of postgres (is included in the test but confirmation is still manual) Order stuff. If other services will require chef to be installed then prob. order should be enforced ( WHIRR-221 ). Test for non debian distros Test for other providers than rackspace
          Hide
          Andrei Savu added a comment -

          Looks good to me and I like the approach. I believe we should probably have a similar implementation for Puppet. Check WHIRR-255 - install_puppet function for a cross platform way of installing Ruby.

          Show
          Andrei Savu added a comment - Looks good to me and I like the approach. I believe we should probably have a similar implementation for Puppet. Check WHIRR-255 - install_puppet function for a cross platform way of installing Ruby.
          Hide
          David Alves added a comment - - edited

          Installs ruby & chef-solo. RPM distros not yet complete. Tested and working on rackspace.
          After the chef "service" is boostrapped other servers should be able to do stuff like:

          Recipe mysql = new Recipe("mysql);
          addStatement(event,mysql.asStatement());

          Show
          David Alves added a comment - - edited Installs ruby & chef-solo. RPM distros not yet complete. Tested and working on rackspace. After the chef "service" is boostrapped other servers should be able to do stuff like: Recipe mysql = new Recipe("mysql); addStatement(event,mysql.asStatement());

            People

            • Assignee:
              David Alves
              Reporter:
              Jeff Hammerbacher
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development