[Camps-users] Additional Scripts During Camp Creation

Brian 'Phunk' Gadoury bgadoury at endpoint.com
Mon May 27 15:56:27 UTC 2013


Sam Batschelet wrote:
> I am looking to extend functionality of camps to include running a few
> bash scripts during camp creation.  My thoughts were to setup a file much
> like camp-config-files to list out the location of the scripts and the
> order of processing.  Before I did this I was curious if anyone has done
> anything like this or would object to this type of functionality.  I have
> some custom perl configurations and services that I am building during
> camp creation as well as using carton to locally install perl modules.  I
> would like to manage this process with these scripts, adding this
> functionality I feel would be helpful for others as there camp setups
> become more complex.
> _______________________________________________

Hi Sam,

As Richard mentioned, I was looking for this kind of thing for a Rails
project I was working on. I looked into what it would take to build, but I
never got the time to build it.

I thought it made the most sense to mirror the approach taken with
app_start, app_stop and app_restart (see Camp::Master): If local-config
has entries for any of those config directives, they are executed at the
appropriate time: Example from local-config:

# custom hooks for project
app_start:__CAMP_PATH__/bin/camp-restart-hook.sh --start
app_stop:__CAMP_PATH__/bin/camp-restart-hook.sh --stop
app_restart:__CAMP_PATH__/bin/camp-restart-hook.sh --restart

(In my case, that camp-restart-hook.sh script is just something I wrote
that manages our camp-specific ElasticSearch and CouchDB services.)

It sounds like you have more complicated requirements, but I just wanted
to make sure you were familiar with this existing functionality in case it
was helpful.


Thanks,
Phunk


--
Brian 'Phunk' Gadoury
End Point Corporation
bgadoury at endpoint.com
work cell: 801-215-9162
skype: endpointbgadoury




More information about the Camps-users mailing list