Valentin Lab
6b7ed58346
fix: dev: [compose-core] minor improvement against unintended option to ``echo`` !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
cb1772f187
fix: [compose-core] make ``get_relation_data_dir()`` output correct directory even when run from a relation
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
29423ac3b6
new: [compose-core] make ``service:relation-file`` always return an existing file
It must create it with ``compose`` / ``default-options`` values by
default if not already created.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
a4d329e570
fix: [compose-core] ``$PROJECT_NAME`` was not available anymore in direct action
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
d486bf50bd
new: [compose-core] add relation and service traversal utilities
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
f4b0750429
fix: [compose-core] not ignore port and timeout arguments
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
c3020e1e6b
fix: invalid default value for ``constraint``
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
12e7d39c90
fix: make error in action NOT ignored as it was meant before
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
a882780b6d
fix: correct typo when using old version of docker !minor
This code is probably not so useful if using compose in docker.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
f2a12b1376
new: add ``--get-project-name`` option to query project name
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
9c71d5e2ee
new: [compose-core] provide ``get_healthy_container_ip_for_service`` and ``switch_to_relation_service`` to charms base library
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
65c6e3d641
chg: dev: prevent displaying debug info !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
a63cc709ab
new: [compose-core] make ``wait_for_tcp_port`` accept timeout as an optional third argument
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
f74cb3ced1
chg: add ``--no-pre-deploy`` to inhibit running ``pre-deploy`` hooks.
Please note also that ``--no-hooks`` will now also inhibut
``pre-deploy`` hooks.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
56db0aaf13
fix: [compose-core] make ``compose`` return action's errorlevel
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
a93dc7c1fa
new: redirect standard logs towards stderr if running an action
This allows direct actions to produce output that won't be messed
around by the logs.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
80f471c241
fix: allow direct action to receive ``stdin``
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
533ac14435
fix: remove unused code line !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
2b8c6dd178
fix: [compose-core] added a default ``COMPOSE_HTTP_TIMEOUT`` of 2 hours
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
3 years ago
Valentin Lab
7b2c1b73ac
new: [compose] provide ``$HOST_COMPOSE_YML_FILE`` location
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
4 years ago
Valentin Lab
34eb49ed51
chg: [compose] provide ``$HOST_COMPOSE_LAUNCHER_OPTS`` in environment
Indeed, without this, charms can't access the real content of the file.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
4 years ago
Valentin Lab
6ddb0bc120
chg: [compose-core] updated timeout for sql connection from 30s to 120s.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
4 years ago
Valentin Lab
eb159adf10
fix: [compose-core] ``dc`` usage was broken
This could cause charm using it to not launch.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
4 years ago
Valentin Lab
9f43a4cb87
new: dev: [compose-core] added ``service_base_image_id`` function for charms
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
4 years ago
Valentin Lab
b9dd681f88
new: [compose-core] added ``--no-post-deploy`` and prevented also ``post-deploy`` from running when using ``--no-hooks``
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
4 years ago
Valentin Lab
d055b7e699
fix: `tech-dep` could be mis-read and generate unwanted dependency loops
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
4 years ago
Valentin Lab
32aaf2e0ea
fix: dev: prevent duplication of network parameters
Previously, ``_set_db_params`` would be called several times and
parameters would then be concatenated. We didn't want
``_set_db_params`` to overwrite and start from scratch to let
possibility for customization before and after the call.
Here ``set_db_params`` will set a global variable to detect if it was
already launched prior to running content of ``_set_db_params``.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
4 years ago
Valentin Lab
79744ae283
fix: dev: filter running containers on the ``master-service`` tag
Actually other tag for subordinates are useless.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
4 years ago
Valentin Lab
e35be85381
fix: dev: [compose-core] invalid caching key in function ``get_service_relation``
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
4 years ago
Valentin Lab
15dad81fc4
new: [compose-core] include last version of ``kal-shlib-docker``
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
a5af721887
fix: [compose] incorrect indentation in debug message !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
7f82029aa6
new: [compose] use host's docker and ssh config on linux os
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
42afae776e
fix: some compose variables would incorrectly be shown as empty
These variable are valued after the displaying code.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
3fd2443061
fix: dev: protect some local variables !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
8c7cf28bf6
fix: ``compose`` command line arguments could be eaten
When rewriting arguments, any bash builtin's ``echo`` arguments
would be removed.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
5081b59402
fix: support BSD also for standard macosx compatibility
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
4f88bcfec8
fix: compatibility with bash v5
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
be8da58c52
new: dev: show loaded config files !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
cb3c784c66
fix: support running in directory having name containing uppercase
The direct parent could be used to make the default project name,
and uppercase are not supported for container names.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
64ffcf466b
new: add ``SHOW_ENV`` and ``SHOW_CONFIG_LOCATIONS``
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
621a93706b
chg: dev: clean color definition !minor
Removing obsolete/unused color variables
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
656069c59a
chg: remove requirement on ``sha256sum``
Also provide and use a ``hash_get`` function that will choose in the
available binary program. It supports ``sha512sum``, ``md5sum`` (GNU
version) and ``md5`` (BSD version).
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
59cb64ff92
fix: in WSL, make compose file accessible
We need to copy compose file in a docker host accessible
directory.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
6c3ab38bb6
fix: dev: factorize some literals in a variable !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
796e60af8c
fix: config files list is specific by os
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
cd7d069af9
fix: override for inner compose
We keep the bin override by sending it through the new session variables.
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
7c8b0d7ac4
chg: dev: store env vars in session file
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
1e4e1e047f
fix: remove docker and ssh auth config
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
31872d0562
fix: include WSL support
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago
Valentin Lab
a907a61585
fix: dev: shellcheck good advices refactor !minor
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
5 years ago