Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-11327

Create the squash-bokeh microservice

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Create a microservice with two containers one for the bokeh server and another one for nginx. Automate the deployment on kubernetes. Make it work locally on minikube and on GKE.

        Attachments

          Issue Links

            Activity

            Hide
            afausti Angelo Fausti added a comment - - edited

            Attached diagram for the squash-bokeh microservice. See Dockerfile for the bokeh server and the deployment-template.yaml

            One thing to note regarding the bokeh server is that we need the service host and port in this command line

            bokeh serve --use-xheaders --allow-websocket-origin=$SQUASH_BOKEH_SERVICE_HOST:$SQUASH_BOKEH_SERVICE_PORT app/AMx
            

            but this information is available only after the kubernetes service is created, that's why we create the kubernetes service first, pass the host and port as environment variables to the bokeh container and only then create the deployment.

            Show
            afausti Angelo Fausti added a comment - - edited Attached diagram for the squash-bokeh microservice. See Dockerfile for the bokeh server and the deployment-template.yaml One thing to note regarding the bokeh server is that we need the service host and port in this command line bokeh serve --use-xheaders --allow-websocket-origin=$SQUASH_BOKEH_SERVICE_HOST:$SQUASH_BOKEH_SERVICE_PORT app /AMx but this information is available only after the kubernetes service is created, that's why we create the kubernetes service first, pass the host and port as environment variables to the bokeh container and only then create the deployment.
            Hide
            afausti Angelo Fausti added a comment - - edited

            Automated deployment see Makefile and a description in the README.md

            Example of output for the TAG=latest make deployment command:

            Creating secret...
            kubectl delete --ignore-not-found=true secrets tls-certs
            secret "tls-certs" deleted
            kubectl create secret generic tls-certs --from-file=/tmp/key.pem --from-file=/tmp/cert.pem
            secret "tls-certs" created
            Creating config map for nginx configuration...
            kubectl delete --ignore-not-found=true configmap nginx-conf
            configmap "nginx-conf" deleted
            kubectl create configmap nginx-conf --from-file=kubernetes/nginx/nginx.conf
            configmap "nginx-conf" created
            Creating service...
            kubectl delete --ignore-not-found=true services squash-bokeh
            service "squash-bokeh" deleted
            kubectl create -f kubernetes/service.yaml
            service "squash-bokeh" created
            Creating deployment...
            Waiting for the service to become available...
            Waiting for the service to become available...
            Waiting for the service to become available...
            Waiting for the service to become available...
            Waiting for the service to become available...
            Waiting for the service to become available...
            Service address: 35.185.247.24:443
            kubectl delete --ignore-not-found=true deployment squash-bokeh
            deployment "squash-bokeh" deleted
            kubectl create -f kubernetes/deployment.yaml
            deployment "squash-bokeh" created
            

            Show
            afausti Angelo Fausti added a comment - - edited Automated deployment see Makefile and a description in the README.md Example of output for the TAG=latest make deployment command: Creating secret... kubectl delete --ignore-not-found=true secrets tls-certs secret "tls-certs" deleted kubectl create secret generic tls-certs --from-file=/tmp/key.pem --from-file=/tmp/cert.pem secret "tls-certs" created Creating config map for nginx configuration... kubectl delete --ignore-not-found=true configmap nginx-conf configmap "nginx-conf" deleted kubectl create configmap nginx-conf --from-file=kubernetes/nginx/nginx.conf configmap "nginx-conf" created Creating service... kubectl delete --ignore-not-found=true services squash-bokeh service "squash-bokeh" deleted kubectl create -f kubernetes/service.yaml service "squash-bokeh" created Creating deployment... Waiting for the service to become available... Waiting for the service to become available... Waiting for the service to become available... Waiting for the service to become available... Waiting for the service to become available... Waiting for the service to become available... Service address: 35.185.247.24:443 kubectl delete --ignore-not-found=true deployment squash-bokeh deployment "squash-bokeh" deleted kubectl create -f kubernetes/deployment.yaml deployment "squash-bokeh" created
            Hide
            afausti Angelo Fausti added a comment -

            Added instructions for rolling updates and for scaling the microservice on GKE.

            Show
            afausti Angelo Fausti added a comment - Added instructions for rolling updates and for scaling the microservice on GKE.
            Hide
            afausti Angelo Fausti added a comment -

            OAuth will be added in a separate ticket.

            Show
            afausti Angelo Fausti added a comment - OAuth will be added in a separate ticket.
            Show
            afausti Angelo Fausti added a comment - See PR https://github.com/lsst-sqre/squash-bokeh/pull/1

              People

              Assignee:
              afausti Angelo Fausti
              Reporter:
              afausti Angelo Fausti
              Reviewers:
              Adam Thornton, Jonathan Sick, Joshua Hoblitt
              Watchers:
              Adam Thornton, Angelo Fausti, Frossie Economou, Joshua Hoblitt
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.