Skip to main content
Version: 4.5

CaaS: A Step-by-Step Guide

getting-started

This comprehensive guide provides step-by-step instructions for deploying a pre-built container image using Container-As-A-Service (CaaS).

Getting Started

Step 1: Register Your Application

  1. Go to Enterprise Service Portal within ServiceNow.
  2. Click Service Catalog.
  3. Search for "Application Registration".
  4. Fill in the details and click Submit.
  5. You will receive an email confirmation with a three-letter app code.

Step 2: Onboard Your Application

  1. Navigate to NetApp ServiceNow DevOps.
  2. Click On-Board Application in CloudOne DevOps to begin the onboarding process.

This kicks off a series of automation steps, typically taking 40-45 minutes, after which you will receive an email with links to:

  • Azure DevOps Project
  • SelfAssist Portal
  • Rancher environment
  • NEAT, JFrog Artifactory, and StorageGrid

Application Configuration

Step 3: Ordering Your App Stack

  1. Go to Manage CloudOne DevOps Application.
  2. Search for your three-letter APP CODE.
  3. Order the following Services -
    1. Pipelines: CaaS
    2. Hostspaces: Order one Hostspace (choose an appropriate T-Shirt Size)

Step 4: Setting Up Your Development Environment

  1. Go to Azure DevOps Org and choose your project
  2. Navigate to Repos/Files/.
    • Select caas-caasdemo from the drop-down.
    • Create a feature branch and clone the repo locally.

Step 5: Preparing for Deployment

Setting Up DB (This step is optional if you're using a database provisioned via SCALE)

  1. Create your connection string using the database credentials available in the Rancher UI
  2. Securely manage connection string, username and password as variables within Azure DevOps Variable Groups (Check Self Assist Documentation for more details)
  3. Update azure-pipelines.yml and values.hostspace.yaml files to reference the envioronment variables
azure-pipelines.yml
   variableGroups:
- db_vars
secretVarKeys:
- dburl
- uname
- pass
values.hostspace.yaml
   env_vars:
- name: "primary"
configs:
MYSQL_URL: "$dburl"
MYSQL_USER: "$uname"
MYSQL_PASS: "$pass"
  1. Update application source code to reference above envirornment variables
application-mysql.properties
   spring.datasource.url=${MYSQL_URL}
spring.datasource.username=${MYSQL_USER}
spring.datasource.password=${MYSQL_PASS}

Adjust Liveness and readiness probes

Update values.yaml Liveness and readiness probes to ensure proper delay is allocated for the application to come up

livenessProbe:
failureThreshold: 3
httpGet:
path: /
port: 8080
scheme: HTTP
initialDelaySeconds: 90
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1

readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: 8080
scheme: HTTP
initialDelaySeconds: 90
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1

Upload container image to JFrog Artifactory

  1. Build your image with latest changes.
  2. Tag and Push the docker image to docker-hts.repo-hio.cloudone.netapp.com
   docker build --platform linux/amd64 -t petclinic-app-v0 .
docker images | grep petclinic-app-v0
docker tag <image_ID> docker-hts.repo-hio.cloudone.netapp.com/upload/caasdemo:0.0.1
docker push docker-hts.repo-hio.cloudone.netapp.com/upload/caasdemo:0.0.1

Finalizing Deployment

Step 6: Deploying to Hostspace

  1. Modify azure-pipelines.yml to comment out the workspace section and enable the hostspace section.
    acceptanceSpace: hts-caashost-dnt
spaces:
# workspace:
# helm:
# overrideFiles: hts-caasdemo/values.workspace.yaml
hts-caashost-dnt:
variableGroups:
- mariadb_vars
secretVarKeys:
- dburl
- uname
- pass
helm:
overrideFiles: |
hts-caasdemo/values.hostspace.yaml
  1. Commit the changes and push to remote.
  2. Run the pipeline and verify that the application is accessible via the kong ingress URL.

Step 7: Custom Domain Setup

  1. Register a custom domain
    1. Navigate to NetApp ServiceNow DevOps.
    2. Click Manage CloudOne DevOps Application.
    3. Search for your three-letter APP CODE.
    4. Click DNS as a Service and enter your preferred domain name to get the DNS Record created
  2. Update values.hostspace.yaml with your custom domain.
   ingressEndpoints:
- host: caasdemoapp.netapp.com
  1. Commit your changes and push to remote.
  2. Run the pipeline and verify that the application is accessible via the custom URL.

Need Assistance?

If you encounter any issues or require support, don't hesitate to reach out to one of the SCALE team members. We're here to help!