From 63d33e88c71fd36a420b0d98635584574f248fd5 Mon Sep 17 00:00:00 2001 From: gunjald <107645297+gunjald@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:56:03 +0530 Subject: [PATCH 1/6] Update EdgeCloud_LcM.yaml The proposed PR aims to simplify and establish relationship between some of the parameters like Uri and component and componentSpec. This changes the AppManifest and provide a description of component and how it relates to componentSpec and what is expected from the API user. The API user know the information of Helm chart or docker-compose internal and what all of them needs to be exposed to external access. --- code/API_definitions/EdgeCloud_LcM.yaml | 85 ++++++------------------- 1 file changed, 20 insertions(+), 65 deletions(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index e2f9af20..ce66bf9f 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -404,6 +404,7 @@ components: properties: name: type: string + pattern: ^[A-Za-z][A-Za-z0-9_]{7,63}$ description: Name of the application. version: type: integer @@ -414,12 +415,9 @@ components: - VM - CONTAINER - HELM - fileName: - type: string - minLength: 8 - maxLength: 32 - description: Name of the file with the extension eg. zip, targz, etc. - repository: + operatingSystem: + $ref: '#/components/schemas/OperatingSystem' + appRepo: type: object required: - type @@ -430,65 +428,43 @@ components: enum: - PRIVATEREPO - PUBLICREPO - description: Artifact repository location. PUBLICREPO is used of public urls like github, helm repo etc, - PRIVATEREPO is used for private repo managed by the application developer. + description: Application repository and image URI information. PUBLICREPO is used of public urls like github, helm repo etc. PRIVATEREPO is used for private repo managed by the application developer. Private repo can be accessed by using the app developer provided userName and password. Password is recommended to be the personal access token created by developer e.g. in Github repo. url: $ref: '#/components/schemas/Uri' userName: type: string - description: Username to acces the artifact repository + description: Username to acces the Helm chart, docker-compose file or VM image repository password: - type: string - description: Password to acces the artifact repository - token: - type: string - description: Authorization token acces the artifact repository + type: string + maxLength: 128 + description: Password or personal access token created by developerto acces the app repository componentSpec: - description: Details about compute, networking and storage requirements for each component of the application. - App provider should define all information needed to instantiate the component. - If artifact is being defined at component level this section should have information just about the component. - In case the artifact is being defined at application level the section should provide details about all the components. + description: Information defined in "appRepo" point to the application descriptor e.g. Helm chart, docker-compose yaml file etc. The descriptor may contain one or more containers and their associated meta-data. A component refers to additional details about these containers to expose the instances of the containers to external client applications. App provider can define one or more components (via the associated network port) in componentSpec corresponding to the containers in helm charts or docker-compose yaml file as part of app descriptors. type: array items: type: object required: - componentName - - operatingSystem - - cpuArchitecture - networkInterfaces - - numOfInstances - - restartPolicy properties: componentName: type: string description: Component name must be unique with an application - operatingSystem: - $ref: '#/components/schemas/OperatingSystem' - cpuArchitecture: - $ref: '#/components/schemas/CpuArchType' networkInterfaces: - description: Each application component exposes some ports either for external users or for inter component communication. - Application provider is required to specify which ports are to be exposed and the type of traffic that will flow through these ports. + description: Each application component exposes some ports either for external users or for inter component communication. Application provider is required to specify which ports are to be exposed and the type of traffic that will flow through these ports.The underlying platform may assign a dynamic port against the "extPort" that the application clients will use to connect with edge application instance. type: array items: type: object required: - interfaceId - protocol - - port - - network - - interfaceName + - extPort - visibilityType properties: interfaceId: type: string - description: Each Port and corresponding traffic protocol exposed by the component is identified by a name. - Application client on user device requires this to uniquley idenify the interface. - network: - type: string - description: Name of the network. In case the application has to be assoisated with more then 1 network then app provider - must define the name of the network on which this interface has to be exposed. This parameter is required only if - the port has to be exposed on a specific network other then default. + pattern: ^[A-Za-z][A-Za-z0-9_]{3,31}$ + description: Each Port and corresponding traffic protocol exposed by the component is identified by a name. Application client on user device requires this to uniquley idenify the interface. protocol: type: string enum: @@ -496,48 +472,26 @@ components: - UDP - ANY description: Defines the IP transport communication protocol i.e., TCP, UDP or ANY - port: + extPort: type: integer format: int32 minimum: 1 maximum: 65535 - description: Port number exposed by the component. OP may generate a dynamic port towards the UCs - corresponding to this internal port and forward the client traffic from dynamic port to containerPort. - interfaceName: - type: string - description: Interface Name. Required only if application has to be attatched to a network other then default. + description: Port number exposed by the component. OP may generate a dynamic port towards the UCs corresponding to this internal port and forward the client traffic from dynamic port to containerPort. visibilityType: - description: Defines whether the interface is exposed to outer world or not i.e., external, or internal. - If this is set to "external", then it is exposed to external applications otherwise it is exposed - internally to edge application components within edge cloud. When exposed to external world, - an external dynamic port is assigned for UC traffic and mapped to the internal containerPort + description: Defines whether the interface is exposed to outer world or not i.e., external, or internal.If this is set to "external", then it is exposed to external applications otherwise it is exposed internally to edge application components within edge cloud. When exposed to external world, an external dynamic port is assigned for UC traffic and mapped to the extPort type: string enum: - VISIBILITY_EXTERNAL - VISIBILITY_INTERNAL minItems: 1 - numOfInstances: - type: integer - format: int32 - description: Number of component instances to be launched. - restartPolicy: - type: string - enum: - - RESTART_POLICY_ALWAYS - - RESTART_POLICY_NEVER - description: How the platform shall handle component failure + required: - name - virtType - - fileName - repository - componentSpec - CpuArchType: - type: string - enum: - - x86_64 - - arm_64 - description: CPU Instruction Set Architecture (ISA) E.g., Intel, Arm etc. + AppInstanceInfo: description: Information about the application instance. type: object @@ -649,6 +603,7 @@ components: $ref: '#/components/schemas/AppId' Uri: type: string + example: https://charts.bitnami.com/bitnami/helm/example-chart:0.1.0 description: A Uniform Resource Identifier (URI) as per RFC 3986, identifies the endpoint within an Edge Cloud Node where the user equipment may connect to the selected application instance responses: From 28534da22d84901c932ae7299dab23503e3a32a8 Mon Sep 17 00:00:00 2001 From: gunjald <107645297+gunjald@users.noreply.github.com> Date: Sun, 4 Feb 2024 22:42:44 +0530 Subject: [PATCH 2/6] Update EdgeCloud_LcM.yaml change Uri to imagePath in appRepo as per comment from Jon. --- code/API_definitions/EdgeCloud_LcM.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index ce66bf9f..74a98085 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -421,7 +421,7 @@ components: type: object required: - type - - url + - imagePath properties: type: type: string @@ -429,7 +429,7 @@ components: - PRIVATEREPO - PUBLICREPO description: Application repository and image URI information. PUBLICREPO is used of public urls like github, helm repo etc. PRIVATEREPO is used for private repo managed by the application developer. Private repo can be accessed by using the app developer provided userName and password. Password is recommended to be the personal access token created by developer e.g. in Github repo. - url: + imagePath: $ref: '#/components/schemas/Uri' userName: type: string From f9744cb5d30d4a90fc03e1b0ea00803b62074aca Mon Sep 17 00:00:00 2001 From: gunjald <107645297+gunjald@users.noreply.github.com> Date: Sun, 4 Feb 2024 22:52:45 +0530 Subject: [PATCH 3/6] Update EdgeCloud_LcM.yaml change extPort to port and updated the description as per the comment from Jon --- code/API_definitions/EdgeCloud_LcM.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index 74a98085..bd111b36 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -458,7 +458,7 @@ components: required: - interfaceId - protocol - - extPort + - port - visibilityType properties: interfaceId: @@ -472,12 +472,13 @@ components: - UDP - ANY description: Defines the IP transport communication protocol i.e., TCP, UDP or ANY - extPort: + port: type: integer format: int32 minimum: 1 maximum: 65535 - description: Port number exposed by the component. OP may generate a dynamic port towards the UCs corresponding to this internal port and forward the client traffic from dynamic port to containerPort. + description: Port number exposed by the component. OP may generate a dynamic port towards the component instance which forwards external traffic to the component port. +. visibilityType: description: Defines whether the interface is exposed to outer world or not i.e., external, or internal.If this is set to "external", then it is exposed to external applications otherwise it is exposed internally to edge application components within edge cloud. When exposed to external world, an external dynamic port is assigned for UC traffic and mapped to the extPort type: string From cd7285169114764247c3b4752ae574970d251d79 Mon Sep 17 00:00:00 2001 From: gunjald <107645297+gunjald@users.noreply.github.com> Date: Mon, 5 Feb 2024 13:26:26 +0530 Subject: [PATCH 4/6] Update EdgeCloud_LcM.yaml Changing name field length to at least 1 char as per feedback from Jon --- code/API_definitions/EdgeCloud_LcM.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index bd111b36..ad146d01 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -404,7 +404,7 @@ components: properties: name: type: string - pattern: ^[A-Za-z][A-Za-z0-9_]{7,63}$ + pattern: ^[A-Za-z][A-Za-z0-9_]{1,63}$ description: Name of the application. version: type: integer From 2c6074b6ba66d516005b4c05f1eaa00b84725313 Mon Sep 17 00:00:00 2001 From: gunjald <107645297+gunjald@users.noreply.github.com> Date: Mon, 5 Feb 2024 13:45:04 +0530 Subject: [PATCH 5/6] Update EdgeCloud_LcM.yaml As per suggestion from Jon, updated the password and authType field. --- code/API_definitions/EdgeCloud_LcM.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index ad146d01..2faab703 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -434,10 +434,19 @@ components: userName: type: string description: Username to acces the Helm chart, docker-compose file or VM image repository - password: + credentials: type: string maxLength: 128 - description: Password or personal access token created by developerto acces the app repository + description: Password or personal access token created by developer to acces the app repository. API users can generate a personal access token e.g. docker clients to use them as password, + authType: + type: string + enum: + - DOCKER + - HTTP_BASIC + - HTTP_BEARER + - NONE + description: The credentials can also be formatted as a Basic auth or Bearer auth in HTTP "Authorization" header. + componentSpec: description: Information defined in "appRepo" point to the application descriptor e.g. Helm chart, docker-compose yaml file etc. The descriptor may contain one or more containers and their associated meta-data. A component refers to additional details about these containers to expose the instances of the containers to external client applications. App provider can define one or more components (via the associated network port) in componentSpec corresponding to the containers in helm charts or docker-compose yaml file as part of app descriptors. type: array From 3c86d5c93208e2600f9598a92f23dfa3ce4ca60c Mon Sep 17 00:00:00 2001 From: gunjald <107645297+gunjald@users.noreply.github.com> Date: Mon, 5 Feb 2024 13:57:43 +0530 Subject: [PATCH 6/6] Update EdgeCloud_LcM.yaml As suggested added the checksum field and description for same --- code/API_definitions/EdgeCloud_LcM.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/API_definitions/EdgeCloud_LcM.yaml b/code/API_definitions/EdgeCloud_LcM.yaml index 2faab703..a7efaf69 100644 --- a/code/API_definitions/EdgeCloud_LcM.yaml +++ b/code/API_definitions/EdgeCloud_LcM.yaml @@ -446,7 +446,9 @@ components: - HTTP_BEARER - NONE description: The credentials can also be formatted as a Basic auth or Bearer auth in HTTP "Authorization" header. - + checksum: + type: string + description: MD5 checksum for VM and file-based images, sha256 digest for containers componentSpec: description: Information defined in "appRepo" point to the application descriptor e.g. Helm chart, docker-compose yaml file etc. The descriptor may contain one or more containers and their associated meta-data. A component refers to additional details about these containers to expose the instances of the containers to external client applications. App provider can define one or more components (via the associated network port) in componentSpec corresponding to the containers in helm charts or docker-compose yaml file as part of app descriptors. type: array @@ -487,7 +489,6 @@ components: minimum: 1 maximum: 65535 description: Port number exposed by the component. OP may generate a dynamic port towards the component instance which forwards external traffic to the component port. -. visibilityType: description: Defines whether the interface is exposed to outer world or not i.e., external, or internal.If this is set to "external", then it is exposed to external applications otherwise it is exposed internally to edge application components within edge cloud. When exposed to external world, an external dynamic port is assigned for UC traffic and mapped to the extPort type: string