Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a docker image loader TOSCA component #148

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from

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
org/ystia/docker/images/playbooks/create.yaml Show resolved Hide resolved
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 join this conversation on GitHub. Already have an account? Sign in to comment
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
2 participants