[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

New experimental feature: import application from Docker Compose



PR https://github.com/openshift/origin/pull/7690 introduces a new
command in 'oc' to convert a Docker Compose application to a
Kubernetes+OpenShift application (including build and deployment
pipelines, so you have a reproducible app).  This is currently
experimental, and we'd love to get feedback on bugs and features that
would be useful.

To import a compose file, run:

    oc import docker-compose -f <path_to_compose_file>

which will create OpenShift builds, deployments, and services to host
the application on OpenShift.

The following features should be enabled:

* Each service in the compose file is converted to its own deployment config
  * Containers that share volumes or the local network are colocated
in the same pod
  * Environment values are copied
* Each deployment config gets a Kubernetes service created that serves
the ports exposed by each compose service
* For each "build" directive, the local source is set up as a build
config from OpenShift if we can find an upstream remote
  * If there is no remote, you should have a binary build setup.
  * Local context directories should be respected when you have a
multi-service compose
* Resource constraints defined on each compose service are applied as
OpenShift requests or limits on the pods.

Any settings that are not supported will be listed as a warning - for
instance, some of the fine grained API options in the Docker API that
don't make any sense for when not on a particular host are set.

Instead of creating the items directly, you can output them as a
template for modification:

    oc import docker-compose -f <path_to_compose_file>
--as-template=mytemplate -o yaml

which will output to stdout a yaml template that you can tweak and then upload.

Please help us test this feature by trying it out - we're happy to
support additional scenarios but we know people do some crazy things
that we didn't think of. :)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]