Chef Part 3

We got our second node connected to the chef server. We made a cookbook to install Webmin which is a web based interface to do system administration on Linux.

Here is our Webmin recipe:

#
# Cookbook Name:: webmin
# Recipe:: default
#
apt_package 'perl'
apt_package 'libnet-ssleay-perl'
apt_package 'openssl'
apt_package 'libauthen-pam-perl'
apt_package 'libpam-runtime'
apt_package 'libio-pty-perl'
apt_package 'apt-show-versions'
apt_package 'python'

bash 'download_webmin' do
user 'root'
cwd '/tmp'
code <<-EOH
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.820_all.deb
EOH
end

bash 'download_webmin' do
user 'root'
cwd '/tmp'
code <<-EOH
dpkg --install webmin_1.820_all.deb
EOH
end

It’s simple but it gets the job done. We tried using the dpkg resource that Chef has, but it didn’t work, so I had to use the bash resource instead. On the next post I’ll talk about our other node and the recipe we wrote for that.

Posted in Senior project

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

Categories
%d bloggers like this: