[chef] Re: Re: Re: EC2 AMI with chef-server installed


Chronological Thread 
  • From: Sidney Burks < >
  • To:
  • Subject: [chef] Re: Re: Re: EC2 AMI with chef-server installed
  • Date: Sat, 3 Apr 2010 19:31:42 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=nNUhxjloUXTD9bTX1mi9rAXokbnWrhes0Pqe4w7OeeSHXmSxtpMgHfory6Vw4NN9Wq XUO8/qwogS1qZxCNbXUi5sIsWiSj3nrXQ33hUM3lAUsok5/+4FlqVfQzUFPP9rhcj2o1 YWvdCX2ZvEKpykDIYSY59vX1U3gMUfHGrzRCc=

I tried this script on my local machine at home (Ubuntu 9.10) but it seems to fail because Ohai sets 'null' for a domain.  I'm trying this on my home computer, which i'd like to access from a dyndns.org address. Anyone have a workaround?

http://gist.github.com/354705

-Sidney



On Sat, Apr 3, 2010 at 4:29 PM, Mike Bailey < "> > wrote:
Thanks for the script. It's nice to have an automated (and human readable) script to install chef.

My initial password is still not working for the webui so I'm stuck. I've changed it in /etc/chef/server.rb and restarted the webui to no avail.

How did you fix the 'lost admin password' problem?

thanks,

Mike






On Sat, Apr 3, 2010 at 4:32 AM, John Merrells < " target="_blank"> > wrote:

It took me a few hours to get my first chef server up and running.

(I found the wiki to be quite confusing. Fewer links and a diagram would have helped.)

This is what I did for ubuntu 9.10. Even then I had to contend with the 'lost admin password' a couple of times.

I'm in a pretty happy place now, with server, client and knife working.... trying to get to grips with the cookbooks now... apache2 openid doesn't seem to work for me.

John


logfile="/root/log.txt"
echo "-----"  >> $logfile

# New sources.list
cat > /etc/apt/sources.list << EOF
deb http://gb.archive.ubuntu.com/ubuntu/ karmic main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic main restricted
deb http://gb.archive.ubuntu.com/ubuntu/ karmic-updates main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic-updates main restricted
deb http://gb.archive.ubuntu.com/ubuntu/ karmic universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic universe
deb http://gb.archive.ubuntu.com/ubuntu/ karmic-updates universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic-updates universe
deb http://gb.archive.ubuntu.com/ubuntu/ karmic multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ karmic-updates multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic-updates multiverse
deb http://security.ubuntu.com/ubuntu karmic-security main restricted
deb-src http://security.ubuntu.com/ubuntu karmic-security main restricted
deb http://security.ubuntu.com/ubuntu karmic-security universe
deb-src http://security.ubuntu.com/ubuntu karmic-security universe
deb http://security.ubuntu.com/ubuntu karmic-security multiverse
deb-src http://security.ubuntu.com/ubuntu karmic-security multiverse
EOF

# Update System
apt-get -y update

#installing ruby
apt-get -y install build-essential >> $logfile
apt-get -y install ruby >> $logfile
apt-get -y install ruby-dev  >> $logfile
apt-get -y install libzlib-ruby  >> $logfile
apt-get -y install libyaml-ruby  >> $logfile
apt-get -y install libopenssl-ruby >> $logfile
apt-get -y install runit >> $logfile

#installing rubygems
wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz
tar xzvf rubygems-1.3.6.tgz  >> $logfile
cd rubygems-1.3.6
ruby setup.rb >> $logfile
ln -s /usr/bin/gem1.8 /usr/bin/gem
gem update --no-ri --no-rdoc --system >> $logfile

#SEE http://wiki.opscode.com/display/chef/Preparing+Debian+and+Ubuntu+for+RubyGems

apt-get -y install ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert
gem install --no-ri --no-rdoc chef

#SEE  http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation

cat > ~/solo.rb <<EOF
file_cache_path "/tmp/chef-solo"
cookbook_path "/tmp/chef-solo/cookbooks"
recipe_url "http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz"
EOF

cat > ~/chef.json <<EOF
{
 "bootstrap": {
   "chef": {
     "url_type": "http",
     "init_style": "runit",
     "path": "/srv/chef",
     "serve_path": "/srv/chef",
     "server_fqdn": "chef.reflectornetwork.com",
     "webui_enabled": true
   }
 },
 "run_list": [ "recipe[bootstrap::server]" ]
}
EOF

chef-solo -c ~/solo.rb -j ~/chef.json



--
John Merrells
http://johnmerrells.com
+1.415.244.5808











Archive powered by MHonArc 2.6.16.

§