Automating foreman+puppetmaster+storeconfigs installation on an EC2 host using CloudFormation.

Hi I am in the process of writing an Amazon CloudFormation template that I
hope will eventually be able to spin up a fully configured
Puppetmaster/Passenger/MySQL/ForemanServer/StorconfigsServer, running on
Ubuntu, using the latest version of Foreman from the develop branch, and
the latest version of Puppet from Ruby gems.

I have made a decent start, but have a number of questions.

  1. mysql gem or mysql2 gem with develop branch?

  2. Does storeconfigs work with rails3 (and same question regarding which
    mysql gem to use)

  3. Any thoughts on best practices for installation location for foreman?
    /opt/foreman or /var/www/foreman?

  4. Are there any init.d scripts out there for the develop Foreman (Rails3
    version)?

  5. Is there an easy method to call bundler so that foreman gets installed
    with a mysql aware database.yaml? All the instructions I have found have
    one manually editing database.yml to switch from sqllite3.

  6. Should I use the default ruby 1.8.7, or install 1.9 from source? (I
    think we aren't fully 1.9 ready yet, if I recall.)

  7. On a similar line, to use REE or not to use REE?

  8. What user shall I run Foreman as. I'm thinking www-data or foreman?

  9. Any issue with hardcoding Passenger 3.0.11 in the installation? (I need
    to hard code some paths into the apache config, and knowing what version of
    the gem is installed is a key part of the path.)

10 Any thoughts on what I should ship as a basic puppet manifest? (Haven't
given this much thought yet.)

As an aside, most of this will need to be done via a shell script that will
be embedded in the template, but on the flip side, this will be a good
example on how to install foreman on Ubuntu. (And a good example of
installing a fairly complex server using CloudFormation.)

Thanks,
Brian

··· --

Question 4: You say that you plan to use Passenger, which plugs into
Apache, so foreman doesn't need its own init.d script in that
configuration.

Have you looked at https://github.com/ohadlevy/puppet-foreman? I think you
will be able to find a number of answers to your questions in that source,
if not a foundation to build on.

> Hi I am in the process of writing an Amazon CloudFormation template that I
> hope will eventually be able to spin up a fully configured
> Puppetmaster/Passenger/MySQL/ForemanServer/StorconfigsServer, running on
> Ubuntu, using the latest version of Foreman from the develop branch, and
> the latest version of Puppet from Ruby gems.
>
> I have made a decent start, but have a number of questions.
>
> 1) mysql gem or mysql2 gem with develop branch?
>
both should work, i personally use mysql most of the time, but i heard good
things about mysql2.

> 2) Does storeconfigs work with rails3 (and same question regarding which
> mysql gem to use)
>

I think so, but it depends of how you install the gems, if you install them
on the system path, certian version of puppet might be effected, and just
as a side note, there is no need to install storeconfigs in order to use
foreman, I've also heard that puppetlabs are replacing storeconfigs with a
new postgresql based puppetdb.

> 3) Any thoughts on best practices for installation location for foreman?
> /opt/foreman or /var/www/foreman?
>
the packages usually go to /usr/share/foreman, but some of the files (such
as logs etc) go to other dirs.

> 4) Are there any init.d scripts out there for the develop Foreman (Rails3
> version)?
>
> i think that the latest version should work, maybe the recent rpm works
added minor changes?

> 5) Is there an easy method to call bundler so that foreman gets installed
> with a mysql aware database.yaml? All the instructions I have found have
> one manually editing database.yml to switch from sqllite3.
>
yeah, sadly thats the case, we were considering adding a wrapper, so we
would parse database.yml and foreman.yml and setup bundler accordingly.

> 6) Should I use the default ruby 1.8.7, or install 1.9 from source? (I
> think we aren't fully 1.9 ready yet, if I recall.)
>
1.87 is well tested.

> 7) On a similar line, to use REE or not to use REE?
>
> 8) What user shall I run Foreman as. I'm thinking www-data or foreman?
>
i think using foreman dedicated user is probably better

> 9) Any issue with hardcoding Passenger 3.0.11 in the installation? (I
> need to hard code some paths into the apache config, and knowing what
> version of the gem is installed is a key part of the path.)
>

afair, that file gets auto generated if you use passenger from a package
(and not a gem), it sure does that for rpms.

> 10 Any thoughts on what I should ship as a basic puppet manifest? (Haven't
> given this much thought yet.)
>
the foreman installer? :slight_smile: https://github.com/theforeman/foreman-installer

··· On Thu, Apr 12, 2012 at 10:10 PM, Brian Gupta wrote:

As an aside, most of this will need to be done via a shell script that
will be embedded in the template, but on the flip side, this will be a good
example on how to install foreman on Ubuntu. (And a good example of
installing a fairly complex server using CloudFormation.)

echo include foreman | puppet apply ? :slight_smile:

Thanks,
Brian

http://aws.amazon.com/solutions/solution-providers/brandorr/


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.