Valentin Lab
9f38ef9bb9
new: dev: debug messages on launcher
Using ``DEBUG=1`` on binary compose docker launcher prints
pretty-printed docker command launched as well as important
system variables.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
90b9545835
fix: non-root user could not launch compose
We want to propagate user's current ssh config
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
71574d4196
new: default value for ``{CONFIG,DATA}STORE`` are different for non-root user
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
ade2d7b1d9
new: timezone is fixed for containers
We prefer to create a file with the ``/etc/timezone`` information
in our own file directory to be shared read-only with containers.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
8248f9db1e
new: dev: make compose sourcable for eventual tests !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
7677c9e136
chg: dev: include color library and common element !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
8dfe137964
new: add ssh to docker image to support git ``host-resources`` on ssh.
6 years ago
Valentin Lab
8c756c562e
new: pkg: avoid spurious warnings from ``docker-compose run`` calls.
This helps charm direct actions to keep a tidy standard output, and allows
them to be used in scripts.
``docker-compose`` was updated to the latest version available (aka
``1.24.0``) and was patched to include what might have been forgotten
when implementing the ``COMPOSE_IGNORE_ORPHANS`` environment variable.
On ``compose`` side, we need to make sure to pass environment variables
that are to be used by ``docker-compose``.
PR: https://github.com/docker/compose/pull/7020
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
04c6042b3a
new: macosx compatibility
5 years ago
Valentin Lab
c9f8f2b3e4
fix: keep ``COMPOSE_DOCKER_IMAGE`` in subcalls.
5 years ago
Valentin Lab
3ff8b02d40
fix: correctly set compose ``-i`` options only when needed
5 years ago
Valentin Lab
7b16c07c7f
fix: avoid leaking stopped containers
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
Valentin Lab
654d6733ac
fix: dev: function should use ``return``, not ``exit``.
6 years ago
Valentin Lab
a03ae8ba51
new: bail out when failing to read compose file and be more explicit
6 years ago
Valentin Lab
0085403e54
fix: was not compatible with ``busybox`` version of ``readlink``.
This will be required in a docker container based on alpine for
instance.
6 years ago
Valentin Lab
4b4aa5215f
fix: remove warning about "static" network.
The declaration of this network is completely useless.
6 years ago
Valentin Lab
7a779015b0
fix: use a docker container to check for open tcp port
This will allow to dockerize compose in the future and makes
it more portable. Indeed, the containers are not always reachable
from the host.
6 years ago
Valentin Lab
0a1d885d2f
fix: improper failure if using an empty service definition in ``compose.yml``
An empty definition is useful if you need the service to be selected as a
default service when using ``compose up`` with no argument, and you don't
have anything to configure in the given service.
6 years ago
Valentin Lab
5a60c03ff9
chg: better error message and error catching upon YAML merging
6 years ago
Valentin Lab
ad2a6232fd
new: ``run-once`` service should not be linked as dependencies to proper ``service``.
This will prevent ``run-once`` service to be ran by ``compose up`` if linked as a
dependency to another service.
6 years ago
Valentin Lab
72930065d6
chg: dev: factorize and cache ``get_service_type``
6 years ago
Valentin Lab
c4e8a45183
chg: dev: change the comment place !minor
6 years ago
Valentin Lab
e9770aacea
new: export command line information so that hooks can use it
6 years ago
Valentin Lab
189dc1daf4
new: support for type of service ``run-once`` through hook ``dc-pre-run`` and removal of auto-populated ``up``.
6 years ago
Valentin Lab
cebda50840
chg: dev: always 2 newlines between 2 functions def !minor
6 years ago
Valentin Lab
47635f1b80
chg: dev: small improvement on catching errors and debugging info !minor
6 years ago
Valentin Lab
5e8c1246ba
chg: dev: trap should not be set up if only sourcing the file.
6 years ago
Valentin Lab
40b173b935
new: added ``--add-compose-content, -Y YAML`` for one-time ``compose.yml`` addition.
6 years ago
Valentin Lab
a024649a5f
new: ``compose config`` on validation success outputs the final docker-compose file on standard output instead of standard error.
6 years ago
Valentin Lab
376c915b10
new: added ``cached_wget`` utility function to compose intended for charms to use.
6 years ago
Valentin Lab
68b1c33987
chg: dev: added idea in TODO comment !minor
6 years ago
Valentin Lab
8cc7c16062
chg: dev: cosmetic !minor
6 years ago
Valentin Lab
b460f95bf8
new: allow compose to work without any ``compose.yml`` found.
As services will have by default charms of the same name, this allows to
launch "charms" (spawn a service of this charm) without defining any yaml.
6 years ago
Valentin Lab
317f033efd
chg: dev: explicitely include ``common``
6 years ago
Valentin Lab
de1087a025
fix: rogue doubling of arguments.
6 years ago
Valentin Lab
c79e55e38f
new: added a new ``pre_deploy`` hook for anything to do before launching docker-compose and after relations
6 years ago
Valentin Lab
364218dcdc
new: ``logs`` command has a ``--tail 10`` default parameter.
6 years ago
Valentin Lab
5289fba5d4
fix: dev: remove commented out code that is very obsolete !minor
6 years ago
Valentin Lab
26347c7383
new: added ``--rebuild-relations-to-service, -R SERVICE`` to force the rebuild of relations with target service.
6 years ago
Valentin Lab
5734efecf8
more big fat changes
6 years ago
Valentin Lab
0ae997d313
big fat changes (to separate)
6 years ago
Valentin Lab
fe9cfcb822
fix: ``down`` action is supported
We force ``--remove-orphans`` as it'll remove all the previous
dockers that have been launched in the same project. We don't
need to compute anything for this.
6 years ago
Valentin Lab
6895cac416
new: ``charm`` ressources should be read only
6 years ago
Valentin Lab
97d6535943
new: ``charm`` and ``service`` are cleanly separated concepts now
``charm`` is the general recipes. ``service`` is a practical
functionality that will (if not subordinated) spawn a docker container.
In your compose file, you define services that will apply some general
rules borrowed from ``charm``s. Different services can link to the same
charm.
6 years ago
Valentin Lab
bdcc563f9d
chg: unindent code for cosmetic reasons !minor
6 years ago
Valentin Lab
85561d3e19
new: adding function ``get_running_containers_for_service``.
6 years ago