Omnibus Chef Server using nginx, postgres and rabbitmq community cookbooks


#1

Hi,

I am planning to run Chef-server and other services into a single node that
use nginx, postgres and rabbitmq.

I plan to bootstrap this node with chef-solo with a runlist like:

  • recipe[nginx]
  • recipe[postgres]
  • recipe[rabbitmq]
  • recipe[whatever::customize_chef-server_rb]
  • recipe[omnibus_updater]

Is that a good approach/best practice? Is there another suggestion?

Thanks,


#2

On Jun 18, 2013, at 3:23 PM, Jordi Llonch wrote:

Hi,

I am planning to run Chef-server and other services into a single node that use nginx, postgres and rabbitmq.

I plan to bootstrap this node with chef-solo with a runlist like:

  • recipe[nginx]
  • recipe[postgres]
  • recipe[rabbitmq]
  • recipe[whatever::customize_chef-server_rb]
  • recipe[omnibus_updater]

Is that a good approach/best practice? Is there another suggestion?

Omnibus server packages include 100% of their dependencies, you don’t need anything, nor do you need to use chef to set it up (it uses chef-solo under the hood to power chef-server-ctl reconfigure). Just install the deb or rpm and you are all set.

–Noah


#3

Thanks for your reply Noah,

What I plan on doing is to use the same nginx,postgres&rabbitmq for
chef-server and the other services running in the node and using only one
instance of each.

Thanks

2013/6/19 Noah Kantrowitz noah@coderanger.net

On Jun 18, 2013, at 3:23 PM, Jordi Llonch wrote:

Hi,

I am planning to run Chef-server and other services into a single node
that use nginx, postgres and rabbitmq.

I plan to bootstrap this node with chef-solo with a runlist like:

  • recipe[nginx]
  • recipe[postgres]
  • recipe[rabbitmq]
  • recipe[whatever::customize_chef-server_rb]
  • recipe[omnibus_updater]

Is that a good approach/best practice? Is there another suggestion?

Omnibus server packages include 100% of their dependencies, you don’t need
anything, nor do you need to use chef to set it up (it uses chef-solo under
the hood to power chef-server-ctl reconfigure). Just install the deb or rpm
and you are all set.

–Noah


#4

On Jun 18, 2013, at 5:26 PM, Jordi Llonch wrote:

Thanks for your reply Noah,

What I plan on doing is to use the same nginx,postgres&rabbitmq for chef-server and the other services running in the node and using only one instance of each.

While it is hypothetically possible to make chef-server not use its internal components, to call it “unsupported” is a vast understatement. You would probably be better off just not using the chef-server packages and installing erchef+bookshelf yourself. They are pretty “normal” Erlang/rebar apps so if you are familiar with that stack it shouldn’t too too hard. Again, super unexplored territory though.

–Noah


#5

Thanks Noah.

I had this running for nginx, but before going with postgres and rabbitmq i
wanted to know other people point of view.

chefserver2nginx.rb

directory “/etc/chef-server” do
owner "root"
group "root"
mode "0755"
end

%w(/var/www /var/www/cache-tmp /var/www/cache).each do |dir|
directory dir do
owner "www-data"
end
end

%w(/etc/nginx /etc/nginx/sites-enabled /etc/nginx/sites-available
/etc/nginx/conf.d).each do |dir|
directory dir do
owner "root"
group "root"
mode "0755"
end
end

template “/etc/nginx/conf.d/chef.conf” do
source "chef.nginx.conf.erb"
end

template “/etc/nginx/sites-available/chef” do
source "chef.nginx.site.erb"
end

link “/etc/nginx/sites-enabled/chef” do
to "/etc/nginx/sites-available/chef"
end

going to disable chef’s omnibus nginx

template “/etc/chef-server/chef-server.rb” do
owner "root"
group "root"
mode "0600"
end

execute “chef-server-ctl reconfigure”

include_recipe “nginx”

2013/6/19 Noah Kantrowitz noah@coderanger.net

On Jun 18, 2013, at 5:26 PM, Jordi Llonch wrote:

Thanks for your reply Noah,

What I plan on doing is to use the same nginx,postgres&rabbitmq for
chef-server and the other services running in the node and using only one
instance of each.

While it is hypothetically possible to make chef-server not use its
internal components, to call it “unsupported” is a vast understatement. You
would probably be better off just not using the chef-server packages and
installing erchef+bookshelf yourself. They are pretty “normal” Erlang/rebar
apps so if you are familiar with that stack it shouldn’t too too hard.
Again, super unexplored territory though.

–Noah