Progress

From Imesh:

I have some good news. I was doing some experiments on this area with
jclouds docker API implemented by Anreas [1]. Yesterday I found few
problems in this pull request and fixed several issues, those fixes could
be found here. Andreas has accepted some of them and commented.

Today early morning I brought pr/57 together with the fixes I did into
master branch (under dependencies) and now we have a PoC level docker
support:

*I have done following:*

  • Forked pr/57 and applied fixes
  • Implemented Docker IaaS provider and Partition Validator
  • Updated cloud-controller.xml
  • Fixed some other problems in master branch which blocked testing this functionality.
  • Commit revision: d45ad99a4ea22ee65c6f657d34806f1d9134b827

Now with theses changes we could start docker containers from Stratos. I
know this overlaps with the work Pradeep was doing, sorry I couldn't
synchronize. I did this in my leisure time.

Outstanding tasks

*Things remaining for basic functionality work:*

  • IP address association
  • Currently DHCP works, containers get an IP address assigned automatically. This could be retrieved by Stratos via the docker API.
  • Payload passing to docker containers
  • I had a look at this and we could use docker Env variable in container create method call to pass payload parameter to containers. As I found this is the standard method docker is using to pass parameters.

Yes, Docker API supports payload passing via 'Env' parameter. Please refer to : https://docs.docker.com/reference/api/docker_remote_api_v1.13/#21-containers Create a Container section. - Nirmal

Current DockerIaas implementation uses default Jclouds TemplateOptions class. But in order to get all the available options in Docker Jclouds implementation, we should use DockerTemplateOptions class. By using it, we could easily pass user-metadata. - Nirmal

  • Imesh's local changes have been merged upstream, so they can probably be removed locally?

Tasks list with the person responsible can be found here

How to try out the implementation

  • Install Docker by referring https://docs.docker.com/installation/
  • Extract Stratos binary distribution (single JVM) to a local folder.
  • Update <stratos-home>/repository/conf/cloud-controller.xml file with following IaaS Provider:
<iaasProvider type="docker" name="Docker">
    <className>org.apache.stratos.cloud.controller.iaases.DockerIaas</className>
    <provider>docker</provider>
    <identity svns:secretAlias="cloud.controller.docker.identity">identity</identity>
    <credential svns:secretAlias="cloud.controller.docker.credential">credential</credential>
</iaasProvider>
  • Currently Docker does not use any authentication system, therefore identity and credential are not used in communicating with docker API via jclouds.

Considerations

  • How should security be implemented?
  • No labels