Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Conversation

@laurentganne
Copy link
Contributor

@laurentganne laurentganne commented Aug 12, 2021

Pull Request description

Description of the change

Added new TOSCA component to be able to load a docker image from a tar archive, as described in GH-140
Misc.: fixed some installation issues

What I did

org/ystia/docker/images/types.yml:
Added a TOSCA compoent type org.ystia.docker.images.ArchiveLoader to load a docker image from a tar archive
Added as well a TOSCA component type org.ystia.docker.images.RuntimePathArchiveLoader to load a docker image from a tar archive whose path is only known at runtime.

org/ystia/docker/images/playbooks/create.yaml
org/ystia/docker/images/playbooks/load_archive.yaml
org/ystia/docker/images/playbooks/remove_image.yaml

Added implementations for these component interfaces

Misc - Fixed some installations issues:

org/ystia/docker/ansible/playbooks/create.yaml
Updated the repository url to support different versions

org/ystia/docker/containers/generic/playbooks/create.yaml
Fixed some pip installation issues

org/ystia/docker/containers/generic/playbooks/delete.yaml
org/ystia/docker/containers/generic/playbooks/start.yaml
org/ystia/docker/containers/generic/playbooks/stop.yaml
Fixed an issue where the fact that the container id can change at startup was not taken into account

org/ystia/experimental/consul/linux/ansible/playbooks/consul_install.yaml
Fixed a pip installation issue

How to verify it

Tested in LEXIS project, where a tar gz is stored in a Distributed Data Infrastructure.
This tar gz is downloaded from the Distributed Infrastructure on a Compute Instance, the path on the compute instance being computed at runtime.
A TOSCA component of type org.ystia.docker.images.RuntimePathArchiveLoaderis then used to load the docker image from this tar gz.

See corresponding topology template and component instantiation at https://github.com/lexis-project/application-templates/blob/v0.1.3/weather-climate/applications/adms/adms_template.yaml#L585-L600

Description for the changelog

Add a TOSCA component to load a docker image from a tar archive (GH-140)

Applicable Issues

Fixes #140

@laurentganne laurentganne self-assigned this Aug 12, 2021
@laurentganne laurentganne added the enhancement New feature or request label Aug 12, 2021
STARTED_CONTAINER_ID: { get_attribute: [SELF, started_container_id] }
AUTO_REMOVE: { get_property: [SELF, auto_remove] }
CLEANUP: { get_property: [SELF, cleanup] }
COMMAND: { get_property: [SELF, docker_run_cmd] }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably also deal with docker_run_args.
Note that the docker_container ansible module accept also a list of strings as a command...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a TOSCA component to load a docker image from a tar archive

3 participants