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

WIP: Docker support for keter #151

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

alexbiehl
Copy link

At work we don't have the fancy Kubernetes infrastructure but we do use containers. I like the simplicity of keter and I am interested in adding support for docker "pods".

This pull request adds another stanza to the config. pod. Instead of a bundle we can now put someappsname.pod.json without bundle in the incoming directory.

In case there is a bundle we can use any stanzas as before. In case of the pod.json case we are allowed to only use type pod.

stanzas:
    - type: pod
      web-container: 
           name: web
           host: "some.host.org"
           hosts: [...]
           ssl: false
           forward-env: ... 
           connection-time-bound: ... 

      containers: 
          - name: web 
          - image: some/image
          - links: 
              - database

          - name: database
          - image: some/database
          - repository: .... 
          - volumeMounts: 
              - mountPath: /var/db
              - name: databaseVolume

containers lists every container used in the pod. You have to assign an image and may optionally specify repository from where to pull the image.

The web-container field has the usual options from the webapp stanza except for a name field which indicates which is the root container, to which the requests are routed.

On start we pull all images and make sure the user didn't specify cycles in the 'links' fields. We start the containers in the right order. All containers join a docker network with the name <appname>_network. For volume mounts we create empty containers and deterministically assign names to them so stored data persists over docker restarts.

There is a new type RunningPod which has a list of MonitoredProcess which monitor the docker processes for the containers. From here on out it's almost the same as before modulo some new fields in various types.

The patch isn't done and isn't working yet. But I though I would post here to have some discussions. I wanted to know what you think first.

@creichert
Copy link
Collaborator

@alexbiehl This is really cool; i'm interested to see where it goes. Feel free to push as much as you want and ask any questions you have here.

Older Compilers needs `pure`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants