You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Example specification:

{
    "id": "uniqueid",
    "key": "shortname",
    "label": "My Service Display Name",
    "image": "ndslabs/myimage:latest",
    "display": "stack",
    "access": "external",
    "description": "Description of my service",
    "depends": [
        {
            "id": "dependencyid",
            "required": true
        },
	],
    "config":  [
        {
            "name": "ENV_VAR",
            "value": "value",
			"label": "Label",
            "canOverride": true,
			"isPassword": true
        },
	],
	"command": [ "somecommand" ],
    "args" : [
        "-someargument"
    ],
    "ports": [
        {
            "port": 80,
            "protocol": "http"
        },
        {
            "port": 8000,
            "protocol": "http"
        },
        {
            "port": 8080,
            "protocol": "http"
        }
    ],
    "repositories":  [
        {
            "name": "https://github.com/golang/example",
            "type": "git"
        }
    ],
    "developerEnvironment" : "devenvId",
    "volumeMounts":[
       { "mountPath": "/workspace", "name": "cloud9go" }
    ],
    "readinessProbe" : {
        "type" : "http",
        "path" : "/favicon.ico",
        "port" : 80,
        "initialDelay": 10,
        "timeout" : 600
    },
    "resourceLimits": {
        "cpuMax": "1",
        "cpuDefault": "100m",
        "memMax": "2Gi",
        "memDefault": "1Gi"
    },
	"tags": [
		"Go", "Development Environment"
	]
}
FieldDescriptionNotes
idUnique IDUsed to uniquely identify this service
shortnameShort nameWas key – used in Kubernetes service, RC and pod names. Should be unique and limited to
labelDisplay name 
descriptionDescription 
imageDocker image 
dependsOptional and required depenciesShould key on ID going forward
configEnvironment variables (canOverride, password)Should we revisit this?
commandOptional startup command 
argsOptional command arguments 
displayWhether to display in the catalog (stack, standalone,Do we need this?
accessWhether to enable remote access (Nodeport, ingress)Should this be at the spec or stack level?
portsList of ports exposed by this serviceCurrently, we assume a single port. Multiple ports means multiple NodePorts or ingress rules.
repositoriesList of source code repositories associated with this serviceShould support Git/Bitbucket, Mercurial, SVN, CVS. A service can have multiple repositories. 
developerEnvironmentDeveloper environment used to create this serviceReference to unique ID of developer environment specification
volumeMountsList of volume mount pointsCurrently, we support a single volume mount
readinessProbeReadiness probe used to determine when the service is ready 
resourceLimitsResource limits for the service 
tagsList of tags used to describe/filter this serviceWhere do the tags come from

 

API Changes:

  • Tags:
    • GET /tags
    • POST/PUT tags
    • DELETE /tags/tag
  • Services
    • GET /services?filter=tag1,tag2,tag3

 

 

  • No labels