Foreman Integration With Chef

Hi,

Can you guide me how can I integrate chef with Foreman.
I followed few documents which are not clear, I have no clue how they are
doing it.

I am using Foreman 1.6 and I recently installed Foreman 1.8 also.

Few queries:

  1. Do I need to install chef-server on currently existing Foreman.
  2. If any plugin is there, how it works?

Thanks
Balasekhar Nelli

··· -- The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify ATMECS and delete it from your computer.

Hello,

I'd suggest reading foreman_chef manual [1] and then getting back with
specific questions. If it's one of the document that is not clear, please
point out what could we improve to make it better.

Answers for you questions

  1. no, chef-server can be running elsewhere (I didn't test but it should work
    with hosted chef as well)
  2. the manual covers three parts of it, foreman_chef (on Foreman side),
    smart_proxy_chef (on Foreman proxy) and chef-handlers-foreman on each chef-
    client.

[1] http://www.theforeman.org/plugins/foreman_chef/0.1/

Hope this helps

··· On Monday 30 of March 2015 21:59:53 Balasekhar Nelli wrote: > Hi, > > Can you guide me how can I integrate chef with Foreman. > I followed few documents which are not clear, I have no clue how they are > doing it. > > I am using Foreman 1.6 and I recently installed Foreman 1.8 also. > > Few queries: > 1) Do I need to install chef-server on currently existing Foreman. > 2) If any plugin is there, how it works? > > Thanks > Balasekhar Nelli


Marek

Hello Marek,

Thanks for your reply.
I am confused what combination I should use.

Foreman 1.8 + Chef 12 + CentOS 7 ( I failed to install Foreman 1.8 on
CentOS 7, ruby conflict)
Please tell me which CentOS version, Foreman Version, CHef and Ruby Version
should I use.

After installing what changes could I see in the Foreman UI.

··· On Tuesday, March 31, 2015 at 10:29:53 AM UTC+5:30, Balasekhar Nelli wrote: > > Hi, > > Can you guide me how can I integrate chef with Foreman. > I followed few documents which are not clear, I have no clue how they are > doing it. > > I am using Foreman 1.6 and I recently installed Foreman 1.8 also. > > Few queries: > 1) Do I need to install chef-server on currently existing Foreman. > 2) If any plugin is there, how it works? > > Thanks > Balasekhar Nelli > > The information in this message may be proprietary and/or confidential, > and protected from disclosure. If the reader of this message is not the > intended recipient, you are hereby notified that any dissemination, > distribution or copying of this communication is strictly prohibited. If > you have received this communication in error, please notify ATMECS and > delete it from your computer.


The information in this message may be proprietary and/or confidential, and
protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify ATMECS and
delete it from your computer.

Hello Marek,

Thanks for your guidance.
I could install Foreman 1.8 on CentOS 6.6 and it is running with ruby 1.8.7.
I have a Chefserver of version 12.

Following is my installation step,

> foreman-installer --enable-foreman-plugin-chef
> --enable-foreman-plugin-tasks
>
i.e I have installed both Foreman & Foreman Proxy on the same machine.
As you said, I didn't find much changes in the UI.

I have few questions:

  1. How can I integrate Chef-Server with Foreman
  2. Since my Foreman running with ruby 1.8.7, will it be a problem in future.
··· On Tuesday, March 31, 2015 at 10:29:53 AM UTC+5:30, Balasekhar Nelli wrote: > > Hi, > > Can you guide me how can I integrate chef with Foreman. > I followed few documents which are not clear, I have no clue how they are > doing it. > > I am using Foreman 1.6 and I recently installed Foreman 1.8 also. > > Few queries: > 1) Do I need to install chef-server on currently existing Foreman. > 2) If any plugin is there, how it works? > > Thanks > Balasekhar Nelli > > The information in this message may be proprietary and/or confidential, > and protected from disclosure. If the reader of this message is not the > intended recipient, you are hereby notified that any dissemination, > distribution or copying of this communication is strictly prohibited. If > you have received this communication in error, please notify ATMECS and > delete it from your computer.


The information in this message may be proprietary and/or confidential, and
protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify ATMECS and
delete it from your computer.

Hello Marek,

When I am trying to install Foreman 1.8 RC2 on On CentOS I encountered with
the following error.
The command that I ran was

*yum -y install foreman-installer *

–> Finished Dependency Resolution
> Error: Package: rubygem-clamp-0.6.2-3.el6.noarch (foreman)
> Requires: ruby(abi)
> Error: Package: rubygem-little-plugger-1.1.3-18.el6.noarch (foreman)
> Requires: ruby(abi)
> Error: Package: rubygem-kafo-0.6.6-2.el6.noarch (foreman)
> Requires: ruby(abi)
> Error: Package: rubygem-kafo_parsers-0.0.5-1.el6.noarch (foreman)
> Requires: ruby(abi)
> Error: Package: 1:foreman-installer-1.8.0-0.1.RC2.el6.noarch (foreman)
> Requires: ruby(abi)
> Error: Package: rubygem-highline-1.6.21-2.el6.noarch (foreman)
> Requires: ruby(abi)
> Error: Package: rubygem-hashie-2.0.5-1.el6.noarch (foreman)
> Requires: ruby(abi)
> Error: Package: rubygem-powerbar-1.0.11-8.el6.noarch (foreman)
> Requires: ruby(abi)
> Error: Package: rubygem-awesome_print-1.0.2-10.el6.noarch (foreman)
> Requires: ruby(abi)
> Error: Package: rubygem-apipie-bindings-0.0.11-1.el6.noarch (foreman)
> Requires: ruby(abi)
> Error: Package: rubygem-netrc-0.7.7-5.el6.noarch (foreman)
> Requires: ruby(abi)
> Error: Package: rubygem-logging-1.8.2-1.el6.noarch (foreman)
> Requires: ruby(abi)
> Error: Package: rubygem-oauth-0.4.7-6.el6.noarch (foreman)
> Requires: ruby(abi)
> Error: Package: rubygem-multi_json-1.10.1-1.el6.noarch (foreman)
> Requires: ruby(abi)
> You could try using --skip-broken to work around the problem
> You could try running: rpm -Va --nofiles --nodigest
>

Even after adding scl repo I struck at this step.
Without this installation I will not get foreman-installer binary.
Could you help me through this.

··· On Tuesday, March 31, 2015 at 10:29:53 AM UTC+5:30, Balasekhar Nelli wrote: > > Hi, > > Can you guide me how can I integrate chef with Foreman. > I followed few documents which are not clear, I have no clue how they are > doing it. > > I am using Foreman 1.6 and I recently installed Foreman 1.8 also. > > Few queries: > 1) Do I need to install chef-server on currently existing Foreman. > 2) If any plugin is there, how it works? > > Thanks > Balasekhar Nelli > > The information in this message may be proprietary and/or confidential, > and protected from disclosure. If the reader of this message is not the > intended recipient, you are hereby notified that any dissemination, > distribution or copying of this communication is strictly prohibited. If > you have received this communication in error, please notify ATMECS and > delete it from your computer.


The information in this message may be proprietary and/or confidential, and
protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify ATMECS and
delete it from your computer.

Hello Marek,

Ignore the above thing. I could able to resolve it.

··· On Tuesday, March 31, 2015 at 10:29:53 AM UTC+5:30, Balasekhar Nelli wrote: > > Hi, > > Can you guide me how can I integrate chef with Foreman. > I followed few documents which are not clear, I have no clue how they are > doing it. > > I am using Foreman 1.6 and I recently installed Foreman 1.8 also. > > Few queries: > 1) Do I need to install chef-server on currently existing Foreman. > 2) If any plugin is there, how it works? > > Thanks > Balasekhar Nelli > > The information in this message may be proprietary and/or confidential, > and protected from disclosure. If the reader of this message is not the > intended recipient, you are hereby notified that any dissemination, > distribution or copying of this communication is strictly prohibited. If > you have received this communication in error, please notify ATMECS and > delete it from your computer.


The information in this message may be proprietary and/or confidential, and
protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify ATMECS and
delete it from your computer.

Hello Marek,
I installed Foreman 1.8 on CentOS 7

foreman-installer --enable-foreman-plugin-chef
> --enable-foreman-plugin-tasks --enable-foreman-proxy-plugin-chef
>
It worked fine.

1)How can I make sure that foreman-proxy-chef-plugin is installed or not?
2)As you mentioned in the document that Global Parameters will
automatically replicate in the UI but in my case it has not happened.
3)Is it okay if I enter the Global Parameters manually?
4)Is there any Provisioning template other the templates in Foreman.
5) I have to mention my run list in the Provisioning Template itself, right?

··· On Tuesday, March 31, 2015 at 10:29:53 AM UTC+5:30, Balasekhar Nelli wrote: > > Hi, > > Can you guide me how can I integrate chef with Foreman. > I followed few documents which are not clear, I have no clue how they are > doing it. > > I am using Foreman 1.6 and I recently installed Foreman 1.8 also. > > Few queries: > 1) Do I need to install chef-server on currently existing Foreman. > 2) If any plugin is there, how it works? > > Thanks > Balasekhar Nelli > > The information in this message may be proprietary and/or confidential, > and protected from disclosure. If the reader of this message is not the > intended recipient, you are hereby notified that any dissemination, > distribution or copying of this communication is strictly prohibited. If > you have received this communication in error, please notify ATMECS and > delete it from your computer.


The information in this message may be proprietary and/or confidential, and
protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify ATMECS and
delete it from your computer.

Hello Marek,
Hope you are doing good.
Thanks for your help through out the setup.

I have few more queries regarding the Provisioning Templates.

  1. Can I use a user-data type template ( Since my Foreman-Setup is only
    recognizing only user-data template ) by making my own template.
··· On Tuesday, March 31, 2015 at 10:29:53 AM UTC+5:30, Balasekhar Nelli wrote: > > Hi, > > Can you guide me how can I integrate chef with Foreman. > I followed few documents which are not clear, I have no clue how they are > doing it. > > I am using Foreman 1.6 and I recently installed Foreman 1.8 also. > > Few queries: > 1) Do I need to install chef-server on currently existing Foreman. > 2) If any plugin is there, how it works? > > Thanks > Balasekhar Nelli > > The information in this message may be proprietary and/or confidential, > and protected from disclosure. If the reader of this message is not the > intended recipient, you are hereby notified that any dissemination, > distribution or copying of this communication is strictly prohibited. If > you have received this communication in error, please notify ATMECS and > delete it from your computer.


The information in this message may be proprietary and/or confidential, and
protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify ATMECS and
delete it from your computer.

Hello,

regarding version combination, Foreman 1.8 + Chef 12 + CentOS 7 seems good to
me. What Ruby conflict do you encounter? How did you install Foreman? Are you
trying to install everything on one host?

Foreman runs in it's own version of Ruby provided by software collection
(1.9.3) that does not conflict with system Ruby. Foreman proxy uses system
Ruby, that must be 1.9+ (that's OK on Centos 7).

When you install everything, you don't see much changes in UI. It's the same
for both Puppet and Chef. To see screenshots of various features that you can
do with Foreman and Chef, see the usage section in manual [1]

[1]http://www.theforeman.org/plugins/foreman_chef/0.1/#4.Usage(featuresdescription)

··· -- Marek

On Monday 06 of April 2015 22:07:41 Balasekhar Nelli wrote:

Hello Marek,

Thanks for your reply.
I am confused what combination I should use.

Foreman 1.8 + Chef 12 + CentOS 7 ( I failed to install Foreman 1.8 on
CentOS 7, ruby conflict)
Please tell me which CentOS version, Foreman Version, CHef and Ruby Version
should I use.

After installing what changes could I see in the Foreman UI.

On Tuesday, March 31, 2015 at 10:29:53 AM UTC+5:30, Balasekhar Nelli wrote:

Hi,

Can you guide me how can I integrate chef with Foreman.
I followed few documents which are not clear, I have no clue how they are
doing it.

I am using Foreman 1.6 and I recently installed Foreman 1.8 also.

Few queries:

  1. Do I need to install chef-server on currently existing Foreman.
  2. If any plugin is there, how it works?

Thanks
Balasekhar Nelli

The information in this message may be proprietary and/or confidential,
and protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify ATMECS and
delete it from your computer.


Marek

Hello,

see my answers below

> I could install Foreman 1.8 on CentOS 6.6 and it is running with ruby 1.8.7.
> I have a Chefserver of version 12.

This won't work, foreman proxy plugin requires system ruby to be 1.9+ so you
should use CentOS 7.

> Following is my installation step,
>
> > foreman-installer --enable-foreman-plugin-chef
> > --enable-foreman-plugin-tasks

This only installs foreman chef plugin, you also need smart proxy chef plugin,
so you need --enable-foreman-proxy-plugin-chef as well. But again, on CentOS
7.

> i.e I have installed both Foreman & Foreman Proxy on the same machine.
> As you said, I didn't find much changes in the UI.
>
> I have few questions:
> 1) How can I integrate Chef-Server with Foreman

Please read the manual.

> 2) Since my Foreman running with ruby 1.8.7, will it be a problem in future.

You can always install just smart proxy on some system with ruby 1.9+. Proxy
does not have to run on the same host as Foreman.

··· -- Marek

On Tuesday, March 31, 2015 at 10:29:53 AM UTC+5:30, Balasekhar Nelli wrote:

Hi,

Can you guide me how can I integrate chef with Foreman.
I followed few documents which are not clear, I have no clue how they are
doing it.

I am using Foreman 1.6 and I recently installed Foreman 1.8 also.

Few queries:

  1. Do I need to install chef-server on currently existing Foreman.
  2. If any plugin is there, how it works?

Thanks
Balasekhar Nelli

The information in this message may be proprietary and/or confidential,
and protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify ATMECS and
delete it from your computer.


Marek

Hello,

see my answers below in text

> Hello Marek,
> I installed Foreman 1.8 on CentOS 7
>
> foreman-installer --enable-foreman-plugin-chef
>
> > --enable-foreman-plugin-tasks --enable-foreman-proxy-plugin-chef
>
> It worked fine.
>
> 1)How can I make sure that foreman-proxy-chef-plugin is installed or not?

Navigate to Infrastructure -> Smart Proxies, you should see Chef among listed
features of your smart proxy. If not, try refreshing features.

> 2)As you mentioned in the document that Global Parameters will
> automatically replicate in the UI but in my case it has not happened.

you can try running foreman-rake db:seed, they should appear there
afterwards

> 3)Is it okay if I enter the Global Parameters manually?

yes, but it's preferred to use the seeding mechanism

> 4)Is there any Provisioning template other the templates in Foreman.

yes, there are plenty of them, kickstart and preseed templates already
includes the chef bootstrapping snippets

> 5) I have to mention my run list in the Provisioning Template itself, right?

bootstrapping snippet provided by the plugin has hardcoded default role as a
runlist, I'd like to improve this in future but until we get there, you're
right

you should clone this strategy and specify the roles you want to use and the
change the bootstrap strategy to your clone (global parameter with name
chef_bootstrap_template)

Hope this helps

··· On Wednesday 08 of April 2015 04:48:09 Balasekhar Nelli wrote:


Marek

On Tuesday, March 31, 2015 at 10:29:53 AM UTC+5:30, Balasekhar Nelli wrote:

Hi,

Can you guide me how can I integrate chef with Foreman.
I followed few documents which are not clear, I have no clue how they are
doing it.

I am using Foreman 1.6 and I recently installed Foreman 1.8 also.

Few queries:

  1. Do I need to install chef-server on currently existing Foreman.
  2. If any plugin is there, how it works?

Thanks
Balasekhar Nelli

The information in this message may be proprietary and/or confidential,
and protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify ATMECS and
delete it from your computer.


Marek