[Camps-users] chcamp utility?

Brian J. Miller brian at endpoint.com
Mon Jan 25 17:19:40 UTC 2010


Gert van der Spoel wrote:
>> -----Original Message-----
>> From: camps-users-bounces at endpoint.com [mailto:camps-users-
>> bounces at endpoint.com] On Behalf Of Jon Jensen
>> Sent: Monday, January 25, 2010 7:07 PM
>> To: camps-users at endpoint.com
>> Subject: Re: [Camps-users] chcamp utility?
>>
>> On Sun, 24 Jan 2010, Gert van der Spoel wrote:
>>
>>>> Your camps will be created generally in ~/camp\d\d, and the camp
>>>> scripts will first check for the CAMP environment variable, and
>> failing
>>>> that, fall back to $CWD =~ /camp(\d+)/ && $1 (more-or-less) to
>> locate
>>>> the camp number.
>>> Ah I had not seen that camp\d\d is the name to choose ... I had
>> created:
>>> /home/gert/camping/mydomain
>>>
>>> camp01, 02, 03 .. did not seem to be very explanatory and thought to
>> have
>>> mydomain
>>> myotherdomain
>>> mydomain-fixshipping
>>>
>>> etc, to be more useful names for camps to set up.
>>>
>>> But that is not possible, it is camp\d\d ?
>> It's literally camp\d\d? -- camp2 or camp29, but not camp02.
>>
>> Gert, did you make your camp with "mkcamp"? You shouldn't ever need to
>> choose a camp directory name at all. It's implicit.
>>
>> The way we keep track of what each camp is used for is by comments on
>> the
>> camp that go into the camp database, which you can see from the CGI
>> index
>> or with camp-info. If you were to name each camp based on its role
>> (which
>> we did in the very early days), it often becomes wrong as the purpose
>> of
>> the camp changes, or it's for multiple things, or gets reused after a
>> project goes into production. The genericity of numbers instead of
>> names
>> has been helpful and reinforces that all the camps are really the same.
>>
>> Please keep the questions coming! It's very helpful to have a camp n00b
>> and we should be able to improve the documentation based on the
>> questions
>> you've been asking.
> 
> I have not been able yet to create a working camp ... I think I am currently
> around the 'base camp' set up ... Because I will first need stuff in
> /home/camp/... before I can get anything else working ... 
> 
> I was setting up /home/camp/mycampname    with all global information for
> that camptype and to add Interchange there etc ...
> So the name in /home/camp/   is not to be camp1 , camp2  etc ... that is
> only in my /home/gert/camping/  directory?
> 
> CU,
> 
> Gert

The directories that go in /home/camp store the configuration 
information about how to build a camp and things that are used for 
setting up each camp, for instance the bare repo to/from which code 
flows, the nightly DB dump, etc. Then your individual "working" camps 
are stored in the developer user home directory at the root, so 
/home/gert/campXX. I don't believe there is currently support for 
"building" a camp in a subdirectory (or specified directory). That is 
something I had been building into the new branch.

The directory under /home/camp is named for the type of camp as 
specified in the DB in the camp_types relation. I actually like using 
the domain names as well, though I don't know that that has been used as 
a convention elsewhere. And I tend to reverse them to have them sort 
"properly". So for instance you could setup 2 camp types,

org_icdevgroup
com_endpoint

Then you'd have:

/home/camp
   /org_icdevgroup
     repo.git/
     etc/
     local-config
     ...
   /com_endpoint
     repo.git
     etc/
     local-config
     ...

Then you would create a camp of each type in your home directory,

mkcamp --type='com_endpoint' --comment="Primary Development"
mkcamp --type='org_icdevgroup' --comment="master: review camp"

You would end up like this:

/home/gert
   /camp21 (type is com_endpoint)
   /camp22 (type is org_icdevgroup)

I've become accustomed to setting the name of the branch that the camp 
is currently checked out to in the camp comment (something I hope to get 
added by default in camp-info/camp-index).

-- 
Brian J. Miller
End Point Corp.
brian at endpoint.com
W: 704-376-8292


More information about the Camps-users mailing list