Created a script at:
http://manageddreams.com/springgridstag ... ompiler.py (it's stored in git too), which you can use on EC2 ami ami-1515f67c like this:
- start instance of ami-1515f67c
- ssh into running instance
- inside instance:
-- wget
http://manageddreams.com/springgridstag ... ompiler.py
-- bash bootstrap_cloudcompiler.py
This will:
- install all dependencies (java, git, boost, gcc, ...)
- download springheadless head
- build everything
The actual build takes I think about 15 minutes, but anyway times from the other steps just now:
13h11 start script
13h13 script finished installing packages
13h13 script finished git checkout of springheadless
13h14 script finished cmake
... and I don't have a time for finishing the build yet since it's still running
Package installation is insanely fast, though I think there is a slight bandwidth cost to that (5 pence?).
There is also a script at
http://manageddreams.com/springgridstag ... trunner.py , but this depends on there being a precompiled spring-hl in a suitable tar.gz file, and also this won't be sufficient to be able to compile AIs.
Edit, maybe what we need is for the compilation process to provide as an output, stored on s3 or similar:
- the spring-hl build, along with unitsync, the base files and so on, so that botrunner can run
- the spring headers, and interfaces correspdongin to that, so taht we can build AI sourcecode
.. then the botrunner can download these things from s3, and be in a pretty decent position to run things, and compile them.
Decision to make as far as instances, compiation:
options: one instance/script type:
- compiler and botrunner are the same thing
-- easy
-- instances take a looonngnggg time to start
-- considerable waste of instance time
option: two instance/script types:
- compiler: builds spring and uploads it to s3
- botrunner: builds ais (so needs compilation dependencies), and runs botrunner
Advantages: reasonably fast
Disadvantage: each botrunner will install all compilation dependencies, which uses maybe 500meg of bandwidth (so about 7.5p or so)
option: three instances/script types:
- compiler: builds spring and uploads it to s3
- ai compiler: downloads built spring from s3, compiles one or more ais, then uploads those to s3
- botrunner: runs pre-compiled ais and spring
In theory this has the potential to be more efficient but:
- if we run the instances in parallel on s3, we are charged for multiple instance-hours
- seems more complicated
... so I might go for the two instance option:
- one instance/script to compile spring-hl, the ai interfaces, and upload this to s3
- one instance/script which runs a botrunner, and a botrunner is a full compiler instance, but uses the precompiled spring-hl from the compiler instance.