[katello-devel] Bootstrapping katello

Ivan Nečas inecas at redhat.com
Tue Oct 23 17:24:17 UTC 2012


When running rake, it usually load all the rake tasks you have. Which 
might be a problem because some deps you just don't have yet and the 
devsetup calls bundle install for you (leveraging the Gemfile.lock from 
the "production" installation, so that you get the packages from the 
system first and then get the rest from rubygems. I'm not sure how 
spread the "rake bootstrap" command is (honestly: I've read about it 
here for the first time, but that might be my ignorance).

I prefer scripts against rake tasks because the rake task doesn't have 
nice args parsing and help messages. But feel free to update that or 
reuse it to make it into `rake bootstrap`. However, I think the 
important think is to document, which needs to be done for both cases. I 
think users doesn't care what command they run provided it works.

-- Ivan

On 10/23/2012 06:58 PM, Eric Helms wrote:
> +1 to what Jason said.  If the Ruby/Rails community at large is used to a rake:boostrap task, and we can take our bash script and wrap a rake task around it and achieve both with easy maintainability lets do it.
>
> -Eric
>
> ----- Original Message -----
> From: "Jason Rist" <jrist at redhat.com>
> To: "Ivan Nečas" <inecas at redhat.com>
> Cc: katello-devel at redhat.com
> Sent: Tuesday, October 23, 2012 12:44:32 PM
> Subject: Re: [katello-devel] Bootstrapping katello
>
> On 10/23/2012 12:15 AM, Ivan Nečas wrote:
>> On 10/23/2012 01:08 AM, David Davis wrote:
>>> Typically in Rails and Ruby projects, there's a boostrap rake task
>>> that'll take care of setting up the project so you can develop it
>>> and/or run it. I figured it might be worthwhile to set up something
>>> similar for Katello after some recent problems people have been
>>> experiencing. Not only will it appeal to Ruby/Rails developers but it
>>> might also make it easier for us to setup development instances of
>>> Katello. In addition, I think it might be easier to maintain than the
>>> wiki page and we could also allow for custom logic in the boostrap
>>> task in order to support different ways of setting up katello. To
>>> illustrate this last point, you could have some tasks like:
>>>
>>> rake bootstrap
>>> rake bootstrap:pulpv2
>>> rake bootstrap:sam
>>> (and so forth)
>>>
>>> Anyway, I've worked on a rough draft (http://fpaste.org/HwRc/). The
>>> hope is that in order to setup a new project for development, one
>>> would just have to run:
>>>
>>> git clone --recursive git at github.com:daviddavis/katello.git
>>> cd katello/src
>>> bundle install
>>> rake bootstrap
>>>
>>> Let me know what you all think. Thanks!
>> If you don't insist on the rake task, I thing this does what you had in
>> mind https://github.com/Katello/katello/pull/894 . IMO it needs to be
>> run before the bundle install (in fact it's good to run bundle install
>> from the script, making sure the development dependencies are met. This
>> script bases the installation on katello-configure which lets us to have
>> the basic installation on one place and have it maintained (since
>> katello-configure is tested on daily basis)
>>
>> -- Ivan
>>> David
>>>
>>> _______________________________________________
>>> katello-devel mailing list
>>> katello-devel at redhat.com
>>> https://www.redhat.com/mailman/listinfo/katello-devel
>>
> If rake:bootstrap is a common thing, then why don't' we tie it into the
> script you wrote? Similar to make configure of old.
>
> -J
>


-- 
Ivan




More information about the katello-devel mailing list