This site requires JavaScript to be enabled
Welcome|
Recent searches
IE BUMPER

Getting Started with DEM (Deployment Environment Manager)

Number of views : 2
Article Number : KB0017757
Published on : 2019-09-23
Last modified : 2019-09-23 15:24:28
Knowledge Base : IT Public Self Help

What is DEM?

  • DEM is a managed Docker container service, available (at no extra charge) to any CSU (College/School/Unit) at UT Austin.
  • DEM includes the Docker Trusted Registry (DTR) - a repository for Docker images that can be deployed in the container service.
  • DEM is a multi-tenant service - all containerized applications share the underlying software platform (Docker EE) and hardware infrastructure.
  • The DEM production cluster consists of manager nodes and worker nodes, and a dedicated DTR node. Each node is a Linux virtual machine (VM).
  • The DEM cluster is managed with Docker's Universal Control Plane (UCP). The underlying orchestration software is Kubernetes.
  • DEM is managed and supported by Information Technology Services (ITS).

How do you access DEM's user interfaces?

 

How do I migrate my PyPE application to DEM?

The PyPE 2 project has developed a separate set of tools for PyPE application migration and/or deployment. While PyPE 2 is hosted on DEM, the rest of this article is not relevant to PyPE applications.

 

How do I develop an application for the DEM platform?

  • Develop an Internet-accessible application (typically with an HTTP interface) using any common software language e.g. Java, PHP, Python, Perl, Ruby....
  • Incorporate the application into a Docker image. You can install Docker CE (Community Edition) on your personal workstation, for local development. If you are new to Docker, there are a huge number of tutorials and documents on the Web, including the official Docker documentation.
  • Test your application on your personal workstation, by running your image as a container in Docker CE.

 

  • Contact the DEM team at dem-team@utlists.utexas.edu.
    • Give us the name/acronym of your CSU (e.g. "msb" for McCombs School of Business). We will create a new "namespace", if it doesn't already exist.
    • Give us the name/acronym of your development team within the CSU e.g. "mca" for Middleware and Common Apps team. Also give us the EIDs of the people that should be part of the team.

 

  • When the DEM team informs you that your namespace is ready, you can "push" your image to DTR.
    • Open a command shell on your Docker workstation.
    • docker login dtr.its.utexas.edu       -- will prompt for user (EID) and password.
    • docker tag <image name>:<tag> dtr.its.utexas.edu/<your namespace>/<image name>:<tag>
    • docker push dtr.its.utexas.edu/<your namespace>/<image name>:<tag>

 

  • The DEM team will also provide you with a node-port for your Kubernetes namespace. This is the TCP port number on any DEM worker node, where Kubernetes will accept an incoming call to your app, and route it to the node and port where your app is actually listening.

 

  • To deploy and run your image from DTR to a DEM worker node(s), you will need a Kubernetes deployment manifest file written in YAML. The Appendix section below, provides a simple sample file (k8s-dem-sample.yml), that you can edit and use for development and test (not production).
    • Login to DEM's UCP app (URL above). In the left nav-bar, click on your user name (EID) > My Profile > Client Bundles. Generate a Client Bundle and download it to your workstation. Unzip it.
    • Open another command shell on your Docker workstation. Invoke the appropriate client bundle script for your Operating System e.g. env.cmd (MS Windows) or env.sh (Mac OS).
    • kubectl apply -f k8s-dem-sample.yml        --- deploys and runs your app

 

  • Your app should be accessible at https://code-p0n.its.utexas.edu:<node-port>/        --- where code-p0n is any of the DEM worker nodes listed near the bottom of your Kubernetes deployment file.

 

Appendix - Kubernetes deployment manifest (k8s-dem-sample.yml)

# Kubernetes deployment manifest for the your-app application
# Usage: kubectl apply -f <this file's pathname>

apiVersion: apps/v1
kind: Deployment
metadata:
   namespace: your-namespace
   name: your-app-deployment
   labels:
     app: your-app
spec:
   replicas: 2
   selector:
     matchLabels:
       app: your-app
   template:
     metadata:
       labels:
         app: your-app
     spec:
       containers:
         - name: your-app
           image: dtr.its.utexas.edu/your-namespace/your-app:tag
---

apiVersion: v1
kind: Service
metadata:
   namespace: your-namespace
   name: your-app-service
spec:
   selector:
     app: your-app
   ports:
   - protocol: TCP
     port: 80
     targetPort: 8080
     name: http

---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  namespace: your-namespace
  name: your-app-ingress
  annotations:
    kubernetes.io/ingress.class: traefik
spec:
  rules:

     # A "host" can be any DEM worker node: code-p04, p06 - p11.its.utexas.edu
    - host: code-p07.its.utexas.edu
      http:
        paths:
          - path: /
            backend:
              serviceName: your-app-service
              servicePort: http

    - host: code-p08.its.utexas.edu
      http:
        paths:
          - path: /
            backend:
              serviceName: your-app-service
              servicePort: http

Thank You! Your feedback has been submitted.

Feedback