chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Deploying Bundles of Chicken Programs


From: Andy Bennett
Subject: [Chicken-users] Deploying Bundles of Chicken Programs
Date: Tue, 25 Sep 2012 17:35:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120817 Icedove/10.0.6

Hi,

The deployment of binaries produced by chicken has come up on IRC a
number of times over the past weeks and I have a requirement for it myself.

Here I present my findings and partially finished solution.


I'm familiar with the -deploy option to chicken-install and the -deploy
and -deployed options to csc. My experiments suggest that they seem
insufficient to deploy an application that consists of multiple binaries
and that depends on eggs which themselves have dependencies.


Specifically:

chicken-install -deploy
  This does not install dependencies for the egg.
  It does not provide libchicken.*


chicken-install -i
  This does not provide a libchicken.*


csc -deploy
  I couldn't work out how to specify the directory. The default is the
name of the binary.
  It does provide libchicken.*


csc -deployed
  Links the binary as expected.
  Does not provide libchicken.*


I worked with Mario on IRC and we came up with the method in the
attached files.

chicken-deploy-eggs
  This is based on Mario chicken-update-eggs script. I currently use it
in --dry-run mode in order to extract its proposed command line as I
need to complement that with CHICKEN_REPOSITORY and LD_LIBRARY_PRELOAD
exports in order for it to work properly but the script itself has
requirements on eggs such as http-client that may not be in the target
deployment.
  I've currently hardcoded /usr/local/chicken-4.7.0 into the source so
you may have to modify that for your own environment.


deploy.sh
  This is the method that we came up with plus some extra bits
particular to how my project is arranged.
  It doesn't have any command line arguments yet: the user has to tweak
the definitions at the top of the file.
  It doesn't currently do any error checking: it just assumes everything
succeeds and plows on thru'.


The general algorithm is to create a fresh CHICKEN_REPOSITORY and
install the eggs there with chicken-install in its regular mode. This
will cause all the dependencies to be dragged in.
Then, create another fresh CHICKEN_REPOSITORY and inject the appropriate
libchicken.* files. Rebuild the eggs from the first repo into the second
repo using the chicken-deploy-eggs script.
Finally, build the application binaries with the -deployed flag and then
copy them into the repo.

The socket egg won't install into the second repo without setting
LD_LIBRARY_PRELOAD.


The attached scripts have not been particularly well tested. They're a
work in progress and the aim is to invite comments and get suggestions
for things I may have overlooked.


How do other people deploy their applications? Eggifying them
insufficient to make them easily deployable.




Regards,
@ndy

-- 
address@hidden
http://www.ashurst.eu.org/
0x7EBA75FF

Attachment: chicken-deploy-eggs.scm
Description: Text Data

Attachment: deploy.sh
Description: application/shellscript


reply via email to

[Prev in Thread] Current Thread [Next in Thread]