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

Kubernetes Deployment via CLI #31

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@nheidloff
Member

nheidloff commented Jun 28, 2018

Added two files to deploy the model as well as the web application to Kubernetes.

If accepted, you could extend README.md with these commands:

kubectl apply -f kube-model.yaml

docker build -t nheidloff/caption-generator-web . // change Docker account
docker push nheidloff/caption-generator-web // change Docker account

kubectl apply -f kube-web.yaml // change Docker account in kube-web.yaml

@stevemart

This comment has been minimized.

Member

stevemart commented Jun 28, 2018

@nheidloff can you update the README, too? you can add a new section "Deploy to Kubernetes" just before the "Run Locally" section https://github.com/IBM/MAX-Image-Caption-Generator-Web-App#run-locally

@ajbozarth

This comment has been minimized.

Member

ajbozarth commented Jun 28, 2018

This looks nice, I'll take a look later today

@ajbozarth

This comment has been minimized.

Member

ajbozarth commented Jun 28, 2018

Also @djalova should take a look as well when you have a moment

@ajbozarth

This comment has been minimized.

Member

ajbozarth commented Jun 28, 2018

@nheidloff I haven't tested this yet, but have been reading your configs and steps and am wondering if rather than doing the build/push would it be better for a copy of the web app to be available on docker hub like the model? or both?

@ajbozarth

This comment has been minimized.

Member

ajbozarth commented Jun 28, 2018

Also kube-model.yml seem to duplicate a lot of https://github.com/IBM/MAX-Image-Caption-Generator/blob/master/image-caption-generator.yaml

  1. Would it be possible to just use that?
  2. I think we should match the naming conventions of and in these files to that as well
@djalova

This comment has been minimized.

Collaborator

djalova commented Jun 28, 2018

Yeah I agree with @ajbozarth points above. We should look into making the web app available on DockerHub. Also we should consolidate the 2 versions of the image caption generated yaml files.

@ajbozarth

This comment has been minimized.

Member

ajbozarth commented Jun 28, 2018

On the note of consolidation: the Image Caption Generator model is the "test" model for kube, so that yawl file should be updated based on feedback as needed

@@ -0,0 +1,33 @@
apiVersion: extensions/v1beta1

This comment has been minimized.

@ajbozarth

ajbozarth Jun 29, 2018

Member

Out of curiosity, why is this not just v1? I'm inexperienced with Kubernetes.

@ajbozarth

This comment has been minimized.

Member

ajbozarth commented Jun 29, 2018

So after much trashing to get kube working locally I managed to get this running. Specifically I used the yaml file in the model repos to for the model this used cube-web.ymal (I edited the names to match) to start the web app and voila I could access the app at localhost:8088

I think putting a copy of the web app on the coda it docker hub would be better than making the user build and upload it themselves. It would also shorted this to two steps: kubectl apply for each repo.

@nheidloff If you could update the web ymal file to match the naming conventions in the model repo and update the README with the correct instructions. If you don't have time I can also take over the PR myself and make the changes. I'll also ask my team how we can push this to the codait docker.

@nheidloff

This comment has been minimized.

Member

nheidloff commented Jun 29, 2018

I didn't know about the existing yaml for the model. Yes, that one should be used.

The beta1 should be removed from the API version. I copied from an older sample.

Yes, would be good to also post the web app on Dockerhub, but document how people can do this themselves for their own web apps. Would also be good to document how to use the IBM container registry instead.

You also might want to change the "deploy" button to use a Kubernetes pipeline. Would make it easier since people wouldn't have to copy and paste the endpoint (but only works if people have Kubernetes cluster, right?)

@ajbozarth would be great if you could take over. thanks a lot!

@@ -0,0 +1,32 @@
apiVersion: extensions/v1beta1

This comment has been minimized.

@lresende

lresende Jun 29, 2018

Contributor

Do we want to have this duplicated here? It's already available at image-caption-generator repository

This comment has been minimized.

@ajbozarth

ajbozarth Jun 29, 2018

Member

Addressed in my followup

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: caption-generator-web-deployment

This comment has been minimized.

@lresende

lresende Jun 29, 2018

Contributor

How about using image-caption-generator-xxx where xxx can be webapp or web-deployment

This comment has been minimized.

@ajbozarth

ajbozarth Jun 29, 2018

Member

Addressed in my followup

spec:
containers:
- name: caption-generator-web
image: nheidloff/caption-generator-web:latest

This comment has been minimized.

@lresende

lresende Jun 29, 2018

Contributor

we are publishing all images to the docker hub MAX organization. I will add the webapp to the org as well.

This comment has been minimized.

@ajbozarth

ajbozarth Jun 29, 2018

Member

That would be helpful, I changed it on that assumption in my followup

@lresende

This comment has been minimized.

Contributor

lresende commented Jun 29, 2018

@nheidloff Good to see you around.... it has been a while.

@ajbozarth

This comment has been minimized.

Member

ajbozarth commented Jun 29, 2018

I've open #32 to continue @nheidloff work. Closing this in favor of that

@ajbozarth ajbozarth closed this Jun 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment