Valentin Lab
dd8ff92c63
new: image update is now available for charms
6 years ago
Valentin Lab
88c574feb5
fix: ``-f COMPOSE_FILE`` didn't work as expected
6 years ago
Valentin Lab
b0da23c146
fix: dev: spaces cosmetics !minor
6 years ago
Valentin Lab
1e4afe89fe
chg: dev: when waiting for database to start up, wait longer and display clearer message.
6 years ago
Valentin Lab
91934b51d9
fix: ``default-options`` in charms was not read as expected
6 years ago
Valentin Lab
641fef5900
chg: dev: be more explicit when failing to merge yaml
6 years ago
Valentin Lab
20a85958d2
new: add restart policy 'unless-stopped' to services.
6 years ago
Valentin Lab
90ae781fe6
chg: dev: do only one merging when computing docker-compose yaml from metadata.
6 years ago
Valentin Lab
0cf06d3e44
fix: nasty typo that cached file in wrong directory and would keep cache version between session.
6 years ago
Valentin Lab
ee12331c08
new: provide ``docker_get_uid`` for charms.
6 years ago
Valentin Lab
f07433b742
chg: ``cached_cmd_on_image`` is now using ``/bin/sh`` rather than ``/bin/bash`` for supporting alpine images
6 years ago
Valentin Lab
e3d08f9fc6
new: ``default-options`` in charm root is loaded as default options of service
6 years ago
Valentin Lab
e0b4993f8a
fix: dev: missing export for ``get_service_relation`` for charm usage.
6 years ago
Valentin Lab
5b6aca0072
fix: db connection, wait if receiving "the database system is starting up".
6 years ago
Valentin Lab
2955736814
chg: default project name won't use ``-deploy`` postfix.
6 years ago
Valentin Lab
2e9d1613fc
fix: dev: be sure to catch error.
6 years ago
Valentin Lab
1c639c9d55
new: basic but functional auto-summoning code.
6 years ago
Valentin Lab
f8ab2a87da
chg: dev: refactor out ``metadata`` reading for provide
We will need it when looking for charms provider.
6 years ago
Valentin Lab
197e1d9c80
fix: provide a sensible help when using ``run`` command without any services.
6 years ago
Valentin Lab
f046355186
new: ``!expand-vars`` tag for relations and options.
Will interpret any code like if it was in a shell here-doc string.
This will interpret basically ``$VAR`` and ``$()`` constructs.
6 years ago
Valentin Lab
04d50750f5
new: provide ``option-get`` with possible interpolation.
6 years ago
Valentin Lab
886b4d7388
fix: dev: ``relation-set`` supports merging of complex values.
6 years ago
Valentin Lab
e240392ec2
new: can interpret ``bash-stdout`` tags in relations options
6 years ago
Valentin Lab
90994d3b91
chg: dev: ``cached_cmd_on_base_image`` is now cached through sessions.
6 years ago
Valentin Lab
ee00ad7192
chg: dev: force YAML C ``libyaml`` bindings for python merging code
6 years ago
Valentin Lab
344977802e
new: ``compose up`` now includes ``--remove-orphans`` by default.
6 years ago
Valentin Lab
0ad11cc9cc
chg: dev: replace ``echo`` with ``printf`` !minor
6 years ago
Valentin Lab
d6e20577db
new: support of service names having dots (``.``) inside their name.
6 years ago
Valentin Lab
b26153644e
new: charm can now declare relations
A relation can be 'recommended', 'required', 'optional'. It can also auto-pair.
6 years ago
Valentin Lab
da2ffeb456
fix: relation data was forgotten/mixed due to a big cache bug
6 years ago
Valentin Lab
208aa1ad7f
new: dev: small refactor of ``file_get_hash`` !minor
6 years ago
Valentin Lab
4e8ed59228
chg: dev: refactor out ``get_service_relation_tech_dep``
6 years ago
Valentin Lab
79c3e5b48b
new: better help message with charm actions listed as commands
6 years ago
Valentin Lab
5c0317d240
new: dev: provide ``get_container_network_ips`` to charms
6 years ago
Valentin Lab
e37864afc3
new: dev: provide ``get_host_path`` to find host path of a local directory.
This is useful when preparing to launch a docker container from
a ``compose`` in docker command.
6 years ago
Valentin Lab
96362fabb2
fix: dev: don't hide unexpected errors when launching docker in ``wait_for_tcp_port``.
6 years ago
Valentin Lab
bfc068876c
fix: remove bogus bash warning when using actions.
6 years ago
Valentin Lab
b92c1e5d42
fix: do not silently pass errors when populating environment variable for running hooks.
6 years ago
Valentin Lab
9b822d0b3e
fix: docker base image was wrong in image building charms having more than one layer.
6 years ago
Valentin Lab
8cbaa5356b
fix: support of empty ``docker-compose`` struct in compose YAML
6 years ago
Valentin Lab
65a2714dc0
new: dev: minor tweaks to existing displayed feedbacks in networking code. !minor
6 years ago
Valentin Lab
5d3a3fde83
chg: database password file can now be stored in a different directory than host !api
``DB_PASSFILE`` is split into ``HOST_DB_PASSFILE`` and ``CLIENT_DB_PASSFILE`` to allow
to use a ``HOST_DB_PASSFILE`` in a directory that is accessible to ``compose`` even when
run in docker mode.
Using this, we can store HOST_DB_PASSFILE along with the database files,
which makes a lot more sense as it resolv issues of synchronising the
database with the content of this file (namely, the authorization
scheme). So when restoring the datastore of the database, the charm
scripts will be able to use the db password file and will not have to
worry about if it is in sync with the files or not.
Note that ``db_docker_opts`` and ``db_cmd_opts`` are now bash arrays. As
previous implementation was brittle, especially for handling spaces in
arguments.
6 years ago
Valentin Lab
66b9c9e57c
fix: dev: moved state's temporary files for database communication in ``$state_tmpdir``
They were in ``/tmp`` and this was far from ideal (conflict between
concurrent version, or other process much more likely).
6 years ago
Valentin Lab
7b16c07c7f
fix: avoid leaking stopped containers
6 years ago
Valentin Lab
5c64645648
fix: ``wait_for_tcp_port`` would not work as expected and always succeed.
``$DEFAULT_BASH_IMAGE`` would not be set (because not exported) and as consequence
the ``docker run`` would fail with an errorlevel different from 1. The failure
condition was bogus here, and we should not rely on ``$DEFAULT_BASH_IMAGE`` to be
exported. Both have been corrected.
6 years ago
Valentin Lab
e521d5fee9
new: store and keep compiled docker-compose and a mean to use-it for services.
The ``docker-compose.yml`` is saved along with an executable ``dc`` and
``.env`` in a directory to be shared as a volume in case we'd like to
launch a subservice in the same setup from a launched service. For instance,
a ``cron`` charm could want to launch ``run-once`` services.
The charm only need to access the ``dc`` binary, this can be done by
sharing the binary as a volume. This is the recommended way to do this:
``\${DOCKER_COMPOSE_PATH}/bin/dc:/bin/dc:ro``. Notice how we use a
docker-compose level variable here as the DOCKER_COMPOSE_PATH will only
be computed after all ``init`` hooks are done. This is the purpose of
the ``.env`` file that is also generated.
These directories are garbage collected if no containers have volumes
connected to it.
6 years ago
Valentin Lab
37d5c0a43d
new: ``compose`` is now to be used in a docker.
6 years ago
Valentin Lab
9f4cb01a36
chg: dev: minor comment addition, removal, and simplification. !minor
6 years ago
Valentin Lab
08f21ff10a
chg: dev: delete obsolete code !minor
6 years ago
Valentin Lab
9624f3b00f
fix: dev: should not need any direct connection from container to host
These variables should not be used.
6 years ago