-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
39 lines (32 loc) · 1.41 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Ensure ragger http_json/requester is brought up to date with the way
creator does it, with http_adapter.
At the moment the puller build script uses /tmp/cyber-dojo
if it detects the run is on CI. Otherwise it assumes
to use ${ROOT_DIR}/../commander/cyber-dojo
A better approach (which should be used in all the repos) is...
if [ -f "${ROOT_DIR}/../commander/cyber-dojo" ]; then
echo "${ROOT_DIR}/../commander/cyber-dojo"
elif [ -f "/tmp/cyber-dojo" ]; then
echo "/tmp/cyber-dojo"
else
url=....
curl --fail --output /tmp/cyber-dojo --silent "${url}"
echo "/tmp/cyber-dojo"
fi
So in time, ragger will only be used if the rag-lambda is exposed.
And its API will become:
ragger.sha
ragger.alive?
ragger.ready?
ragger.colour(rag_lambda, stdout, stderr, status)
Which feels pretty thin. It's really just a wrapper for runner.
This could just be handled inside web?
Currently RagLambdaCache.new_image() gets the lambda from the
image using a custom cyber-dojo.sh inside runner.
This is overkill. Simpler to have a dedicated traffic_light_src()
method in runner that uses docker directly. Viz it does
docker run --rm --entrypoint cat ${image_name} /usr/local/bin/red_amber_green.rb
When creating a new LTF image there could initially be no
red_amber_green.rb file. Perhaps the docker run command above
could be a bit more resilient in this case?
Changed by mind. Better for runner to have just its run_cyber_dojo_sh method.