-
Notifications
You must be signed in to change notification settings - Fork 133
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] Enable k8s testing. #347
base: dev
Are you sure you want to change the base?
Conversation
We have a small problem here. It seems that kompose does not like the 2.1 docker-compose format. But I need to specify 2.1 in order to get the ENV vars, afaik. I have already started to convert everything to the compose 3 format, which is (as far as I have read) the preferred format now -> #333 I have compiled kubernetes/kompose#600 and it is converting my v3 files with a few warnings - what do you think? All or nothing and going with v3 or spend time with hacky ways to get v2 working? |
In #348 I ported the compose file to v3 and I'm at least able to convert it with kompose using this PR: kubernetes/kompose#600 However I get these warnings:
|
I think I got those warning too - for my kube setup it wouldn't mount the local directories and that made sense because the volumes were living on the VM running the Docker host and so it wouldn't even have access to them. But it would share them across the cluster correctly despite that warning - I think that is fine - local directories being shared out like that are good for local and development machines - but if you are going to use Kubernetes you need to setup some mounts and such ahead of time and that makes sense to me - at least for now. |
910a48d
to
d2118e1
Compare
@jmchilton maybe you deactivate some tests from the build matrix for the time being - this is hopefully faster. |
We have a real error message :) |
😄 I don't even know why I try @bgruening - you are so much better at this than me. I'll look into the cluster policy. |
I walking in the dark as you probably do :) |
I found this:
|
@jmchilton I think we made a huge step forward: https://travis-ci.org/bgruening/docker-galaxy-stable/builds/244074377
|
I think the following points are open:
|
Holy crap - amazing work @bgruening! I'll see if I can catch up. |
I guess the way the volumes are setup right now it is never going to work - I think we need to switch to global volumes definition for the compose file right? |
The fix from https://s3.amazonaws.com/archive.travis-ci.org/jobs/244040617/log.txt?X-Amz-Expires=30&X-Amz-Date=20170618T001716Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJRYRXRSVGNKPKO5A/20170618/us-east-1/s3/aws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=3b34525888d85476690aa8fe5db104fae4477574cf388b3b075f34964f430964 to the next commit seems to be the updatedb call - maybe I'm missing something though?
Three persistent volume defs seem to be needed - export, rabbitmq, and postgres. Also dropping the Docker host mounting stuff - I don't think that will fly in K8S (I can throw it back in later though if I'm wrong).
Seems to randomly fail - or is that just me?
If multiple services re-use the same global definition for a volume - they all generate the same file during conversion (not a problem per se) but during up they all attempt to create the PVC :(. Adding a script that works around this by manually creating all the service, deployments, PVCs... with kubectl create -f (post convert).
Feel free to replace this with something less hacky...
``` error: error validating "export-persistentvolumeclaim.yaml": error validating data: open /home/travis/.kube/schema/v0.0.0-master+a57c33bd28173/api/v1/schema.json: permission denied; if you choose to ignore these errors, turn validation off with --validate=false ```
I think rather then trying to implement we should just make all containers wait on their dependent containers - the way galaxy-web waits for the database for instance. Kompose doesn't support |
I have it running locally so I have few more open issues that would have taken forever to debug from Travis:
Update: |
This is a terrible hack - feel free to revert and work around it a different way.
Regarding your second point I found this: https://kubernetes.io/docs/concepts/configuration/overview/#container-images I think it is save to convert everything to |
|
||
docker build --build-arg ANSIBLE_REPO=$ANSIBLE_REPO --build-arg ANSIBLE_RELEASE=$ANSIBLE_RELEASE -t quay.io/bgruening/galaxy-base ./galaxy-base/ | ||
docker build --build-arg GALAXY_REPO=$GALAXY_REPO --build-arg GALAXY_RELEASE=$GALAXY_RELEASE -t quay.io/bgruening/galaxy-init ./galaxy-init/ | ||
: ${TAG_SUFFIX:=""} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with hard coding everything to dev, but this also seems to be fine.
Defaulting to dev probably makes sense to avoid that people who build this locally, without a special tag, will encounter the same problems.
An other idea is to use docker tag and tag these images with different tags, one master and one latest or dev but this is even more confusing I think.
I tried to tackle the env substitution problem. First I filled an issue at kubernetes/kompose#650 Than I tried to use some kind of pre-processor. At first I tried to use
usage: |
The env var handling might be fixed upstream. |
0bea5b2
to
3958d2a
Compare
This is taking forever but it will be wonderful when it works :).