Created
          August 13, 2014 03:27 
        
      - 
      
- 
        Save fbrnc/8ed33626f2fdeb4507df to your computer and use it in GitHub Desktop. 
    Install Chef and Berkshelf on Ubuntu
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| apt-get -y update | |
| apt-get -y install build-essential ruby-dev git curl build-essential libxml2-dev libxslt-dev libssl-dev autoconf | |
| if [ ! -e /opt/chef/bin/chef-solo ] ; then | |
| curl -L https://www.opscode.com/chef/install.sh | bash | |
| fi | |
| if [ ! -e /opt/chef/embedded/bin/berks ] ; then | |
| /opt/chef/embedded/bin/gem install berkshelf --no-ri --no-rdoc | |
| ln -s /opt/chef/embedded/bin/berks /usr/local/bin/berks | |
| fi | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Thanks for this. Was looking for a way to test/deploy simple workstation setup scripts without installing the whole ChefDK and this does the trick. I think the last symlink may be unnecessary as if you
sudo gem install berkshelfit gets put in/usr/local/bin/berksalready (maybe came in a version after you wrote this though).Not sure how much space is saved vs the ChefDK, I need to compare them at some point because with the ruby-dev packages and 58 gems installed with berkshelf I'm not sure if it saves any time/space.