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

Getting Started with DEM (Deployment Environment Manager)

Number of views : 41488
Article Number : KB0017757
Published on : 2022-05-13
Last modified : 2022-05-13 19:23:11
Knowledge Base : IT Public Self Help

Important note: A new Container Managed Platform (CMP) service, is being built for campus-wide use. The DEM service will be replaced by this new service in the near future.

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 Mirantis Secure Registry (MSR) - 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 and hardware infrastructure.
  • The DEM production cluster consists of manager nodes and worker nodes, and a dedicated MSR node. Each node is a Linux virtual machine (VM).
  • The DEM cluster and applications are managed with the Mirantis Kubernetes Engine (MKE).
  • DEM is managed and supported by the Campus Solutions department of Information Technology Services (ITS).

How do you access DEM's user interfaces?

  • https://ucp.its.utexas.edu/ is the access URL for MKE.
  • https://dtr.its.utexas.edu/ is the access URL for MSR.
  • Anyone with a "high-assurance" EID, from UT Austin, can login to DEM's user interfaces. But only a user who has been given access to Kubernetes namespace(s) can do useful work.

 

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. Contact pype-internal@utlists.utexas.edu for assistance.

 

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-requests@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 MSR.
    • Get an MSR access token
      • In a Web browser, login to dtr.its.utexas.edu. Choose the SAML login, enter you EID and password. This may display the UCP user i/f, go to dtr.its.utexas.edu.
      • On left nav-bar, under your EID click "Account". On right-side pane, choose "Access Tokens" tab. Copy the token to your workstation
    • Open a command shell on your Docker workstation. Type the following commands:

      • docker login dtr.its.utexas.edu
        • Enter EID as user. Enter MSR access token as 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 MKE (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/v1
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