Moving Crowbar out of /opt

15 views
Skip to first unread message

Vincent Untz

unread,
Jul 14, 2015, 12:54:17 PM7/14/15
to cro...@googlegroups.com
Hi,

I started looking at what it would involve to move Crowbar out of /opt,
and while I haven't looked at everything yet, I'd like to suggest the
following:

- move the rails app (/opt/dell/crowbar_framework) to /var/lib/crowbar
or /var/lib/crowbar/rails (one alternative is /srv/www/crowbar -- not
sure what's best, tbh)

- move all chef files (/opt/dell/chef) to /usr/share/crowbar/chef

- move binaries from /opt/dell/bin that are supposed to be run by the
user to /usr/bin and the others (internal helpers) to
/usr/lib/crowbar

- try to get rid of /opt/dell/barclamps completely (the move to a
barclamp registry should help with that); if not possible, then move
the remaining files to /usr/share/crowbar/barclamps

- move /opt/dell/switch (which contains data generated by a chef
recipe) to /var/lib/crowbar/switch (not sure I like that if we put
the rails app in /var/lib/crowbar, but can't find a better location)

- change the code assuming that things are in /opt/dell to look for new
directories first and then old directories (so we have a smooth
transition)

- change the code in the rails app that uses Rails.root.join('..', ...)
to use some helper that will find the right paths

I'm unsure how this impacts things for people running Crowbar straight
from git, but I would assume we can make that work with the helpers that
find the right path.

Any opinion?

Vincent

--
Les gens heureux ne sont pas pressés.

Thomas Boerger

unread,
Jul 14, 2015, 5:03:59 PM7/14/15
to Vincent Untz, cro...@googlegroups.com
If I look at hawk we should put crowbar to /src/www/crowbar. For the database it makes sense to put it at /var/lib/crowbar/production.sqlite3.

Fot the chef recipes I'm not really sure.

The barclamps can be converted to rails engines and after that into rubygems, than they can be packaged with gem2rpm. The chef recipes are just embedded into the gem and the registry class can give us the path to that folder.

The only thing we need to think about in that case is how to load the gems and maybe it makes sense to put a plain rails app into crowbar/crowbar which mounts the rails engines core, openstack, ha and ceph.
> --
> You received this message because you are subscribed to the Google Groups "crowbar" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to crowbar+u...@googlegroups.com.
> To post to this group, send email to cro...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/crowbar/20150714165414.GH3309%40vuntz.net.
> For more options, visit https://groups.google.com/d/optout.

Dirk Müller

unread,
Jul 15, 2015, 3:10:44 AM7/15/15
to cro...@googlegroups.com, vu...@suse.com, vu...@suse.com
Hi Vincent,


 - move the rails app (/opt/dell/crowbar_framework) to /var/lib/crowbar
   or /var/lib/crowbar/rails (one alternative is /srv/www/crowbar -- not
   sure what's best, tbh)

/srv/www/ is the SUSE way typically, +1. /var/lib sounds wrong to me since there is no modification of the app and it is
noarch, so /usr/share/crowbar would make most sense.
 
 - move all chef files (/opt/dell/chef) to /usr/share/crowbar/chef

wasn't there the "standard" location with our chef packaging under /var/chef/cookbooks or something like that? I think it makes sense to integrate with that. 
 
 - move binaries from /opt/dell/bin that are supposed to be run by the
   user to /usr/bin and the others (internal helpers) to
   /usr/lib/crowbar

+1
 
 - try to get rid of /opt/dell/barclamps completely (the move to a
   barclamp registry should help with that); if not possible, then move
   the remaining files to /usr/share/crowbar/barclamps

one thing at a time.. :-)

 
 - move /opt/dell/switch (which contains data generated by a chef
   recipe) to /var/lib/crowbar/switch (not sure I like that if we put
   the rails app in /var/lib/crowbar, but can't find a better location)

 

 - change the code assuming that things are in /opt/dell to look for new
   directories first and then old directories (so we have a smooth
   transition)

 - change the code in the rails app that uses Rails.root.join('..', ...)
   to use some helper that will find the right paths

well, as a first step you could just move all of /opt/dell under /srv/www and then fix it one after the other..


Greetings,
Dirk 

Adam Spiers

unread,
Jul 15, 2015, 7:27:16 AM7/15/15
to Thomas Boerger, Vincent Untz, cro...@googlegroups.com
Thomas Boerger <tho...@boerger.ws> wrote:
> If I look at hawk we should put crowbar to /src/www/crowbar. For the database it makes sense to put it at /var/lib/crowbar/production.sqlite3.
>
> Fot the chef recipes I'm not really sure.
>
> The barclamps can be converted to rails engines and after that into rubygems, than they can be packaged with gem2rpm. The chef recipes are just embedded into the gem and the registry class can give us the path to that folder.
>
> The only thing we need to think about in that case is how to load the gems and maybe it makes sense to put a plain rails app into crowbar/crowbar which mounts the rails engines core, openstack, ha and ceph.

All sounds good for me. How (if at all) do we want to support
customer modifications to cookbooks, e.g. to templates? Having them
modify /usr/share is not nice - some parallel override hierarchy would
be better.

Thomas Boerger

unread,
Jul 15, 2015, 7:36:14 AM7/15/15
to Adam Spiers, Thomas Boerger, Vincent Untz, cro...@googlegroups.com
Do we support that now?

Adam Spiers

unread,
Jul 15, 2015, 8:58:32 AM7/15/15
to Dirk Müller, cro...@googlegroups.com, vu...@suse.com
Dirk Müller <dmu...@gmail.com> wrote:
> Hi Vincent,
>
>
> > - move the rails app (/opt/dell/crowbar_framework) to /var/lib/crowbar
> > or /var/lib/crowbar/rails (one alternative is /srv/www/crowbar -- not
> > sure what's best, tbh)
> >
>
> /srv/www/ is the SUSE way typically, +1. /var/lib sounds wrong to me since
> there is no modification of the app and it is
> noarch, so /usr/share/crowbar would make most sense.
>
>
> > - move all chef files (/opt/dell/chef) to /usr/share/crowbar/chef
> >
>
> wasn't there the "standard" location with our chef packaging under
> /var/chef/cookbooks or something like that? I think it makes sense to
> integrate with that.

No it's /var/chef/cache/cookbooks, and as the path suggests, that's
for the chef-client cache when the cookbooks are pulled down from the server.

> > - try to get rid of /opt/dell/barclamps completely (the move to a
> > barclamp registry should help with that); if not possible, then move
> > the remaining files to /usr/share/crowbar/barclamps
>
> one thing at a time.. :-)
>
> > - move /opt/dell/switch (which contains data generated by a chef
> > recipe) to /var/lib/crowbar/switch (not sure I like that if we put
> > the rails app in /var/lib/crowbar, but can't find a better location)

[snipped]

> well, as a first step you could just move all of /opt/dell under /srv/www
> and then fix it one after the other..

+1
Reply all
Reply to author
Forward
0 new messages