- From: Grig Gheorghiu <
>
- To:
- Cc: Hrishikesh Barua <
>
- Subject: [chef] Re: Re: Re: Newbie question about installing custom software
- Date: Wed, 16 Mar 2011 09:27:38 -0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=LojsGKZj9T1zxoVYvxGd5mjvAp7KOCxk+2DY0khgvPPrEOET14+IoRHPiMbCcbaFz2 52BFLMmoa13DfFkmA0qKap0Trd4TbZ8FhPHzWxOZHbaB185v2MsKeaM5PY7UxA0cl1zv ka/NiHGKQclO6QVFtxBVO+VQH9oPszwAFWMiI=
Here's a fragment from a recipe that installs nginx from source:
nginx = "nginx-#{node[:evite][:nginx_version]}"
nginx_pkg = "#{nginx}.tar.gz"
nginx_upstream = "nginx-upstream-fair.tar.gz"
nginx_upload = "nginx_upload_module-2.2.0.tar.gz"
downloads = [
"#{nginx_pkg}",
"#{nginx_upstream}",
"#{nginx_upload}",
]
downloads.each do |file|
remote_file "/tmp/#{file}" do
source "
http://my.site.com/download/nginx/#{file}"
end
end
script "install_nginx_from_src" do
interpreter "bash"
user "root"
cwd "/tmp"
not_if "test -f /usr/local/nginx/conf/nginx.conf"
code <<-EOH
tar xvfz #{nginx_upstream}
tar xvfz #{nginx_upload}
tar xvfz #{nginx_pkg}
cd #{nginx}
./configure --with-http_ssl_module --with-http_stub_status_module
--add-module=/tmp/nginx-upstream-fair/
--add-module=/tmp/nginx_upload_module-2.2.0/; make; make install
EOH
end
(we also have this attribute in cookbooks/evite/attributes/default.rb:
default[:evite][:nginx_version] = '0.8.20')
HTH
Grig
On Tue, Mar 15, 2011 at 9:30 PM, Hrishikesh Barua
<
>
wrote:
>
Thank you all for the responses and apologies for the late reply. The
>
packages I am installing are not RPMs or any standard installers. As I
>
mentioned, they're .jar or zip files that have custom installation
>
processes. Anyways, I'll see if I can modify your approaches to suit my
>
requirements.
>
>
Thanks!
>
- H
>
>
On 11 March 2011 22:42, John E. Vincent (lusis)
>
<
>
>
wrote:
>
>
>
> That's pretty interesting. I wanted to avoid standing up a dedicated
>
> yum server for our handful of packages so I stuck them in a yum like
>
> structure in s3 and they get synced down to the clients using s3cmd
>
> sync as part of recipes (as well as a daily cronjob)
>
>
>
> https://gist.github.com/866206
>
>
>
> This installs the base repo files and does some cleanup on repos that
>
> were added before I got here.
>
>
>
> So basically each server has a copy of our packages on the EC2 /mnt
>
> volume. I just build them locally in a VM for each arch.
>
>
>
> On Fri, Mar 11, 2011 at 11:57 AM, Charles Duffy
>
> <
>
>
> wrote:
>
> > I have a "cookbook_rpms" recipe I use for the purpose. Note that, as it
>
> > uses
>
> > yum localinstall, it requires that your packages need to be signed (but
>
> > this
>
> > is trivial -- you can just do find . -name '*.rpm' -exec rpm --addsign
>
> > {} +
>
> > to sign everything in your repo, once you've set up a key pair).
>
> >
>
> > See https://github.com/Tippr/tippr-public-cookbooks/tree/master/cookbook_rpms
>
> >
>
> > On Fri, Mar 11, 2011 at 7:36 AM,
>
> > <
>
>
> > wrote:
>
> >>
>
> >> Hello,
>
> >>
>
> >> I've just started evaluating Chef - so this may be something that's
>
> >> already
>
> >> covered in the documentation. However, I've not been able to find it -
>
> >> so
>
> >> asking here.
>
> >>
>
> >> I've a set of custom software packages (let's say that can be
>
> >> downloaded
>
> >> from a
>
> >> certain location on Amazon S3) which I want to install as part of my
>
> >> automated
>
> >> machine setup. These are not available as part of any Linux distro's
>
> >> standard
>
> >> repository, so apt-get/yum won't work.
>
> >>
>
> >> What is the fastest way to get this working? As I see it, it boils down
>
> >> to
>
> >> running a custom script. How easy or how hard is it to do in Chef?
>
> >>
>
> >> - H
>
> >
>
> >
>
>
>
Archive powered by MHonArc 2.6.16.