1
- # EXASLCT (Script Langauge Container Tool)
1
+ # Script-Languages-Container-Tool Developer Guide
2
+
2
3
EXASLCT is the build tool for the script language container.
3
- Its usage is described [ here] ( ../README.md ) .
4
- This readme is about the inner working of EXASLCT.
4
+ This document is about the inner working of EXASLCT.
5
5
6
6
## About the Script Language Containers
7
7
The Script Language Containers are getting build
8
8
from several Dockerfiles which depend on each other.
9
9
These Dockerfiles need to install all necessary
10
- dependencies for the [ script client] ( ../src ) ,
10
+ dependencies for the [ script client] ( https://github.com/exasol/script-languages/tree/master/exaudfclient/base ) ,
11
11
compile the script client and install all necessary dependencies
12
12
for the flavor and the customizations of the user.
13
13
@@ -21,7 +21,7 @@ It was actual unclear which of the dependencies were essential
21
21
and which were not. For some flavors it was impossible to run
22
22
the build on travis, because it exceeded the maximum runtime
23
23
per job of 50 minutes.
24
- The build system and the test runner were bash script
24
+ The build system and the test runner were both bash scripts
25
25
which were messy and difficult to maintain.
26
26
They worked with background jobs to do things in parallel
27
27
which convoluted the logs which made error analysis difficult.
@@ -55,7 +55,7 @@ Most of these tasks produce some kind of output, for example:
55
55
- docker image
56
56
- a running docker container
57
57
58
- Often, other tasks than depend either on the output or
58
+ Often, other tasks then depend either on the output, or
59
59
the action of one or more other tasks.
60
60
These dependencies build a direct acyclic graph of tasks,
61
61
also known as workflow.
@@ -73,7 +73,7 @@ but is suitable for other scenarios, too.
73
73
Luigi describes tasks as subclasses of Luigi.Task
74
74
which implements the following methods:
75
75
76
- ``` python
76
+ ```
77
77
class TaskC(luigi.Task):
78
78
79
79
def output(self):
@@ -85,20 +85,19 @@ class TaskC(luigi.Task):
85
85
86
86
def requires(self):
87
87
return [TaskA(),TaskB()]
88
-
89
88
```
90
89
91
- Here we describe a TaskC which depends of TaskA and TaskB
92
- defined in the requires() method.
90
+ Here we describe a TaskC which depends on TaskA and TaskB
91
+ defined in the ` requires() ` method.
93
92
It does something which is specified in the run() method.
94
- Futher , it produces Target() as output.
95
- Luigi provides the dependency resolution, scheduling and parallelisation .
93
+ Further , it produces Target() as output.
94
+ Luigi provides the dependency resolution, scheduling and parallelization .
96
95
97
- Besides this static way of describing the dependencies between tasks,
96
+ Besides, this static way of describing the dependencies between tasks,
98
97
Luigi also provides so called
99
98
[ dynamic dependencies] ( https://luigi.readthedocs.io/en/stable/tasks.html#dynamic-dependencies ) ,
100
99
which allow more flexible patterns in special case.
101
- Especially, if the order of execution of dependencies is important or
100
+ Especially, if the order of execution of dependencies is important, or
102
101
the dependencies depend on some calculation. The dynamic dependencies
103
102
allow the implementation of a fork-join pattern.
104
103
@@ -109,7 +108,7 @@ stops if any other StoppableTask failed in the workflow.
109
108
110
109
## Build Steps and their Dependencies
111
110
112
- We compose the language container from several different Dockerfiles.
111
+ We compose the language container from several Dockerfiles.
113
112
Each Dockerfile installs dependencies for one specific purpose.
114
113
We also added a separate Dockerfile flavor-customization for user specific changes.
115
114
The user specific changes will be merged on filesystem basis
@@ -119,7 +118,7 @@ that could prevent the script client from working properly.
119
118
120
119
The following graph shows the default build steps and their dependencies.
121
120
122
- ![ ] ( docs /image-dependencies.png)
121
+ ![ ] ( images /image-dependencies.png)
123
122
124
123
A dependency between build steps can be either a FROM or
125
124
COPY dependencies. A FROM dependency means that
@@ -130,7 +129,7 @@ of the source of the arrow.
130
129
131
130
All steps with the string "build_run" in their name,
132
131
either run the build for the script client or
133
- at least inherit from a images which had build it.
132
+ at least inherit from an image which had built it.
134
133
As such these images contain all necessary tools to rebuild
135
134
the script client for debugging purposes.
136
135
@@ -178,9 +177,9 @@ class AnalyzeBuildRun(DockerFlavorAnalyzeImageTask):
178
177
## How does caching work
179
178
180
179
Exaslct was built with caching in mind,
181
- because building a flavor might take very long and
180
+ because building a flavor might take very long, and
182
181
many build steps don't change that often.
183
- Furthermore, a end user most likely only changes the build-step
182
+ Furthermore, an end user most likely only changes the build-step
184
183
flavor-customization which is designed to have a minimal impact
185
184
on all other build steps.
186
185
@@ -191,11 +190,11 @@ EXASLCT provides three types of caching:
191
190
- file system cache with saved docker images
192
191
- docker registry as a remote cache
193
192
194
- All caches can work together, the analyzes phase checks
195
- in which cache a images is available.
193
+ All caches can work together, the analysis phase checks
194
+ in which cache an images is available.
196
195
The different type of caches have different precedence
197
196
which might you override by command line parameters.
198
- The precedence is derived by how fast is a image available.
197
+ The precedence is derived by how fast is an image available.
199
198
Docker images managed by the docker daemon are instantaneously available.
200
199
Saved docker images on the filesystem follow next,
201
200
they need to be loaded by the daemon,
@@ -211,9 +210,9 @@ Responsible for hashing the build context is the `BuildContextHasher`
211
210
which uses the ` FileDirectoryListHasher ` .
212
211
213
212
The ` BuildContextHasher ` combines the hash values of all directories,
214
- files and their executable rights of the build context,
213
+ files and their executable permissions of the build context,
215
214
such as the hash values of all images
216
- the current images depends on and the image changing build arguments
215
+ the current images depends on, and the image changing build arguments
217
216
to one hash value for the image.
218
217
219
218
Other build arguments which only influence the resources
0 commit comments