7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-02 14:20:47 +00:00
Commit Graph

7 Commits

Author SHA1 Message Date
Régis Behmo
bce6432d85 Improve job running in local and k8s
Running jobs was previously done with "exec". This was because it
allowed us to avoid copying too much container specification information
from the docker-compose/deployments files to the jobs files. However,
this was limiting:

- In order to run a job, the corresponding container had to be running.
This was particularly painful in Kubernetes, where containers are
crashing as long as migrations are not correctly run.
- Containers in which we need to run jobs needed to be present in the
docker-compose/deployments files. This is unnecessary, for example when
mysql is disabled, or in the case of the certbot container.

Now, we create dedicated jobs files, both for local and k8s deployment.
This introduces a little redundancy, but not too much. Note that
dependent containers are not listed in the docker-compose.jobs.yml file,
so an actual platform is still supposed to be running when we launch the
jobs.

This also introduces a subtle change: now, jobs go through the container
entrypoint prior to running. This is probably a good thing, as it will
avoid forgetting about incorrect environment variables.

In k8s, we find ourselves interacting way too much with the kubectl
utility. Parsing output from the CLI is a pain. So we need to switch to
the native kubernetes client library.
2020-04-25 23:12:42 +02:00
Régis Behmo
731de6a747 Fix incorrectly parsed empty strings in config save --set ...=...
When running `config save --set KEY=""`, KEY was incorrectly interpreted
as null.
2020-01-21 18:32:34 +01:00
Régis Behmo
d4a429bcc5 Fix parsing of weird characters in configuration parameters 2019-07-11 10:31:23 +08:00
Régis Behmo
e33b61fd04 Improve command line yaml value deserialization 2019-07-10 15:22:12 +08:00
Régis Behmo
f2f714ad23 Run code formatting on the entire code base 2019-05-05 12:30:20 +02:00
Régis Behmo
ddbcedab5a Fix pyyaml deprecated warning
We were getting the following warning with the latest version of pyyaml:

    YAMLLoadWarning: calling yaml.load() without Loader=... is
    deprecated, as the default Loader is unsafe. Please read
    https://msg.pyyaml.org/load for full details.
2019-03-24 14:43:17 -07:00
Régis Behmo
92c9132180 Move all yaml-related code to dedicated module 2019-03-24 14:34:50 -07:00