Skip to content

Foreign Service Deployment

Services external to the Platform 6 JVM can add/remove their service advertisements using the Platform Manager CMB API

Platform Manager Id: platform6.manager

1. Deploy Extra Platform6 JVM Service

Header key Description Value
platform6.request.action The action to perform (required) deploy
service.id Service Name (required)
node.id Node Name (required)
service.path Path to service endpoints (required)
service.version Service Version (required)
service.item.provider Provides app packable service items ** true/false
service.restart.toreload Service must be restarted after app install/uninstall true/false
service.ui JSON: ServiceUI
service.ui.version Service UI Version
service.ctx Alternative context URL ***

If providing a service.ui JSON, the service MUST implement a /portal endpoint allowing the loading of a service specific JavaScript bundle

Note

** Service must implement the COMMON service CMB API to allow app packing

Warning

*** Services running outside the Platform6 JVM will require an alternative context URL as the default it to connect to the endpoint specified on the instance

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value JSON Platform 6 Configuration: application.conf

Example Deployment From a GoLang Service

func (cmb *commonMessageBus) RegisterService(serviceId string, host string, port string) {

    ui := `{
        "visible": true,
        "iconName": "fa-google",
        "label": {
            "en-US": "Golang",
            "fr-FR": "Golang"
            }
    }`

    cmsg := cm.CommonMessage{
        Headers: []*cm.CommonMessage_Header{
            {Key: "platform6.request.action", Value: "deploy"},
            {Key: "service.id", Value: "platform6." + serviceId},
            {Key: "node.id", Value: "1"},
            {Key: "service.path", Value: "/apis/v1.0/godemo"},
            {Key: "service.version", Value: "1.0.0"},
            {Key: "service.ui", Value: ui},
            {Key: "service.ui.version", Value: "0.0.1"},
            {Key: "service.ctx", Value: fmt.Sprintf("http://%s:%s", host, port)},
        },
    }

    cmb.ExchangeCommonMessage("cmb.platform6.manager", &cmsg, 10000)
}

2. Undeploy Extra Platform6 JVM Service

Header key Description Value
platform6.request.action The action to perform (required) undeploy
service.id Service Name (required)
node.id Node Name (required)

A valid response will be n empty response:

Header key Description