"Users" community cookbook and chef-zero


#1

Hi Bocuse outsiders!

I’m trying to replace most of my homebaked cookbooks with community ones
(e.g. official chef ones first).

I’m using chef-zero as my dev env, and trying to replace my 'basicusers’
cookbook by the ‘users’ chef one.

So I added some
"

users_manage “ldapadmin” do
data_bag "dirsrv"
group_name "ldapadmin"
end

​"
Line to fetch my ‘dirsrv’ databag a ‘ldapadmin’ databag item (which
fortunately​ has the same group).

But the user is not added :frowning:

I get this line in the log: WARN: This recipe uses search. Chef Solo does
not support search unless you install the chef-solo-search cookbook

​But I’m using Vagrant 1.7.2 with chefdk 0.4 (chef 12.2.1), so
chef-solo-search should be automatically included​.

Is there a way to circumvent?

Regards


Charlie Mordant

Full OSGI/EE stack made with Karaf:


#2

do you know why chef’s detecting this as solo run? can you share the log.
Are you using chef-zero as standalone chef server or via chef-client local
mode. If you are using it in standalone mode, you have to upload some
fixture data to get going, so that the search results return some value.

On Sun, Apr 19, 2015 at 1:33 PM, Charlie Mordant cmordant1@gmail.com
wrote:

Hi Bocuse outsiders!

I’m trying to replace most of my homebaked cookbooks with community ones
(e.g. official chef ones first).

I’m using chef-zero as my dev env, and trying to replace my 'basicusers’
cookbook by the ‘users’ chef one.

So I added some
"

users_manage “ldapadmin” do
data_bag "dirsrv"
group_name "ldapadmin"
end

​"
Line to fetch my ‘dirsrv’ databag a ‘ldapadmin’ databag item (which
fortunately​ has the same group).

But the user is not added :frowning:

I get this line in the log: WARN: This recipe uses search. Chef Solo does
not support search unless you install the chef-solo-search cookbook

​But I’m using Vagrant 1.7.2 with chefdk 0.4 (chef 12.2.1), so
chef-solo-search should be automatically included​.

Is there a way to circumvent?

Regards


Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent


#3

Hi Ranjib,

I’m using Chef zero with Vagrant as explained in the Vagrant doc, I think
that it starts an in mem chef zero server before starting the VM.
I’m also using Berks to retreive my dependencies, so if I could avoid to
fetch and modify that recipe it should be better.

Regards,

2015-04-19 23:46 GMT+02:00 Ranjib Dey dey.ranjib@gmail.com:

do you know why chef’s detecting this as solo run? can you share the log.
Are you using chef-zero as standalone chef server or via chef-client local
mode. If you are using it in standalone mode, you have to upload some
fixture data to get going, so that the search results return some value.

On Sun, Apr 19, 2015 at 1:33 PM, Charlie Mordant cmordant1@gmail.com
wrote:

Hi Bocuse outsiders!

I’m trying to replace most of my homebaked cookbooks with community ones
(e.g. official chef ones first).

I’m using chef-zero as my dev env, and trying to replace my 'basicusers’
cookbook by the ‘users’ chef one.

So I added some
"

users_manage “ldapadmin” do
data_bag "dirsrv"
group_name "ldapadmin"
end

​"
Line to fetch my ‘dirsrv’ databag a ‘ldapadmin’ databag item (which
fortunately​ has the same group).

But the user is not added :frowning:

I get this line in the log: WARN: This recipe uses search. Chef Solo
does not support search unless you install the chef-solo-search cookbook

​But I’m using Vagrant 1.7.2 with chefdk 0.4 (chef 12.2.1), so
chef-solo-search should be automatically included​.

Is there a way to circumvent?

Regards


Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent


Charlie Mordant

Full OSGI/EE stack made with Karaf:


#4

you dont have to modify any recipe, but you have to find out if you can
upload the required data bags via vagrant plugin. I dont use vagrant, but i
think you can do something using the shell provisioner , and execute it
before the chef-solo run. Also change the chef-solo invocation to
chef-client, either in localmode (-z) or configure the client.rb with
chef-zero details (localhost, 8889… might vary depending upon where
chef-zero is bound,can be in the bridge interface of virtualbox as well).

On Mon, Apr 20, 2015 at 12:45 AM, Charlie Mordant cmordant1@gmail.com
wrote:

Hi Ranjib,

I’m using Chef zero with Vagrant as explained in the Vagrant doc, I think
that it starts an in mem chef zero server before starting the VM.
I’m also using Berks to retreive my dependencies, so if I could avoid to
fetch and modify that recipe it should be better.

Regards,

2015-04-19 23:46 GMT+02:00 Ranjib Dey dey.ranjib@gmail.com:

do you know why chef’s detecting this as solo run? can you share the log.
Are you using chef-zero as standalone chef server or via chef-client local
mode. If you are using it in standalone mode, you have to upload some
fixture data to get going, so that the search results return some value.

On Sun, Apr 19, 2015 at 1:33 PM, Charlie Mordant cmordant1@gmail.com
wrote:

Hi Bocuse outsiders!

I’m trying to replace most of my homebaked cookbooks with community ones
(e.g. official chef ones first).

I’m using chef-zero as my dev env, and trying to replace my 'basicusers’
cookbook by the ‘users’ chef one.

So I added some
"

users_manage “ldapadmin” do
data_bag "dirsrv"
group_name "ldapadmin"
end

​"
Line to fetch my ‘dirsrv’ databag a ‘ldapadmin’ databag item (which
fortunately​ has the same group).

But the user is not added :frowning:

I get this line in the log: WARN: This recipe uses search. Chef Solo
does not support search unless you install the chef-solo-search cookbook

​But I’m using Vagrant 1.7.2 with chefdk 0.4 (chef 12.2.1), so
chef-solo-search should be automatically included​.

Is there a way to circumvent?

Regards


Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent


Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent


#5

Hi again Ranjib,

Sorry, but looking at the source code of this cookbook leaves me sceptik:
https://github.com/opscode-cookbooks/users/blob/master/providers/manage.rb

Regards,

2015-04-20 10:05 GMT+02:00 Ranjib Dey dey.ranjib@gmail.com:

you dont have to modify any recipe, but you have to find out if you can
upload the required data bags via vagrant plugin. I dont use vagrant, but i
think you can do something using the shell provisioner , and execute it
before the chef-solo run. Also change the chef-solo invocation to
chef-client, either in localmode (-z) or configure the client.rb with
chef-zero details (localhost, 8889… might vary depending upon where
chef-zero is bound,can be in the bridge interface of virtualbox as well).

On Mon, Apr 20, 2015 at 12:45 AM, Charlie Mordant cmordant1@gmail.com
wrote:

Hi Ranjib,

I’m using Chef zero with Vagrant as explained in the Vagrant doc, I think
that it starts an in mem chef zero server before starting the VM.
I’m also using Berks to retreive my dependencies, so if I could avoid to
fetch and modify that recipe it should be better.

Regards,

2015-04-19 23:46 GMT+02:00 Ranjib Dey dey.ranjib@gmail.com:

do you know why chef’s detecting this as solo run? can you share the
log. Are you using chef-zero as standalone chef server or via chef-client
local mode. If you are using it in standalone mode, you have to upload some
fixture data to get going, so that the search results return some value.

On Sun, Apr 19, 2015 at 1:33 PM, Charlie Mordant cmordant1@gmail.com
wrote:

Hi Bocuse outsiders!

I’m trying to replace most of my homebaked cookbooks with community
ones (e.g. official chef ones first).

I’m using chef-zero as my dev env, and trying to replace my
’basicusers’ cookbook by the ‘users’ chef one.

So I added some
"

users_manage “ldapadmin” do
data_bag "dirsrv"
group_name "ldapadmin"
end

​"
Line to fetch my ‘dirsrv’ databag a ‘ldapadmin’ databag item (which
fortunately​ has the same group).

But the user is not added :frowning:

I get this line in the log: WARN: This recipe uses search. Chef Solo
does not support search unless you install the chef-solo-search cookbook

​But I’m using Vagrant 1.7.2 with chefdk 0.4 (chef 12.2.1), so
chef-solo-search should be automatically included​.

Is there a way to circumvent?

Regards


Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent


Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent


Charlie Mordant

Full OSGI/EE stack made with Karaf:


#6

On 4/20/15 12:45 AM, Charlie Mordant wrote:

Hi Ranjib,

I’m using Chef zero with Vagrant as explained in the Vagrant doc, I
think that it starts an in mem chef zero server before starting the VM.
I’m also using Berks to retreive my dependencies, so if I could avoid
to fetch and modify that recipe it should be better.
You’re probably better off starting with test-kitchen which will handle
setting up the Vagrantfile for you, and with uploading data bags to the
virts, etc.


#7

Hi Lamont,

I ended up using the ‘user’ cookbook (also made by an OpsCode contributor),
that don’t use search internally.
Yes, I really need to use test-kitchen, but as its an off-work project, I
don’t have so much time to set this things up (for now), even if it’s the
way to go in mid term.

Thank you all for your answers, keep cooking :wink:

2015-04-21 9:49 GMT+02:00 Lamont Granquist lamont@chef.io:

On 4/20/15 12:45 AM, Charlie Mordant wrote:

Hi Ranjib,

I’m using Chef zero with Vagrant as explained in the Vagrant doc, I
think that it starts an in mem chef zero server before starting the VM.
I’m also using Berks to retreive my dependencies, so if I could avoid to
fetch and modify that recipe it should be better.

You’re probably better off starting with test-kitchen which will handle
setting up the Vagrantfile for you, and with uploading data bags to the
virts, etc.


Charlie Mordant

Full OSGI/EE stack made with Karaf: