UNSOLVED

hippiehacker

updated

14 years ago

0

15577

July 8th, 2012 20:00

Sputnik Profile Tool Feedback Requested

https://github.com/hh-cookbooks/sputnik is ready for more eyes and feedback.

It includes a mini-tutoral and can feed off of yaml files in /etc/sputnik/*yml, but there is much more flexibility.

It basically creates metapackages on the fly based on the profiles. These packages are made available via a local repo (at some point we may make it very easy to push to a ppa). Installing or removing multiple profiles installs and autoremoves any dependencies.

Currently the tool only builds the profiles and makes them available to apt for installation and removal. We could integrate it fully into the tool, but I'd like some more feedback first.

Please fork and make pull requests or respond to this thread.

If you just want to add more example profiles, please fork and put them in files/default/example_profiles and issue a pull request.

  • 497

    0

    Posted September 7th, 2012 14:00

    Thanks for the tools.  I've gotten a simple profile set up along with the android recipe, on a plain Ubuntu install set up with chef and the two Sputnik repositories.  I did run into a couple of issues in the process:

    The provided solo.rb fails to run for me, claiming 'realdirpath' is undefined, so I made myself a custom solo.rb with hard-coded file_cache_path and cookbook_path.  I tried installing ruby 1.9.3 and setting it as the default, but still no realdirpath found.

    Attempting to use the provided profiles failed for me due to an unmet dependency for the emacs profile.  Making a custom profile for myself without emacs (just eclipse and ipython) worked for me.  

    I've got eclipse set up with an Android project checked out of git and compiled.  I gave the directory created by the profile in /usr/local/android-sdk-linux user ownership and set it as the Android SDK Manager directory in ecliplse, and installed ia32-libs.  I had to modify the compiler compliance level for my eclipse project to 1.6 to get my project to compile.  If eclipse configurations could be included in a profile, I think that would be handy.

  • 497

    0

    Posted September 8th, 2012 13:00

    I ran into the same problem last night and posted an 'issue' at giithub.

    Could you post more information on the workaround solo.rb you made? Or better yet, issue a pull request to fix it for the rest of us?

  • 493

    0

    Posted September 8th, 2012 16:00

    Also, I found it necessary to first make the checkout directory a recognized chef cookbook using knife:

    knife cookbook create cookbook sputnik -o sputnik/

  • 497

    0

    Posted September 8th, 2012 16:00

    Okay, I've posted a modified solo.rb to my fork here:

    github.com/.../sputnik

  • 493

    0

    Posted September 9th, 2012 00:00

    Thanks for the pull request. I patched my solo.rb but running that knife command didn't help me:

    $ knife cookbook create cookbook sputnik -o sputnik/
    WARNING: No knife configuration file found
    ** Creating cookbook cookbook
    ** Creating README for cookbook: cookbook
    ** Creating CHANGELOG for cookbook: cookbook
    ** Creating metadata for cookbook: cookbook

    $ sudo chef-solo chef-solo -c sputnik/config/solo.rb -o sputnik::hippiehacker
    #
    [Sat, 08 Sep 2012 23:46:53 -0700] INFO: *** Chef 10.14.0 ***
    [Sat, 08 Sep 2012 23:46:54 -0700] WARN: Run List override has been provided.
    [Sat, 08 Sep 2012 23:46:54 -0700] WARN: Original Run List: []
    [Sat, 08 Sep 2012 23:46:54 -0700] WARN: Overridden Run List: [recipe[sputnik::hippiehacker]]
    [Sat, 08 Sep 2012 23:46:54 -0700] INFO: Run List is [recipe[sputnik::hippiehacker]]
    [Sat, 08 Sep 2012 23:46:54 -0700] INFO: Run List expands to [sputnik::hippiehacker]
    [Sat, 08 Sep 2012 23:46:54 -0700] INFO: Starting Chef Run for id-sputnik
    [Sat, 08 Sep 2012 23:46:54 -0700] INFO: Running start handlers
    [Sat, 08 Sep 2012 23:46:54 -0700] INFO: Start handlers complete.
    [Sat, 08 Sep 2012 23:46:54 -0700] WARN: found a directory lost+found in the cookbook path, but it contains no cookbook files. skipping.
    [Sat, 08 Sep 2012 23:46:54 -0700] ERROR: Running exception handlers
    [Sat, 08 Sep 2012 23:46:54 -0700] ERROR: Exception handlers complete
    [Sat, 08 Sep 2012 23:46:54 -0700] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
    [Sat, 08 Sep 2012 23:46:54 -0700] FATAL: Chef::Exceptions::CookbookNotFound: Cookbook sputnik not found. If you're loading sputnik from another cookbook, make sure you configure the dependency in your metadata

  • 493

    0

    Posted September 9th, 2012 10:00

    I've put a fix into the solo.rb I posted, to set the file cache path to the checkout directory.  Running the knife command isn't actually necessary.  Running chef-solo now I think should work for you.

  • 493

    0

    Posted September 11th, 2012 00:00

    cd # return to home dir

    git clone git://github.com/hh-cookbooks/sputnik.git

    wget " -O sputnik/config/solo.rb

    chef-solo chef-solo -c sputnik/config/solo.rb -o sputnik::hippiehacker

    #

    [Mon, 10 Sep 2012 23:43:35 -0700] INFO: *** Chef 10.14.2 ***

    [Mon, 10 Sep 2012 23:43:35 -0700] WARN: Run List override has been provided.

    [Mon, 10 Sep 2012 23:43:35 -0700] WARN: Original Run List: []

    [Mon, 10 Sep 2012 23:43:35 -0700] WARN: Overridden Run List: [recipe[sputnik::hippiehacker]]

    [Mon, 10 Sep 2012 23:43:35 -0700] INFO: Run List is [recipe[sputnik::hippiehacker]]

    [Mon, 10 Sep 2012 23:43:35 -0700] INFO: Run List expands to [sputnik::hippiehacker]

    [Mon, 10 Sep 2012 23:43:35 -0700] INFO: Starting Chef Run for id-sputnik

    [Mon, 10 Sep 2012 23:43:35 -0700] INFO: Running start handlers

    [Mon, 10 Sep 2012 23:43:35 -0700] INFO: Start handlers complete.

    [Mon, 10 Sep 2012 23:43:35 -0700] ERROR: Running exception handlers

    [Mon, 10 Sep 2012 23:43:35 -0700] ERROR: Exception handlers complete

    /usr/lib/ruby/vendor_ruby/chef/file_cache.rb:56:in `initialize': Permission denied - /home/chef-stacktrace.out (Errno::EACCES)

    from /usr/lib/ruby/vendor_ruby/chef/file_cache.rb:56:in `open'

    from /usr/lib/ruby/vendor_ruby/chef/file_cache.rb:56:in `store'

    from /usr/lib/ruby/vendor_ruby/chef/application.rb:144:in `debug_stacktrace'

    from /usr/lib/ruby/vendor_ruby/chef/application/solo.rb:248:in `run_application'

    from /usr/lib/ruby/vendor_ruby/chef/application/solo.rb:218:in `loop'

    from /usr/lib/ruby/vendor_ruby/chef/application/solo.rb:218:in `run_application'

    from /usr/lib/ruby/vendor_ruby/chef/application.rb:70:in `run'

    from /usr/bin/chef-solo:24

    The permission denied error is because the cache path goes one level too high.

    Changing the cache path back to ../cache and mkdir ~/cache/ I get this error:

    chef-solo chef-solo -c sputnik/config/solo.rb -o sputnik::hippiehacker

    #

    [Mon, 10 Sep 2012 23:44:52 -0700] INFO: *** Chef 10.14.2 ***

    [Mon, 10 Sep 2012 23:44:52 -0700] WARN: Run List override has been provided.

    [Mon, 10 Sep 2012 23:44:52 -0700] WARN: Original Run List: []

    [Mon, 10 Sep 2012 23:44:52 -0700] WARN: Overridden Run List: [recipe[sputnik::hippiehacker]]

    [Mon, 10 Sep 2012 23:44:52 -0700] INFO: Run List is [recipe[sputnik::hippiehacker]]

    [Mon, 10 Sep 2012 23:44:52 -0700] INFO: Run List expands to [sputnik::hippiehacker]

    [Mon, 10 Sep 2012 23:44:52 -0700] INFO: Starting Chef Run for id-sputnik

    [Mon, 10 Sep 2012 23:44:52 -0700] INFO: Running start handlers

    [Mon, 10 Sep 2012 23:44:52 -0700] INFO: Start handlers complete.

    [Mon, 10 Sep 2012 23:44:52 -0700] ERROR: Running exception handlers

    [Mon, 10 Sep 2012 23:44:52 -0700] ERROR: Exception handlers complete

    [Mon, 10 Sep 2012 23:44:52 -0700] FATAL: Stacktrace dumped to /home/id/cache/chef-stacktrace.out

    [Mon, 10 Sep 2012 23:44:52 -0700] FATAL: Chef::Exceptions::CookbookNotFound: Cookbook sputnik not found. If you're loading sputnik from another cookbook, make sure you configure the dependency in your metadata

    Either way, the system doesn't know how to find some core sputnik cookbook.

  • 493

    0

    Posted September 11th, 2012 01:00

    Same issue:

    $ cd
    $ git clone https://github.com/flibbertigibbet/sputnik.git
    Cloning into 'sputnik'...
    remote: Counting objects: 113, done.
    remote: Compressing objects: 100% (58/58), done.
    remote: Total 113 (delta 42), reused 110 (delta 39)
    Receiving objects: 100% (113/113), 18.02 KiB, done.
    Resolving deltas: 100% (42/42), done.

    $ sudo chef-solo chef-solo -c sputnik/config/solo.rb -o sputnik::hippiehacker
    [sudo] password for id:
    #
    [Tue, 11 Sep 2012 00:19:47 -0700] INFO: *** Chef 10.14.2 ***
    [Tue, 11 Sep 2012 00:19:57 -0700] WARN: Run List override has been provided.
    [Tue, 11 Sep 2012 00:19:57 -0700] WARN: Original Run List: []
    [Tue, 11 Sep 2012 00:19:57 -0700] WARN: Overridden Run List: [recipe[sputnik::hippiehacker]]
    [Tue, 11 Sep 2012 00:19:57 -0700] INFO: Run List is [recipe[sputnik::hippiehacker]]
    [Tue, 11 Sep 2012 00:19:57 -0700] INFO: Run List expands to [sputnik::hippiehacker]
    [Tue, 11 Sep 2012 00:19:57 -0700] INFO: Starting Chef Run for id-sputnik
    [Tue, 11 Sep 2012 00:19:57 -0700] INFO: Running start handlers
    [Tue, 11 Sep 2012 00:19:57 -0700] INFO: Start handlers complete.
    [Tue, 11 Sep 2012 00:19:57 -0700] ERROR: Running exception handlers
    [Tue, 11 Sep 2012 00:19:57 -0700] ERROR: Exception handlers complete
    [Tue, 11 Sep 2012 00:19:57 -0700] FATAL: Stacktrace dumped to /home/chef-stacktrace.out
    [Tue, 11 Sep 2012 00:19:57 -0700] FATAL: Chef::Exceptions::CookbookNotFound: Cookbook sputnik not found. If you're loading sputnik from another cookbook, make sure you configure the dependency in your metadata
     
    
    Is there something else I should be checking out, setting up, etc., as a prerequisite or something?
  • 206

    0

    Posted September 11th, 2012 01:00

    Backing up a step or two, where are you checking out the sputnik repo? I've been doing it in my home directory.

    I created /etc/chef/solo.rb and included the two lines above, but that didn't help any either. I have /etc/chef/client.rb but it's empty.

    There has to be something much more fundamental that's missing from my configuration/setup.

  • 206

    0

    Posted September 11th, 2012 01:00

    Hm, I'm guessing I've done something different in setting up chef then.  I think I edited /etc/chef/solo.rb to set:

    file_cache_path  "/var/cache/chef"

    cookbook_path  [ "/var/chef/cookbooks" ]