Skip to content

Introduce new config format with volume support and versioning#2113

Closed
shin- wants to merge 19 commits into
docker:masterfrom
shin-:2110-volumes_config_support
Closed

Introduce new config format with volume support and versioning#2113
shin- wants to merge 19 commits into
docker:masterfrom
shin-:2110-volumes_config_support

Conversation

@shin-
Copy link
Copy Markdown

@shin- shin- commented Sep 30, 2015

This is a work in progress (volume support is not implemented) submitted early so we can start discussing the design approach and new schema.

Comment thread compose/config/config.py Outdated
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This doesn't need to be in a separate function. It's a dict lookup so can just be a line in pre_process_config function and then that way we're not doing validate_top_level_object twice.

@dnephin dnephin mentioned this pull request Oct 6, 2015
@michaeljs1990
Copy link
Copy Markdown

Sorry, just so i understand correctly... Docker compose is going to be switching to using json now instead of yaml files? Just want to get ready for this change since i'll be upgrading as soon as the new version comes out.

@dnephin
Copy link
Copy Markdown

dnephin commented Oct 6, 2015

@michaeljs1990 no we're not switching to json. We can use jsonschema with yaml configuration since they deserialize into the same python structure.

@michaeljs1990
Copy link
Copy Markdown

@dnephin thanks, sorry for the confusion.

@shin- shin- force-pushed the 2110-volumes_config_support branch from 6bf736b to 6e1c4a7 Compare October 7, 2015 01:38
@shin- shin- force-pushed the 2110-volumes_config_support branch 3 times, most recently from 607af35 to 2bdaabf Compare October 8, 2015 14:25
@dnephin dnephin added this to the 1.6.0 milestone Nov 2, 2015
shin- and others added 9 commits November 6, 2015 19:36
The validation module has been updated to detect automatically which
version is being used and switch schemas accordingly.

Signed-off-by: Joffrey F <joffrey@docker.com>
This change effectively discards the contents of the 'volumes' dictionary
if using a v2 config. This will be implemented separately.
The version is detected dynamically to support both legacy and v2 formats.

Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Rewrite some of the logic to better accomodate differing formats
now and in the future.

Signed-off-by: Joffrey F <joffrey@docker.com>
Reference service definition in the base field schema (v1) instead
of copying it over. Limit acceptable types for driver options in
volume definition.

Signed-off-by: Joffrey F <joffrey@docker.com>
To support the expanding config format, we now use a complex
`config.Config` object containing version, services, and volumes
information. project.Project updated accordingly and tests take
the new format into account.

Signed-off-by: Joffrey F <joffrey@docker.com>
Add Volume class that supports basic volume operations (creation,
removal, inspection). Project class sets up volume at the
beginning of Project.up()
Volume config is now properly passed down to Project class.

Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
shin- added 9 commits November 6, 2015 19:36
API 1.21 is required to support volume declaration.
Update tearDown method for integration tests to remove test volumes.

Signed-off-by: Joffrey F <joffrey@docker.com>
The volume format returned by the API has changed in recent version,
causing issues when trying to recreate containers with volumes attached.

Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Volumes were being inserted in the services list, causing issues at
runtime.
Also catch API error when volume driver is invalid.

Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
@shin- shin- force-pushed the 2110-volumes_config_support branch from 322f713 to 84a9f0e Compare November 6, 2015 19:02
Signed-off-by: Joffrey F <joffrey@docker.com>
@shin-
Copy link
Copy Markdown
Author

shin- commented Nov 19, 2015

Closing in favor of #2421 (because the code has undergone significant changes since, rewriting the PR had become easier than rebasing the changes).

@shin- shin- closed this Nov 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants