Knife bootstrap using Chef-Solo?

Ohai guys!

Is there an example of knife-bootstrapping a chef node without having a
chef server?

I was thinking of something like ‘knife bootstrap IP_ADDRESS -x user -P
pass --sudo -r “role[myrole]” --repo-tar
"/path/to/tarballed/chef-repo.tgz"’ which would then upload the .tgz and
use chef-solo to bootstrap the node without a chef server required.

From looking at the wiki, knife bootstrap doesn’t support this. Is there
another easy way to achieve the same thing?

Sure this would be limited as you could not do searches and data bags. I am
looking for a solution to set up VMs using Chef recipes if you don’t have a
Chef Server available.

Cheers,
Torben

Yo,

Sounds like you want to write your own bootstrap template.

Have a look at these:
https://github.com/opscode/chef/tree/master/chef/lib/chef/knife/bootstrap

Modify and drop one of these in your CHEF_REPO/.chef/bootstrap and use
it with one of the following:

knife bootstrap --template-file .chef/bootstrap/foo.erb OR
knife bootstrap --distro foo

Cheers,

AJ

On 10 January 2012 20:52, Torben Knerr ukio@gmx.de wrote:

Ohai guys!

Is there an example of knife-bootstrapping a chef node without having a chef
server?

I was thinking of something like 'knife bootstrap IP_ADDRESS -x user -P pass
--sudo -r "role[myrole]" --repo-tar "/path/to/tarballed/chef-repo.tgz"'
which would then upload the .tgz and use chef-solo to bootstrap the node
without a chef server required.

From looking at the wiki, knife bootstrap doesn't support this. Is there
another easy way to achieve the same thing?

Sure this would be limited as you could not do searches and data bags. I am
looking for a solution to set up VMs using Chef recipes if you don't have a
Chef Server available.

Cheers,
Torben

Hey Torben:

I was using knife-solo recently - worked very well - GitHub - matschaffer/knife-solo: DEPRECATED: Please consider using https://knife-zero.github.io/, ansible, or visit https://www.chef.io/ for other ideas

Ryan
On Jan 10, 2012, at 1:52 AM, Torben Knerr wrote:

Ohai guys!

Is there an example of knife-bootstrapping a chef node without having a chef server?

I was thinking of something like 'knife bootstrap IP_ADDRESS -x user -P pass --sudo -r "role[myrole]" --repo-tar "/path/to/tarballed/chef-repo.tgz"' which would then upload the .tgz and use chef-solo to bootstrap the node without a chef server required.

From looking at the wiki, knife bootstrap doesn't support this. Is there another easy way to achieve the same thing?

Sure this would be limited as you could not do searches and data bags. I am looking for a solution to set up VMs using Chef recipes if you don't have a Chef Server available.

Cheers,
Torben

Hi AJ, Ryan,

thanks for your help! I will look at both options. At first glance
knife-solo seems to be easier to use, but more far away from the way knife
bootstrap does it when using a chef server, which could make the switch to
knife bootstrap with a chef server later on a bit more complicated. Have to
try it out...

Thanks,
Torben
Am 10.01.2012 09:27 schrieb "Ryan Richards" abstractryan@gmail.com:

Hey Torben:

I was using knife-solo recently - worked very well -
GitHub - matschaffer/knife-solo: DEPRECATED: Please consider using https://knife-zero.github.io/, ansible, or visit https://www.chef.io/ for other ideas

Ryan
On Jan 10, 2012, at 1:52 AM, Torben Knerr wrote:

Ohai guys!

Is there an example of knife-bootstrapping a chef node without having a
chef server?

I was thinking of something like 'knife bootstrap IP_ADDRESS -x user -P
pass --sudo -r "role[myrole]" --repo-tar
"/path/to/tarballed/chef-repo.tgz"' which would then upload the .tgz and
use chef-solo to bootstrap the node without a chef server required.

From looking at the wiki, knife bootstrap doesn't support this. Is there
another easy way to achieve the same thing?

Sure this would be limited as you could not do searches and data bags. I
am looking for a solution to set up VMs using Chef recipes if you don't
have a Chef Server available.

Cheers,
Torben