Portable chef client


#1

Hi everybody,
We are trying to use chef-solo to install our application on linux. We plan
to distribute chef (chef-client install folder) along with our application
files and when user runs an install script, chef-solo will be invoked.
End-user need not know that we are using chef-solo. I have copied chef
folder on a different machine and tried to run a simple recipe with no
success.

Have any of you tried such thing? Is there a portable chef-client?


Regards
Naresh


#2

omnibus installers are fairly portable as long as your platforms are same.
how are you generating the installers? or how are you packaging your app+
chef. I use fpm to repackage omnibus chef with additional gems (like
ruby-lxc) and then use chef-client in localmode (which is pretty much same
as solo).
What error you are seeing?

On Sun, Jun 7, 2015 at 10:38 PM, Naresh nnaresh@gmail.com wrote:

Hi everybody,
We are trying to use chef-solo to install our application on linux. We
plan to distribute chef (chef-client install folder) along with our
application files and when user runs an install script, chef-solo will be
invoked. End-user need not know that we are using chef-solo. I have copied
chef folder on a different machine and tried to run a simple recipe with no
success.

Have any of you tried such thing? Is there a portable chef-client?


Regards
Naresh


#3

Hi Ranjib,
By portable I meant just copying the chef folder. I want to avoid
installing chef-client if possible. On Windows, I can take the chef-client
install folder, copy that to other location or machine and run the
chef-client. That doesn’t work on linux. I see the following error:

…/embedded/bin/ruby: error while loading shared libraries: libruby.so.2.1:
cannot open shared object file: No such file or directory

Thanks

On Mon, Jun 8, 2015 at 3:05 PM, Ranjib Dey dey.ranjib@gmail.com wrote:

omnibus installers are fairly portable as long as your platforms are same.
how are you generating the installers? or how are you packaging your app+
chef. I use fpm to repackage omnibus chef with additional gems (like
ruby-lxc) and then use chef-client in localmode (which is pretty much same
as solo).
What error you are seeing?

On Sun, Jun 7, 2015 at 10:38 PM, Naresh nnaresh@gmail.com wrote:

Hi everybody,
We are trying to use chef-solo to install our application on linux. We
plan to distribute chef (chef-client install folder) along with our
application files and when user runs an install script, chef-solo will be
invoked. End-user need not know that we are using chef-solo. I have copied
chef folder on a different machine and tried to run a simple recipe with no
success.

Have any of you tried such thing? Is there a portable chef-client?


Regards
Naresh


Regards
Naresh


#4

Sounds like you’re wanting a statically built copy of ruby.

The issue you’re seeing is because the operating system’s dynamic linker hasn’t been updated to look for library objects in chef-client’s lib path. Normally this would happen during package installation.


~j

On Jun 8, 2015, at 01:32, Naresh nnaresh@gmail.com wrote:

Hi Ranjib,
By portable I meant just copying the chef folder. I want to avoid installing chef-client if possible. On Windows, I can take the chef-client install folder, copy that to other location or machine and run the chef-client. That doesn’t work on linux. I see the following error:

…/embedded/bin/ruby: error while loading shared libraries: libruby.so.2.1: cannot open shared object file: No such file or directory

Thanks

On Mon, Jun 8, 2015 at 3:05 PM, Ranjib Dey dey.ranjib@gmail.com wrote:
omnibus installers are fairly portable as long as your platforms are same. how are you generating the installers? or how are you packaging your app+ chef. I use fpm to repackage omnibus chef with additional gems (like ruby-lxc) and then use chef-client in localmode (which is pretty much same as solo).
What error you are seeing?

On Sun, Jun 7, 2015 at 10:38 PM, Naresh nnaresh@gmail.com wrote:
Hi everybody,
We are trying to use chef-solo to install our application on linux. We plan to distribute chef (chef-client install folder) along with our application files and when user runs an install script, chef-solo will be invoked. End-user need not know that we are using chef-solo. I have copied chef folder on a different machine and tried to run a simple recipe with no success.

Have any of you tried such thing? Is there a portable chef-client?


Regards
Naresh


Regards
Naresh


#5

I had this in my queue to post, it should help :slight_smile:

-Eric Helgeson
@nulleric https://twitter.com/nulleric
https://usingchef.com

On Mon, Jun 8, 2015 at 10:23 AM, Joseph Anthony Pasquale Holsten <
joseph@josephholsten.com> wrote:

Sounds like you’re wanting a statically built copy of ruby.

The issue you’re seeing is because the operating system’s dynamic linker
hasn’t been updated to look for library objects in chef-client’s lib path.
Normally this would happen during package installation.


~j

On Jun 8, 2015, at 01:32, Naresh nnaresh@gmail.com wrote:

Hi Ranjib,
By portable I meant just copying the chef folder. I want to avoid
installing chef-client if possible. On Windows, I can take the chef-client
install folder, copy that to other location or machine and run the
chef-client. That doesn’t work on linux. I see the following error:

…/embedded/bin/ruby: error while loading shared libraries:
libruby.so.2.1: cannot open shared object file: No such file or directory

Thanks

On Mon, Jun 8, 2015 at 3:05 PM, Ranjib Dey dey.ranjib@gmail.com wrote:

omnibus installers are fairly portable as long as your platforms are
same. how are you generating the installers? or how are you packaging your
app+ chef. I use fpm to repackage omnibus chef with additional gems (like
ruby-lxc) and then use chef-client in localmode (which is pretty much same
as solo).
What error you are seeing?

On Sun, Jun 7, 2015 at 10:38 PM, Naresh nnaresh@gmail.com wrote:

Hi everybody,
We are trying to use chef-solo to install our application on linux. We
plan to distribute chef (chef-client install folder) along with our
application files and when user runs an install script, chef-solo will be
invoked. End-user need not know that we are using chef-solo. I have copied
chef folder on a different machine and tried to run a simple recipe with no
success.

Have any of you tried such thing? Is there a portable chef-client?


Regards
Naresh


Regards
Naresh


#6

Thanks for posting this, building your own package is indeed what you need to do if you want the package to be located somewhere else.

We have to bake the install location into the binaries in order to keep everything separate, otherwise libraries on your system could interfere with the Chef package (and vise-versa). The reason it works on windows is that windows’ shared library system works completely different than unix.


Daniel DeLeo

On Monday, June 8, 2015 at 8:38 AM, Eric Helgeson wrote:

I had this in my queue to post, it should help :slight_smile:

https://erichelgeson.github.io/blog/2015/06/08/building-chef-source-prefix/

-Eric Helgeson
@nulleric (https://twitter.com/nulleric)
https://usingchef.com

On Mon, Jun 8, 2015 at 10:23 AM, Joseph Anthony Pasquale Holsten <joseph@josephholsten.com (mailto:joseph@josephholsten.com)> wrote:

Sounds like you’re wanting a statically built copy of ruby.

The issue you’re seeing is because the operating system’s dynamic linker hasn’t been updated to look for library objects in chef-client’s lib path. Normally this would happen during package installation.


~j

On Jun 8, 2015, at 01:32, Naresh <nnaresh@gmail.com (mailto:nnaresh@gmail.com)> wrote:

Hi Ranjib,
By portable I meant just copying the chef folder. I want to avoid installing chef-client if possible. On Windows, I can take the chef-client install folder, copy that to other location or machine and run the chef-client. That doesn’t work on linux. I see the following error:

…/embedded/bin/ruby: error while loading shared libraries: libruby.so.2.1: cannot open shared object file: No such file or directory

Thanks

On Mon, Jun 8, 2015 at 3:05 PM, Ranjib Dey <dey.ranjib@gmail.com (mailto:dey.ranjib@gmail.com)> wrote:

omnibus installers are fairly portable as long as your platforms are same. how are you generating the installers? or how are you packaging your app+ chef. I use fpm to repackage omnibus chef with additional gems (like ruby-lxc) and then use chef-client in localmode (which is pretty much same as solo).
What error you are seeing?

On Sun, Jun 7, 2015 at 10:38 PM, Naresh <nnaresh@gmail.com (mailto:nnaresh@gmail.com)> wrote:

Hi everybody,
We are trying to use chef-solo to install our application on linux. We plan to distribute chef (chef-client install folder) along with our application files and when user runs an install script, chef-solo will be invoked. End-user need not know that we are using chef-solo. I have copied chef folder on a different machine and tried to run a simple recipe with no success.

Have any of you tried such thing? Is there a portable chef-client?


Regards
Naresh


Regards
Naresh


#7

Thank you all for the responses.
On 8 Jun 2015 23:43, “Daniel DeLeo” dan@kallistec.com wrote:

Thanks for posting this, building your own package is indeed what you need
to do if you want the package to be located somewhere else.

We have to bake the install location into the binaries in order to keep
everything separate, otherwise libraries on your system could interfere
with the Chef package (and vise-versa). The reason it works on windows is
that windows’ shared library system works completely different than unix.


Daniel DeLeo

On Monday, June 8, 2015 at 8:38 AM, Eric Helgeson wrote:

I had this in my queue to post, it should help :slight_smile:

https://erichelgeson.github.io/blog/2015/06/08/building-chef-source-prefix/

-Eric Helgeson
@nulleric (https://twitter.com/nulleric)
https://usingchef.com

On Mon, Jun 8, 2015 at 10:23 AM, Joseph Anthony Pasquale Holsten <
joseph@josephholsten.com (mailto:joseph@josephholsten.com)> wrote:

Sounds like you’re wanting a statically built copy of ruby.

The issue you’re seeing is because the operating system’s dynamic
linker hasn’t been updated to look for library objects in chef-client’s lib
path. Normally this would happen during package installation.


~j

On Jun 8, 2015, at 01:32, Naresh <nnaresh@gmail.com (mailto:
nnaresh@gmail.com)> wrote:

Hi Ranjib,
By portable I meant just copying the chef folder. I want to avoid
installing chef-client if possible. On Windows, I can take the chef-client
install folder, copy that to other location or machine and run the
chef-client. That doesn’t work on linux. I see the following error:

…/embedded/bin/ruby: error while loading shared libraries:
libruby.so.2.1: cannot open shared object file: No such file or directory

Thanks

On Mon, Jun 8, 2015 at 3:05 PM, Ranjib Dey <dey.ranjib@gmail.com
(mailto:dey.ranjib@gmail.com)> wrote:

omnibus installers are fairly portable as long as your platforms
are same. how are you generating the installers? or how are you packaging
your app+ chef. I use fpm to repackage omnibus chef with additional gems
(like ruby-lxc) and then use chef-client in localmode (which is pretty much
same as solo).

What error you are seeing?

On Sun, Jun 7, 2015 at 10:38 PM, Naresh <nnaresh@gmail.com
(mailto:nnaresh@gmail.com)> wrote:

Hi everybody,
We are trying to use chef-solo to install our application on
linux. We plan to distribute chef (chef-client install folder) along with
our application files and when user runs an install script, chef-solo will
be invoked. End-user need not know that we are using chef-solo. I have
copied chef folder on a different machine and tried to run a simple recipe
with no success.

Have any of you tried such thing? Is there a portable
chef-client?


Regards
Naresh


Regards
Naresh