[CDAP-11940] Add support for microservices in CDAP Created: 19/Jun/17  Updated: 25/Aug/17  Resolved: 28/Jun/17

Status: Resolved
Project: CDAP
Component/s: UI
Affects Version/s: 4.2.0
Fix Version/s: 4.3.0

Type: New Feature Priority: Major
Reporter: Bhooshan Mogal Assignee: Tony Bach
Resolution: Fixed Votes: 0
Labels: up5

Sprint: UP5 Sprint 2
Release Notes: Adds the Create Microservice wizard to allow creating microservices in UI.
Rank: 1|hzy13a:tmx

 Description   

As a CDAP user, I want to support microservices through the CDAP UI, so I can create and manage my microservice applications through the UI.

Specs:
Add a new tile to the + button modal - Microservice. Description: A microservice is a CDAP application for creating microservices that communicate by passing messages over a reliable queue.

Wizard:
Step 1: General Information.
1. Name: Placeholder: Name of the microservice
2. Description: Placeholder: Description of the microservice
3. Version: Default to 1
Step 2: Upload microservice plugin. This is like the plugin upload step. This will accept a JAR file from the user. You can hardcode the plugin json as below:

{
  "parents": [
    "microservice-app[1.0-SNAPSHOT,10.0-SNAPSHOT)"
  ],
  "properties": {}
}

Step 3: Configure microservice
1. Instances: Placeholder: The number of instances of the microservice
2. Virtual Cores: Placeholder: The number of virtual cores for this microservice
3. Memory: Placeholder: The memory in MB for this microservice
4. Threshold: Placeholder: TBD
5. Endpoints: TBD
6. Properties: Use a keyvalue widget - reuse the preferences one.
Step 3 should generate a JSON as below:

{
  "artifact" : {
    "name" : "microservice-app",
    "version" : "1.0-SNAPSHOT",
    "scope" : "SYSTEM"
  },
  "config" : {
    "version" : 1,
    "id" : "FenceDetector",
    "description" : "A Microservice for detecting if location is within defined geo fences.",
    "plugin" : {
      "name" : "FenceDetector",
      "artifact" : {
        "name" : "geo-fence",
        "version" : "1.0-SNAPSHOT",
        "scope" : "user"
      }
    },
    "configuration" : {
      "instances" : 1,
      "vcores" : 1,
      "memory" : 512,
      "ethreshold" : 100,
      "endpoints" : {
        "fetch" : 100,
        "in" : [
          "ms-ericsson-geo-events"
        ]
      },
      "properties" : {
        "dataset" : "device_fences",
        "cache-expiration-in-seconds" : 300,
        "out-bound-stream" : "pubnubIngress"
      }
    }  
  }
}

Note: Place the microservice-app JAR and JSON files in the system artifacts directory and reload system artifacts before this step.



 Comments   
Comment by Tony Bach [ 21/Jun/17 ]

PR: https://github.com/caskdata/cdap/pull/9130

Generated at Mon Dec 17 05:50:51 UTC 2018 using Jira 7.13.0#713000-sha1:fbf406879436de2f3fb1cfa09c7fa556fb79615a.