No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md

README.md

CDP-OSS Setup Guide

CDP is an integration of multiple previously existing open-source products and tools, combined with newly developed tools, to provide:

  • The ability to rapidly generate a new microService using templates
  • Standardized software development kits (SDK's) for specific languages and capabilities, including:
    • Spring Boot for JAX-RS-based RESTful services
    • Camunda for modeled workflows
  • Standard runtime management (Kubernetes) technologies for running the microServices
  • Build coordination and automation
  • A Kubernetes-based runtime for managing deployments of these Microservices
  • The tools and utilities needed to setup the Kubernetes-based runtime on Amazon and OpenStack
  • Runtime integration with monitoring and logging operational systems
  • Intra/inter-cluster discovery, routing, and failover

Overview of Applications

  • CDP-PAF —Models, provisions, and manages application environments over their lifetime in an AWS environment.
  • Eco — Automates the generation and deployment of new microServices based on defined seeds/templates.
  • GRM-Edge —Listens to clusters' Kubernetes API server and creates a ServiceEndPoint cache from it
  • AAF-Edge — Responsible for the authentication and authorization of users running kubernetes API calls through kubectl. It provides endpoints for authentication and authorization, as well as an encryption tool to generate tokens and securely mask passwords

Prerequisites

Application Setup Guides

CDP-PAF

Overview

CDP-PAF (Provider Abstraction Framework) is a complete infrastructure implementation that models, provisions, and manages application environments over their lifetime in an AWS environment.

Environment Setup

  • Install and configure Maven
  • Clone the PAF repository from https://github.com/att/CDP-PAF
  • Build each subproject by navigating to its directory and running mvn clean package. Build the subprojects in the following order:
    • CDP-pal
    • Cdp-pal-common
    • Cdp-pal-openstack
    • Cdp-pal-aws
    • Cdp-parent
    • Cdp-all (will build remaining subprojects)
  • Create a local Cassandra database by running CDP.cql. CDP.cql is located in CDP/cdp-db/etc
  • Run \bin\cassandra.bat to start Cassandra
  • Run \bin\cassandra-cli.bat to connect the Cassandra client to the server

Run Configurations

Main Class

Cdp-server/org.eclipse.jetty.xml.XmlConfiguration

Arguments

  • -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
  • -Dorg.apache.commons.logging.simplelog.showdatetime=true
  • -Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG
  • -Dorg.apache.commons.logging.simplelog.log.org.apache.http.wire=ERROR
  • -DAFT_DME2_CLIENT_IGNORE_SSL_CONFIG=true

Property and Configuration Files

  • cdp.properties

Instructions

  • Edit the dummy and empty values in the property and configuration files

Eco

Overview

The Eco tool is an easy-to-use, self-service automation process to generate a new microService based on defined seeds/templates. Users can use the Eco tool from beginning to end of the microservice deployment lifecycle beginning with scaffolding the mS project and deploying it on Kubernetes through the Jenkins pipeline.

Eco is composed of three sub-applications: CatalogAPI, Deploymentpipeline, and UI.

CatalogAPI Environment Setup

  • Clone the CatalogAPI repository from https://github.com/att/CatalogAPI
  • Install and configure mysql. Create the database schema by running Catalogapi_tables_Schema.sql
  • Navigate to the CatalogAPI repository in a terminal and run mvn install. The settings.xml file is included in the repository

CatalogAPI Run Configurations

Main Class

com.att.ajsc.catalogapi.Application

Arguments

None

Property and Configuration Files

  • src/main/resources/system.properties
  • src/main/resources/application.properties
  • src/main/resources/cadi.properties
  • etc/cadi.properties
  • src/main/resources/META-INF/persistsence.xml

Instructions

  • Generate a keyfile and use it to replace the dummy file in etc/aafkeystore
  • Complete the property and configuration files. Fields are preset with default values, localhost addresses, or the dummy text "changeme"
    • Some fields can only be set after configuring Deploymentpipeline

Deploymentpipeline Environment Setup

  • Clone the Deploymentpipeline repository from https://github.com/att/deploymentpipeline
  • Install and configure MariaDB. Create the database schema by running pipelineschema.sql.
  • Navigate to the Deploymentpipeline repository in a terminal and run mvn install. The settings.xml file is included in the repository

Deploymentpipeline Run Configurations

Main Class

com.att.cicdpipeline.deploymentpipeline.Application

Arguments

  • -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true
  • -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true

Property and Configuration Files

  • src/main/resources/system.properties
  • src/main/resources/application.properties
  • src/main/resources/cadi.properties
  • etc/cadi.properties

Instructions

  • Generate a new keyfile and use it to replace the dummy file in etc/aafkeystore.
  • Complete the property and configuration files. Fields are preset with default values, localhost addresses, or the dummy text "replaceme"
    • Some fields can only be set after configuring UI
  • Create a Camunda account
    • User a browser to access the root directory. E.g. http://localhost:8888/
    • Register a new account with username "demo" and password "password
    • Enter any name and email account to complete the registration
    • A new account must be created every time the database is reset

UI Environment Setup

  • Configure a WAMP server using the database used for CatalogAPI and Deploymentpipeline
  • Clone the UI repository from https://github.com/att/Eco-UI

UI Run Configurations

Property and Configuration Files

  • application/config/local/config.php
  • application/config/database.php
  • application/controllers/services.php
  • application/libraries/camunda/onboardingservice.php

Instructions

  • Complete the property and configuration files. Fields are preset with the dummy value "replaceme"

GRM-Edge

Overview

GRM-Edge listens to a cluster's Kubernetes API server and creates a ServiceEndPoint cache from it. If there is connectivity to GRM, GRM-Edge posts and returns endpoints to and from GRM. Otherwise, it will serve only from its cache. Applications can query GRM-Edge for service endpoints by sending a FindRunningServiceEndPointRequest to :/GRMLWPService/v1/serviceEndPoint/findRunning.

Environment Setup

  • Clone the GRM-Edge repository from https://github.com/att/GRM-Edge
  • Install and configure Cassandra. Create the database schema by running service_topology_schema.cql
  • Navigate to the GRM-Edge repository in a terminal and run mvn clean install
  • Navigate to CassandraConfiguration, specify credentials, and test the connectivity

Run Configurations

Main Class

Application.java

Arguments

None

Property and Configuration Files

  • src/main/kubernetes/grmedgeprops.properties
  • src/test/java/…/service/CheckCassandraUtil.java

Instructions

  • Complete the property and configuration files.

AAF-Edge

Overview

AAF-Edge is responsible for the authentication and authorization of users running kubernetes API calls through kubectl. It provides endpoints for authentication and authorization, as well as an encryption tool to generate tokens and securely mask passwords.

Environment Setup

Run Configurations

Main Class

com.att.ocnpmgmt.aaf_edge.Application

Arguments

None

Property and Configuration Files

  • Cadi.properties

Instructions

  • Generate new keyfile and keystore.jks files
  • Complete the property and configuration files

Deployment Guide

Docker

  • Install and configure Docker in a Linux environment
  • Create a Docker repository in Docker Central for each project
  • Navigate to the project directory of each application in a terminal and run mvn clean package docker:build
    • Specify the provided settings.xml file if provided using the –s flag
  • Run docker tag [Image ID] [repository name]
    • The Image ID can be found by running docker images
  • Push the image to the project's Docker repository
    • docker login
    • docker push [repository name]

Kubernetes

  • Configure the .yml and .yaml files found in the k8s or kubernetes folder with the Docker image and Kubernetes namespace for each project.
  • Download the .yml and .yaml files to the web service where the projects are being deployed
  • In the Kubernetes cluster, run kubectl create –f [.yml or .yaml file name] for each .yml and .yaml file
    • Start with any configmap files
    • Create service files only after replication controllers have been created and pods are running

Application Testing Guides

CDP-PAF

  • Check the port of CDP-PAF
    • If running locally, the port is 8080
  • Create a basic authentication header from an AAF credential. Include it with all proceeding CDP-PAF API calls
  • Make a POST request to http://<ip-address>:<port>/api/v1/tenants/
    • Expected Result: 200

Eco

If testing locally:

  • CatalogAPI runs on port 8080
  • Deploymentpipeline runs on port 8888
  • UI runs on the standard HTTP port

If testing Eco deployed on k8s:

  • CatalogAPI runs on port 30010
  • Deploymentpipeline runs on port 31000
  • UI runs on port 30100

Test CatalogAPI

  • Create a seed template
  • Create a basic authentication header from an AAF credential. Include it with all proceeding CatalogAPI calls
  • Make a POST request to http://<ip-address>:<port>/store/catalogs with body
{

        "name":"test01",

        "owner":"<aafusername>",

        "id":"1",

        "description":"A catalog for testing",

        "repositorypath":"<gitpathtoseed'srepository>"

}
  • Make a GET request to http://<ip-address>:<port>/store/catalogs
    • Expected result: the previously created catalog
  • Wait 24 hours for cron jobs to run
  • Make a GET request to http://<ip-address>:<port>/store/seeds
    • Expected result: metadata of the seed created in step 1
  • Clean up the database
    • Make a DELETE request to http://<ip-address>:<port>/store/catalogs/1
    • In the next 24 hours, the seed will be deleted by a cron job

Test Deploymentpipeline

  • Open http://<ip-address>:<port> in a browser
    • Expected result: a redirection to a Camunda page
  • If not done previously, register a new Camunda user with username "demo" and password "password"

Test UI

  • Open http://<ip-address>:<port>/uui in a browser
  • Click on "Login" in the top right
  • Click "Register a new user"
  • Fill out the form and click "submit"
    • Expected result: enter the application

Test Integration

  • Using the UI, register a new teamspace
  • Under Administration, select My Nurseries
  • Create a new nursery using the seed template repository created when testing CatalogAPI
  • Wait 24 hours for cron jobs to run
  • Navigate to the seeds page
  • Generate the seed
  • Wait to receive a confirmation email from CatalogAPI
  • Navigate to the Pipeline page
    • If a pipeline has been created, all three applications are connected

GRM-Edge

  • Deploy GRM-Edge on Kubernetes
  • Update the values in src/main/docker-compose/docker-compose.yml
  • Run docker-compose up
  • Deploy a sample image. An example .yml file for this purpose is shown below:
apiVersion: v1

kind: Service

metadata:

  name: nginix

  namespace: com-att-ocnp-mgmt

  labels:

    app: nginix

    routeoffer: DEFAULT

    version: 1.0.0

spec:

  ports:

    - name: http

      port: 80

      protocol: TCP

  selector:

    app: nginx

    routeoffer: DEFAULT

    version: 1.0.0

  type: NodePort

----

apiVersion: v1

kind: ReplicationController

metadata:

  name: nginx

  namespace: com-att-ocnp-mgmt

spec:

  replicas: 1

  selector:

    app: nginx

    routeoffer: DEFAULT

    version: 1.0.0

  template:

    metadata:

      annotations:

      labels:

        app: nginx

        version: 1.0.0

        routeoffer: DEFAULT

    spec:

      containers:

      - name: nginx

        image: nginx:1.7.9

        imagePullPolicy: IfNotPresent

        ports:

        - containerPort: 80

          name: http
  • Make a GET request to

http://<k8s-cluster-ip>:<port>/GRMLWPService/v1/serviceEndPoint/getFromCache

    • Expected result: Details of the newly deployed image
  • Check the health status of "POD" on browser by calling

http://<k8s-cluster-ip>:<port>/GRMLWPService/v1/health

    • Expected Result: {"status":"up"}

AAF-Edge

  • Check the port of AAF-Edge
    • If running locally, the port is 8080
  • Make a GET request to http://<ip-address>:<port>/v1
    • Expected Result: "AAF Service: UP"