How to build chef-server from official sources on github to create DEB packages?

Hello,

I've been tasked with the job of installing chef infra server to replace our older chef.
After a considerable amount of time and multiple attempts I still can't create the binaries for chef-server.

I tried searching for this info, but all the resources I find are either really old or are about chef-client.

make

When using make to build chef-server I can't proceed because bundler is not being detected (it's installed).:

===> No upgrade needed for webmachine
===> No upgrade needed for gen_server2
cd src/opscode-expander && bundle install --no-deployment && bundle update $TARGET
Traceback (most recent call last):
	2: from /usr/local/bin/bundle:23:in `<main>'
	1: from /usr/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/usr/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
Makefile:10: recipe for target 'bundle_opscode-expander' failed
make: *** [bundle_opscode-expander] Error 1

I went to the expander folder and tried to do a bundle install there, but I had the same result. I tried poking around, but nothing caught my eye.:

vagrant@vagrant:~/chef-server/src/opscode-expander$ bundle install
Traceback (most recent call last):
	2: from /usr/local/bin/bundle:23:in `<main>'
	1: from /usr/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/usr/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)

I'm also getting this message:

===> Plugin rebar3_hex not available. It will not be used.

I've read from here: Building Your First Erlang App Using Rebar3 | by Erlang Central | Erlang Central | Medium

that this plugin is needed to download packages from the HEX repository. OK, so should I modify rebar.config? There are 2 issues with this:

  1. Why should I modify anything that I took from upstream?
  2. There are dozens of files named rebar.config in the repo.

omnibus

I tried to use omnibus since:

This project creates full-stack platform-specific packages for chef-server!

After installing all dependencies, ruby, gcc, ruby-dev, bundler etc. I've hit a wall.

Running:

$ bin/omnibus build chef-server

fails to build

vagrant@vagrant:~/chef-server/omnibus$ sudo bin/omnibus build chef-server
https://github.com/chef/omnibus (at master@f38dcb5) is not yet checked out. Run `bundle install` first.

The thing is: I already have those gems:

Using omnibus 7.0.6 from https://github.com/chef/omnibus (at master@f38dcb5)
Using omnibus-software 4.0.0 from https://github.com/chef/omnibus-software (at master@722d2a8)

others?

Also, is it just me, or is the way of building chef really confusing? Maybe it's me being a n00b when dealing with chef, but there are multiple ways to build chef server. Which one should I use to have deb packages to install on a server?

Omnibus? Kitchen? Makefile? How are they related? Keep in mind, that I have minimal Ruby experience and I'm new to Chef.

Thank you in advance,
noodle

Hey,

why not use the official binaries, https://downloads.chef.io/chef-server/

Because those are paid-for:

IF YOU REPRESENT A CORPORATION, GOVERNMENTAL ORGANIZATION, OR OTHER LEGAL ENTITY, OR YOU INTEND TO USE THE SOFTWARE FOR COMMERCIAL PURPOSES, YOU MUST CONTACT CHEF DIRECTLY TO OBTAIN A COMMERCIAL LICENSE FOR THIS SOFTWARE. PLEASE VISIT https://www.chef.io/eula-inquiry/ TO INQUIRE.

Chef 12.x is free. https://docs.chef.io/versions/

Mail](https://go.microsoft.com/fwlink/?LinkId=550986) for Windows 10

7A845521E8064BABB52BA37A8A74D4D0.png

Then I would take a look at cinc.sh they will give you some form of compiled binary,

Note: Depending on your use case you may not need to pay for the license, I think POC/Test is fine, also any chef client less than 14 will be unsupported in a couple months time, and 14+ require a license, so it may benefit you to figure out a solution to your licensing issues,

Use of the following distributions is governed by the Apache License, version 2.0.

Is this the same CHEF infra server as here: GitHub - chef/chef-server: Chef Infra Server is a hub for configuration data; storing cookbooks, node policies and metadata of managed nodes. ?

Where are the binaries then? Or, how can I build them? @bobchaos @Tensibai
Thank you jasonf for the info!

Hi,

On cinc side we didn't tackle chef server for now as there's goiardi existing which match the use case and mimic properly the chef-server.
Alternatively latest free chef-server binaries is 12.19.31 and there's not much evolutions in 13 actually.

Depending on your needs that could be enough to run Cinc client 15 against goiardi or latest chef-infra server 12 (from which version are you coming ?)

On cinc side we're working on the workstation part actually and next step should be automate (the web interface), chef-server would come after that.

Thank you everyone for your answers and links. I'll relay this to my team, since I'm not the only one working with configuration management at my organization.

Worth noting, not only is Chef Server 12 still free, but it also doesn't have an EOL date yet, meaning it should still get updates post may.