diff --git a/doc/architecture/cridge/cridge_introduction.md b/doc/architecture/cridge.md similarity index 95% rename from doc/architecture/cridge/cridge_introduction.md rename to doc/architecture/cridge.md index 2866d16627516a24bca32c92b948bfb5dec46c29..6ca1065f208152725997fbbf3cb250278edd83b6 100644 --- a/doc/architecture/cridge/cridge_introduction.md +++ b/doc/architecture/cridge.md @@ -41,7 +41,7 @@ Pros, in a nutshell: The following image illustrates the approach. - + 1. A CRD in a cluster will be mapped in TMF model as a Resource specification and therefore can be exposed as a service specification in a catalog 2. Service Orders can be created for this service specification. The OSL Orchestrator (OSOM) will manage the lifecycle of the Service Order. @@ -52,7 +52,7 @@ The following image illustrates the approach. - + @@ -100,7 +100,7 @@ In a nutchell: A CRIDGE service is usually responsible for managing one cluster. In the following diagram we show how it can be used for managing multiple clusters: - + We assume that there is an OSL Management cluster that OSL is installed. CRIDGE is also installed there if we would like to manage resources in the same management cluster. @@ -119,7 +119,7 @@ We assume that there is an OSL Management cluster that OSL is installed. CRIDGE The implemented synchronization process is explained by the following diagram: - + WatcherService is executed when the CRIDGE service application starts (see onApplicationEvent). Specifically: @@ -147,7 +147,7 @@ The implemented synchronization process is explained by the following diagram: ## Exposure of CRDs as Service Specifications -See [Exposing Kubernetes Resources](../../service_design/kubernetes/exposing_kubernetes_resources.md) section for ways to design services around CRDs. +See [Exposing Kubernetes Resources](../service_design/kubernetes/exposing_kubernetes_resources.md) section for ways to design services around CRDs. ## Service Orchestration and CRDs/CRs @@ -210,7 +210,7 @@ OSOM sends to CRIDGE a message with the following information: The implemented process to deploy a CR is explained by the following diagram: - + - A message arrives to deploy a CR - The call examines if this CRIDGE service can handle the request (based on context and masterURL) @@ -223,9 +223,10 @@ The implemented process to deploy a CR is explained by the following diagram: ## Probe further -- See examples of exposing Kubernetes Operators as a Service via OpenSlice: - - [Offering "Calculator as a Service"](../../service_design/examples/calculator_crd_aas/calculator_crd_aas.md) - - [Offering "Helm installation as a Service" (Jenkins example)](../../service_design/examples/jenkins_helm_install_aas/jenkins_helm_install_aas.md) +See examples of exposing Kubernetes Operators as a Service via OpenSlice: + +- [Offering "Calculator as a Service"](../service_design/examples/calculator_crd_aas/calculator_crd_aas.md) +- [Offering "Helm installation as a Service" (Jenkins example)](../service_design/examples/jenkins_helm_install_aas/jenkins_helm_install_aas.md) diff --git a/doc/architecture/cridge/img01.png b/doc/architecture/images/cridge/img01.png similarity index 100% rename from doc/architecture/cridge/img01.png rename to doc/architecture/images/cridge/img01.png diff --git a/doc/architecture/cridge/img02.png b/doc/architecture/images/cridge/img02.png similarity index 100% rename from doc/architecture/cridge/img02.png rename to doc/architecture/images/cridge/img02.png diff --git a/doc/architecture/cridge/img03.png b/doc/architecture/images/cridge/img03.png similarity index 100% rename from doc/architecture/cridge/img03.png rename to doc/architecture/images/cridge/img03.png diff --git a/doc/architecture/cridge/img04.png b/doc/architecture/images/cridge/img04.png similarity index 100% rename from doc/architecture/cridge/img04.png rename to doc/architecture/images/cridge/img04.png diff --git a/doc/architecture/cridge/img05.png b/doc/architecture/images/cridge/img05.png similarity index 100% rename from doc/architecture/cridge/img05.png rename to doc/architecture/images/cridge/img05.png diff --git a/doc/architecture/images/metrico/metrico_arch_introduction.png b/doc/architecture/images/metrico/metrico_arch_introduction.png new file mode 100644 index 0000000000000000000000000000000000000000..8dff6c9177a8af34583b9f7b60bc908bfa4ea461 Binary files /dev/null and b/doc/architecture/images/metrico/metrico_arch_introduction.png differ diff --git a/doc/architecture/images/metrico/metrico_service_sequence_diagram.png b/doc/architecture/images/metrico/metrico_service_sequence_diagram.png new file mode 100644 index 0000000000000000000000000000000000000000..2a701df9e9c26d012d62240668ac339c919dd4d7 Binary files /dev/null and b/doc/architecture/images/metrico/metrico_service_sequence_diagram.png differ diff --git a/doc/architecture/messagebus.md b/doc/architecture/messagebus.md index a228afb52670b03e7036a2199cbfecd1454a2d50..e1ceeb7e3e261f7e57214cf1d271fce38db0ab63 100644 --- a/doc/architecture/messagebus.md +++ b/doc/architecture/messagebus.md @@ -1,8 +1,8 @@ # Message Bus and exchanged Messages -Openslice has a Message bus which allows Openslice services to exchange messages via queues and topics. +OpenSlice has a Message bus which allows OpenSlice services to exchange messages via queues and topics. -It is based on ActiveMQ. +It is based on ActiveMQ Artemis. 3rd party services can be attached to bus and subscribe to message topics or request resources via queues. diff --git a/doc/architecture/metrico.md b/doc/architecture/metrico.md new file mode 100644 index 0000000000000000000000000000000000000000..ee26958d07440d44669950fcd5b20e084aaa2b8f --- /dev/null +++ b/doc/architecture/metrico.md @@ -0,0 +1,38 @@ + +# METRICO: A Service that integrates external monitoring data in OpenSlice + +<!-- **Intended Audience: OpenSlice Developers** --> + +## Introduction + +Services and Resources created through OpenSlice (OSL) potentially provide a vast amount of data and metrics during their runtime. These data could be leveraged to perform actions upon the said services. Before the introduction of the METRICO component, OSL would need to rely exclusively on external tools' implementation to report metrics to it. + +Not anymore! METRICO is a component designed to create an inherent mechanism that initiates customizable metrics-retrieval jobs and associate the data with services under scope. To address the challenge of data retrieval across multiple and heterogeneous environments, OSL is not coupling tightly with a monitoring solution, but is able to integrate with any monitoring stack that provides a programmable API, e.g. Prometheus. Prometheus is considered a widely-utilized monitoring solution and many alternative monitoring tools converge towards its data model via implementation of Prometheus Exporters. On the other hand, OSL remains technology agnostic by capturing the monitoring requirements (e.g., data source, queries, interval, etc) through the TMF628 Performance Management model and API. + +In a nutshell, METRICO allows OSL users to: + +- integrate already owned monitoring systems with OSL (also supporting several parallel integrations) +- retrieve important metrics inherently through OpenSlice Service Inventory +- natively empower the service lifecycle with external data through LCM rules +- perform closed-loop control management + +## Approach + +OSL comprises of offered Service Specifications which, when ordered, create the respective Service instances, accessible through the Service Inventory (based on TMF638). The rationale behind the introduced component is that it exposes a defined METRICO Resource Specification which is used to design monitoring-related Service Specifications. The latter comprises of meaningful characteristics (e.g. monitoring data source, query, interval, affected service, etc) that are filled in by the requester. + +When the user orders a monitoring-related Service Specification (with populated characteristics of its preference) a TMF628 Measurement Collection Job entity is created which is responsible for gathering the requested metrics. Respecting the desired interval, this job returns the monitoring results to the appointed service in the Service Inventory, patching a designated characteristic. + +The following image illustrates the approach: + + + +Furthemore, all the interactions that occur from the time that an OSL User orders a monitoring-related Service Specification until the requested metrics are retrieved are depicted in the following sequence diagram. + + + +## Probe further + +See examples of creating Monitoring Jobs as a Service via OpenSlice: + +- [Integrate Prometheus monitoring solution as-a-Service](../service_design/examples/monitoring_aas/monitoring_aas.md) + diff --git a/doc/architecture/nfvapi.md b/doc/architecture/nfvapi.md index f31f195812fda0c41cf8165c5448c32a4931884c..14558621280072ef661e749beb331cc7697224f5 100644 --- a/doc/architecture/nfvapi.md +++ b/doc/architecture/nfvapi.md @@ -2,18 +2,18 @@ ## OAuth token -See [oauth](./oauth.md) +See [oauth](./oauth.md). ## Request a protected API resource Example: Get all vxfs (check the `Authorization:Bearer` to be correct) ``` -curl -H "Authorization:Bearer eybGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJhZG1pbiIsInNjb3BlIjpbIm9wZW5hcGkiLCJhZG1pbiIsInJlYWQiLCJ3cml0ZSJdLCJvcmdhbml6YXRpb24iOiJteW9yZ2FuaXp0aW9uIiwiZXhwIjoxNTcxOTI0MjU2LCJhdXRob3JpdGllcyI6WyJST0xFX01FTlRPUiIsIlJPTEVfQURNSU4iXSwianRpIjoiNzNkZmIxODEtNTMwOS00MmExLThkOWUtOGM3YmQ0YTE1YmU0IiwiY2xpZW50X2lkIjoib3NhcGlXZWJDbGllbnRJZE91dCJ9.Pj_hxnyMGhFhN8avU_DiAw1-LlcaIz5Hp9HNqalw-X4" http://localhost:13000/osapi/admin/vxfs +curl -H "Authorization:Bearer eybGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJhZG1pbiIsInNjb3BlIjpbIm9wZW5hcGkiLCJhZG1pbiIsInJlYWQiLCJ3cml0ZSJdLCJvcmdhbml6YXRpb24iOiJteW9yZ2FuaXp0aW9uIiwiZXhwIjoxNTcxOTI0MjU2LCJhdXRob3JpdGllcyI6WyJST0xFX01FTlRPUiIsIlJPTEVfQURNSU4iXSwianRpIjoiNzNkZmIxODEtNTMwOS00MmExLThkOWUtOGM3YmQ0YTE1YmU0IiwiY2xpZW50X2lkIjoib3NhcGlXZWJDbGllbnRJZE91dCJ9.Pj_hxnyMGhFhN8avU_DiAw1-LlcaIz5Hp9HNqalw-X4" http://portal.openslice.eu/osapi/admin/vxfs ``` Example response: -``` +```json [ { "id": 1, diff --git a/doc/architecture/oauth.md b/doc/architecture/oauth.md index 049c4e56eff0e3dea31b74e059dca870f92be8b9..e7081a7b093089d61d972208a7230cb1ece642c3 100644 --- a/doc/architecture/oauth.md +++ b/doc/architecture/oauth.md @@ -10,26 +10,34 @@ All APIs (except grant token request) must include Bearer token in request Autho ##OAuth token Get first an oauth token, using your username and password. -``` + +```bash curl -X POST http://portal.openslice.eu/auth/realms/openslice/protocol/openid-connect/token -H 'Content-Type: application/x-www-form-urlencoded' -d 'username=demouser' -d 'password=demouser' -d 'grant_type=password' -d 'client_id=osapiWebClientId' ``` -response: +Response: -``` - {"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJHZFRjQnpxczg2VW10NTRVZV8ybTJyWHJkV3dzaWdSZE9EUldMYm1memNvIn0.eyJleHAiOjE1ODgyNDA1NzAsImlhdCI6MTU4ODI0MDI3MCwianRpIjoiOGI2ZTU0NWUtNDIyYy00NzFiLWEwN2UtYTUzYzY1NDQ0MzZmIiwiaXNzIjoiaHR0cDovL3BvcnRhbC5vcGVuc2xpY2UuaW8vYXV0aC9yZWFsbXMvb3BlbnNsaWNlIiwiYXVkIjoiYWNjb3VudCIsInN1YiI6ImExYTI3NjVhLWVjODMtNDQ1Ni1iN2IyLTIwNzMxOTg2ZTAzNSIsInR5cCI6IkJlYXJlciIsImF6cCI6Im9zYXBpV2ViQ2xpZW50SWQiLCJzZXNzaW9uX3N0YXRlIjoiMzM1MGY0OTMtN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xMDk5Yy0wNTIzLTRjNGQtODM0Zi1iNDc0YzBjOTA1MzkifQ.eyJleHAiOjE1ODgyNDIwNzAsImlhdCI6MTU4ODI0MDI3MCwianRpIjoiZmViOTg5NWEtOTY5ZS00MzIzLWJjY2QtZTY2YzQ0NGE1MzJlIiwiaXNzIjoiaHR0cDovL3BvcnRhbC5vcGVuc2xpY2UuaW8vYXV0aC9yZWFsbXMvb3BlbnNsaWNlIiwiYXVkIjoiaHR0cDovL3BvcnRhbC5vcGVuc2xpY2UuaW8vYXV0aC9yZWFsbXMvb3BlbnNsaWNlIiwic3ViIjoiYTFhMjc2NWEtZWM4My00NDU2LWI3YjItMjA3MzE5ODZlMDM1IiwidHlwIjoiUmVmcmVzaCIsImF6cCI6Im9zYXBpV2ViQ2xpZW50SWQiLCJzZXNzaW9uX3N0YXRlIjoiMzM1MGY0OTMtNjYyNy00MzczLTg1NDQtZGVmZDI3YWQzYzc0Iiwic2NvcGUiOiJwcm9maWxlIGVtYWlsIn0.cDTx9BE1Df8EfGYm3VLr_MNFeymxZtJhMtlK7PVbIuk","token_type":"bearer","not-before-policy":1586797346,"session_state":"3350f493-6627-4373-8544-defd27ad3c74","scope":"profile email"} +```json +{ + "access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJHZFRjQnpxczg2VW10NTRVZV8ybTJyWHJkV3dzaWdSZE9EUldMYm1memNvIn0.eyJleHAiOjE1ODgyNDA1NzAsImlhdCI6MTU4ODI0MDI3MCwianRpIjoiOGI2ZTU0NWUtNDIyYy00NzFiLWEwN2UtYTUzYzY1NDQ0MzZmIiwiaXNzIjoiaHR0cDovL3BvcnRhbC5vcGVuc2xpY2UuaW8vYXV0aC9yZWFsbXMvb3BlbnNsaWNlIiwiYXVkIjoiYWNjb3VudCIsInN1YiI6ImExYTI3NjVhLWVjODMtNDQ1Ni1iN2IyLTIwNzMxOTg2ZTAzNSIsInR5cCI6IkJlYXJlciIsImF6cCI6Im9zYXBp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resh_token":"eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIwZjUxMDk5Yy0wNTIzLTRjNGQtODM0Zi1iNDc0YzBjOTA1MzkifQ.eyJleHAiOjE1ODgyNDIwNzAsImlhdCI6MTU4ODI0MDI3MCwianRpIjoiZmViOTg5NWEtOTY5ZS00MzIzLWJjY2QtZTY2YzQ0NGE1MzJlIiwiaXNzIjoiaHR0cDovL3BvcnRhbC5vcGVuc2xpY2UuaW8vYXV0aC9yZWFsbXMvb3BlbnNsaWNlIiwiYXVkIjoiaHR0cDovL3BvcnRhbC5vcGVuc2xpY2UuaW8vYXV0aC9yZWFsbXMvb3BlbnNsaWNlIiwic3ViIjoiYTFhMjc2NWEtZWM4My00NDU2LWI3YjItMjA3MzE5ODZlMDM1IiwidHlwIjoiUmVmcmVzaCIsImF6cCI6Im9zYXBpV2ViQ2xpZW50SWQiLCJzZXNzaW9uX3N0YXRlIjoiMzM1MGY0OTMtNjYyNy00MzczLTg1NDQtZGVmZDI3YWQzYzc0Iiwic2NvcGUiOiJwcm9maWxlIGVtYWlsIn0.cDTx9BE1Df8EfGYm3VLr_MNFeymxZtJhMtlK7PVbIuk", + "token_type":"bearer", + "not-before-policy":1586797346, + "session_state":"3350f493-6627-4373-8544-defd27ad3c74", + "scope":"profile email" +} ``` The `access_token` will be used next as a Bearer. +```bash +curl http://portal.openslice.eu/tmf-api/serviceCatalogManagement/v4/serviceCatalog -H 'Authorization: Bearer {{access_token}} ``` -curl http://portal.openslice.eu/tmf-api/serviceCatalogManagement/v4/serviceCatalog -H 'Authorization: Bearer yJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJHZFRjQnpxczg2VW10NTRVZV8ybTJyWHJkV3dzaWdSZE9EUldMYm1memNvIn0.eyJleHAiOjE1ODgyNDA1MjQsImlhdCI6MTU4ODI0MDIyNCwianRpIjoiYjg0NGYxZDAtMzk3Mi00YTMyLThiMWEtZDAxMDY3OGZjMTQ4IiwiaXNzIjoiaHR0cDovL3BvcnRhbC5vcGVuc2xpY2UuaW8vYXV0aC9yZWFsbXMvb3BlbnNsaWNlIiwic3ViIjoiYTFhMjc2NWEtZWM4My00NDU2LWI3YjItMjA3MzE5ODZlMDM1IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiYWRtaW4tY2xpIiwic2Vzc2lvbl9zdGF0ZSI6ImFmMmMzZmY1LTE4YWQtNDFkNC1hYTAyLTFlMGJkNzNmOTM5MSIsImFjciI6IjEiLCJzY29wZSI6InByb2ZpbGUgZW1haWwiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwicHJlZmVycmVkX3VzZXJuYW1lIjoiZGVtb3VzZXIifQ.SMtgV1E44_K_MQumGXZtWsLGVhYNaoM8Pk-DiFIZtUP4Zu-ervOsxHVQMX1frgVERR4jJidBcSshy9TnJ3UjF4l33WujHltbs-1UPy-gaIufVuEpl8RmbjOti3Up70vLfLXbzb6kN6WaahgobWXlbJsSXXwaBPQP6vSX5KigCa8TmzXcuqom14lOrlU-RB2zQTlJ30p7d9ag-a7o3I5m9GZWLJCZW2UYMl1JkskTHKgilA8HFQY4C9DYwWu8YDMyzqQSNumrTlURalBFidFbZvb1kp4dAyct8TysSWSbxxiwaL2RX1PWUqk-5Fpc1Q6BnBC8muMheiukFuoSkuADAg'^C -ubuntu@portal:~$ curl http://portal.openslice.eu/tmf-api/serviceCatalogManagement/v4/serviceCatalog -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJHZFRjQnpxczg2VW10NTRVZV8ybTJyWHJkV3dzaWdSZE9EUldMYm1memNvIn0.eyJleHAiOjE1ODgyNDA1NzAsImlhdCI6MTU4ODI0MDI3MCwianRpIjoiOGI2ZTU0NWUtNDIyYy00NzFiLWEwN2UtYTUzYzY1NDQ0MzZmIiwiaXNzIjoiaHR0cDovL3BvcnRhbC5vcGVuc2xpY2UuaW8vYXV0aC9yZWFsbXMvb3B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XbZKV2dU_1d3O0q0dVUEZJ_1kzwqOFkmxr9w0EnndC6ccYJlDAr_-GgUhhhNOn5v6tjYLUQdj5e4KEAsxIPzaCreK4un7mEAPmDw' Response: - +```json [{"uuid":"9e186cd5-b2b2-4a06-b1d6-895720193bc9","lastUpdate":"2020-03-11T23:19:05Z","@baseType":"BaseEntity","@schemaLocation":null,"@type":"ServiceCatalog","href":null,"name":"Example Facility Services","description":"Example Facility Services","lifecycleStatus":"Active","version":"1.0","validFor":{"endDateTime":"2039-11-20T23:07:21Z","startDateTime":"2019-11-20T23:07:21Z"},"relatedParty":null,"id":"9e186cd5-b2b2-4a06-b1d6-895720193bc9","category":[{"@baseType":"org.etsi.osl.tmf.scm633.model.ServiceCategoryRef","@schemaLocation":null,"@type":"org.etsi.osl.tmf.scm633.model.ServiceCategoryRef","href":null,"name":"Generic Services","@referredType":null,"id":"98b9adf1-a1d6-4165-855f-153ddc2131b1"},{"@baseType":"org.etsi.osl.tmf.scm633.model.ServiceCategoryRef","@schemaLocation":null,"@type":"org.etsi.osl.tmf.scm633.model.ServiceCategoryRef","href":null,"name":"External","@referredType":null,"id":"08ffdb3c-6237-45d0-9f3a-d43b5fc5f0b6"},{"@baseType":"org.etsi.osl.tmf.scm633.model.ServiceCategoryRef","@schemaLocation":null,"@type":"org.etsi.osl.tmf.scm633.model.ServiceCategoryRef","href":null,"name":"eMBB","@referredType":null,"id":"ef2c90dd-b65e-4a9f-a9c3-427c9fb0219b"}]}] - - -``` \ No newline at end of file +``` diff --git a/doc/architecture/tmfapi.md b/doc/architecture/tmfapi.md index 5b93ade5255eda26b4b99b7712725a57f767af69..168efa29df14ac3c17a01f1e6b94c1801fef814c 100644 --- a/doc/architecture/tmfapi.md +++ b/doc/architecture/tmfapi.md @@ -6,13 +6,13 @@ PLease check the complete specification [here](http://portal.openslice.eu/tmf-ap ### OAuth token -See [oauth](./oauth.md) +See [oauth](./oauth.md). ### Request a protected API resource Example: Get all Service Catalogs (check the `Authorization:Bearer` to be correct) -``` +```bash curl -H "Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJhZG1pbiIsInNjb3BlIjpbIm9wZW5hcGkiLCJhZG1pbiIsInJlYWQiLCJ3cml0ZSJdLCJvcmdhbml6YXRpb24iOiJteW9yZ2FuaXp0aW9uIiwiZXhwIjoxNTc4NTA1MDcyLCJhdXRob3JpdGllcyI6WyJST0xFX01FTlRPUiIsIlJPTEVfQURNSU4iXSwianRpIjoiMTFlNGYxYTUtZDY0Ny00YzA1LWE0ZGMtYWFhYzUyMjk4YzMwIiwiY2xpZW50X2lkIjoib3NhcGlXZWJDbGllbnRJZE91dCJ9.gm7cKdusDrdMRkxEiFU5sENKGRC1xwVj2SgPRmE9xxx" -H "accept: application/json;charset=utf-8" -X GET "http://portal.openslice.eu/tmf-api/serviceCatalogManagement/v4/serviceCatalog" ``` @@ -21,7 +21,7 @@ curl -H "Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hb response: -``` +```json [ { "uuid": "9e186cd5-b2b2-4a06-b1d6-895720193bc9", diff --git a/doc/service_design/examples/calculator_crd_aas/calculator_crd_aas.md b/doc/service_design/examples/calculator_crd_aas/calculator_crd_aas.md index f2c0f52c71a86ee872303e0acd7e7030f213c1d0..ef06fa565d15f843e3ed5bb58d723edd8fe8fe05 100644 --- a/doc/service_design/examples/calculator_crd_aas/calculator_crd_aas.md +++ b/doc/service_design/examples/calculator_crd_aas/calculator_crd_aas.md @@ -1,5 +1,5 @@ -# Exposing Kubernetes Operators as a Service : Offering "Calculator as a Service" through OpenSlice +# Exposing Kubernetes Operators as-a-Service: Offering "Calculator as-a-Service" **Intended Audience: OpenSlice Service Designers** diff --git a/doc/service_design/examples/jenkins_helm_install_aas/jenkins_helm_install_aas.md b/doc/service_design/examples/jenkins_helm_install_aas/jenkins_helm_install_aas.md index dae3315444d107f8acf7056c59731234a7c44610..34710dfa9f9d40385d13e69b1240b48747f7598d 100644 --- a/doc/service_design/examples/jenkins_helm_install_aas/jenkins_helm_install_aas.md +++ b/doc/service_design/examples/jenkins_helm_install_aas/jenkins_helm_install_aas.md @@ -1,4 +1,6 @@ -# Example: Offer Jenkins as a Service via Openslice +# Example: Offer Jenkins (Helm Chart) as-a-Service + +**Intended Audience: OpenSlice Service Designers** ## Design the Jenkins (Resource-Facing) Service diff --git a/doc/service_design/examples/monitoring_aas/images/edit_cfs_service_characteristic.png b/doc/service_design/examples/monitoring_aas/images/edit_cfs_service_characteristic.png new file mode 100644 index 0000000000000000000000000000000000000000..0eceed28796facb4016261e20307887c76a1369c Binary files /dev/null and b/doc/service_design/examples/monitoring_aas/images/edit_cfs_service_characteristic.png differ diff --git a/doc/service_design/examples/monitoring_aas/images/exposed_metrico_cfss.png b/doc/service_design/examples/monitoring_aas/images/exposed_metrico_cfss.png new file mode 100644 index 0000000000000000000000000000000000000000..d78548d68fdde823dcac9d158f0423484781ef86 Binary files /dev/null and b/doc/service_design/examples/monitoring_aas/images/exposed_metrico_cfss.png differ diff --git a/doc/service_design/examples/monitoring_aas/images/metrico_cfss.png b/doc/service_design/examples/monitoring_aas/images/metrico_cfss.png new file mode 100644 index 0000000000000000000000000000000000000000..4c1d72e116b7cfc486ddf503d82b6f3d111f4375 Binary files /dev/null and b/doc/service_design/examples/monitoring_aas/images/metrico_cfss.png differ diff --git a/doc/service_design/examples/monitoring_aas/images/metrico_cfss_characteristics.png b/doc/service_design/examples/monitoring_aas/images/metrico_cfss_characteristics.png new file mode 100644 index 0000000000000000000000000000000000000000..a5685d0d9515f56fd0df5554bf5ee5da6e73f55e Binary files /dev/null and b/doc/service_design/examples/monitoring_aas/images/metrico_cfss_characteristics.png differ diff --git a/doc/service_design/examples/monitoring_aas/images/metrico_cfss_creation_rule.png b/doc/service_design/examples/monitoring_aas/images/metrico_cfss_creation_rule.png new file mode 100644 index 0000000000000000000000000000000000000000..c88121b1fb9cc9a589b7fb9c4507b946817dae61 Binary files /dev/null and b/doc/service_design/examples/monitoring_aas/images/metrico_cfss_creation_rule.png differ diff --git a/doc/service_design/examples/monitoring_aas/images/metrico_cfss_order_checkout.png b/doc/service_design/examples/monitoring_aas/images/metrico_cfss_order_checkout.png new file mode 100644 index 0000000000000000000000000000000000000000..cf34ce24f50fbdd91fa10c39c008edcbcbea2a2b Binary files /dev/null and b/doc/service_design/examples/monitoring_aas/images/metrico_cfss_order_checkout.png differ diff --git a/doc/service_design/examples/monitoring_aas/images/metrico_cfss_order_completed.png b/doc/service_design/examples/monitoring_aas/images/metrico_cfss_order_completed.png new file mode 100644 index 0000000000000000000000000000000000000000..0a350cb1b867d2330cea458940dae35f3773868a Binary files /dev/null and b/doc/service_design/examples/monitoring_aas/images/metrico_cfss_order_completed.png differ diff --git a/doc/service_design/examples/monitoring_aas/images/metrico_cfss_order_processing.png b/doc/service_design/examples/monitoring_aas/images/metrico_cfss_order_processing.png new file mode 100644 index 0000000000000000000000000000000000000000..0640c31241ae7fd6028bbbd938c4c97c471df67c Binary files /dev/null and b/doc/service_design/examples/monitoring_aas/images/metrico_cfss_order_processing.png differ diff --git a/doc/service_design/examples/monitoring_aas/images/metrico_retrieved_monitoring_data.png b/doc/service_design/examples/monitoring_aas/images/metrico_retrieved_monitoring_data.png new file mode 100644 index 0000000000000000000000000000000000000000..2ca78a1196b22273bb72ed8162c3a7a62b6644d1 Binary files /dev/null and b/doc/service_design/examples/monitoring_aas/images/metrico_retrieved_monitoring_data.png differ diff --git a/doc/service_design/examples/monitoring_aas/images/metrico_rfss.png b/doc/service_design/examples/monitoring_aas/images/metrico_rfss.png new file mode 100644 index 0000000000000000000000000000000000000000..c4482e08ed8726afcad4520cd8aead275b4d878c Binary files /dev/null and b/doc/service_design/examples/monitoring_aas/images/metrico_rfss.png differ diff --git a/doc/service_design/examples/monitoring_aas/monitoring_aas.md b/doc/service_design/examples/monitoring_aas/monitoring_aas.md new file mode 100644 index 0000000000000000000000000000000000000000..639959ce706c16a407e659645a760de6bfb18152 --- /dev/null +++ b/doc/service_design/examples/monitoring_aas/monitoring_aas.md @@ -0,0 +1,135 @@ +# Example: Integrate Prometheus monitoring solution as-a-Service + +**Intended Audience: OpenSlice Service Designers** + +## Design the Monitoring (Resource-Facing) Service + +<!-- Before reading this example please make sure that you went through the [Design Helm as a Service](../../kubernetes/design_helm_aas.md) --> + +In this example, we will use the ```METRICO_Resource_Specification``` that the METRICO component exposes upon instantiation and create a ResourceFacingServiceSpecification (RFSS) to integrate data from a Prometheus instance. + +1. Navigate to Service Specifications +2. Create New Specification +3. Provide a Name, eg. Metrico RFS +4. Navigate to Resource Specification Relationships +5. Assign **METRICO_Resource_Specification** as a related Resource Specification + + + + +At this step, someone can focus on the Characteristics' configuration of the RFSS to define the desired functionality of the monitoring job. If you want to create a RFSS that executes a well-defined, static monitoring task (source, query, interval etc), you may navigate at the Characteristic's tab and assign default values to the respective characteristics. + +Although, if you want the user to be able to dynamically define its monitoring task through a single designed service, please continue with this guide. + +For reference, the available Characteristics are: + +- **_MT_TYPE**: The monitoring source type (default value: PROMETHEUS) +- **_MT_URL**: The monitoring source URL (e.g. https://prom.osl.etsi.org:9090) +- **_MT_QUERY**: The query towards the monitoring source (e.g. query=gnb_service_state) +- **_MT_RECURRING_INTERVAL**: The polling interval of the monitoring source (default value: G_1MN, Available values: G_10SEC, G_30SEC, G_1MN, G_5MN, G_15MN, G_30MN, G_1H, G_24H, G_1M, G_1Y) +- **_MT_START_TIME**: The starting time of the monitoring job (default value, if left blank: NOW) +- **_MT_END_TIME**: The ending time of the monitoring job (default value, if left blank: NOW + 1h) +- **_MT_SERVICEUUID**: The ID of the service to update with the retrieved monitoring data +- **_MT_CHARACTERISTIC_NAME**: The characteristic of the service with id _MT_SERVICEUUID that will be updated with the retrieved monitoring data + + +## Expose the Monitoring (Customer-Facing) Service to the Users + +To expose the monitoring service towards the users, the designer must create the respective CustomerFacingServiceSpecification (CFSS), by using the previously designed RFSS as a related service. + + 1. Navigate to Service Specifications + 2. Create New Specification + 3. Provide a Name, e.g. Metrico Service, mark as Bundle (to enable Service Specification Relationships) and save it + 4. Navigate to the "Service Specification Relationships" tab and assign Metrico RFS + 5. (Optionally) Add a logo, from the respective "Logo" tab + + + +At this stage, if you opted for the design of a dynamic, user-adjustable monitoring service, you must define the Characteristic(s) that will be exposed to the user. For this, you must navigate to the "Service Specification Characteristics" tab. + +Specifically, you have to choose which Characteristics (from the ones introduced above) a user can edit and provide default values for the ones you opt out. In our example, we will design as if all the Characteristics are exposable to the user. + +Using "Create New Characteristic" menu, create the Characteristics as shown below: + +- Provide a name (e.g. _MT_TYPE) +- Provide a description for the user (optional) +- ValueType: TEXT +- Configurable: true (if you want the user to be able to change it) +- Service Characteristic Value (optional) - Value (e.g. PROMETHEUS) +- Service Characteristic Value (optional) - Is Default: true + +> Note 1: You are not obliged to follow the same Characteristic names with the RFSS. The example does that for better clarity. + +> Note 2: Defining Service Characteristic Value is optional. But if you opt for a Characteristic to be non-configurable, you have to define a default value. + +After filling all the Characteristics, you should be able to see something like the image below: + + + +The above configuration is expected to query ```http://172.16.10.100:9090/api/v1/query?query=gnb_service_state&time=1736528808.484``` every 1 minute and return the result to the service that the user will point out (filling ```_MT_SERVICEUUID ```), and especially into a Characteristic named ```METRICO Result```. + +In our presented example, we would like the monitoring service to wait for user input for the ```_MT_SERVICEUUID```, before starting. The user can either provide this during the Service Order (if it is already known and available at the Service Inventory), or add it during execution. + +To achieve the above, you should navigate to the "Life Cycle Rules" tab and create a Creation Rule that will prevent the Metrico RFS from starting, unless the ```_MT_SERVICEUUID``` is provided. Also, you have to pass the updated user-defined Characteristics from the current to the Metrico RFS, when the previous condition is met. To do so, the rule has to be as the following: + + + +Let's create it step-by-step: + +- Drag-and-drop the Create string variable block (from Text blocks) +- Click the drop-down menu, Rename variable... and input "consumingServiceId" +- Select the Get Value as String block (from Service > Characteristics blocks), opt for "_MT_SERVICEUUID" from the drop-down menu and attach to the previous block +- Select the Conditionally Create Ref Service block (from Service > Relationships > Service Refs blocks) +- At its first slot, attach the Metrico RFS block (from Service > Relationships > Service Refs blocks) +- At the second slot, attach sequentially a) the Not and b) the String Comparison blocks (from Logic blocks) +- The Comparison block must compare the "consumingServiceId" variable value (From Text blocks) and an empty line of text (From Text blocks) +- At the final slot, attach the Create list block (from Lists blocks) +- From the last block's gear button, drag-and-drop more items in the list (must be 8, as the Characteristics) +- At each list item, attach the Set values to characteristics of a referenced service block (Service > Relationships > Service Refs blocks) +- Each block must have the RFS's Characteristic Name (fill it in at a line of text block) and the respective Tvalue from the Get Value as String block (from Service > Characteristics blocks) +- Repeat for every characteristic, as shown above +- Change the "lifecycle phase" drop-down option to "CREATION" + +The design phase is not completed! Finally, you must expose the created Metrico CFSS through an already created Service Catalog and Service Category so as to make it visible to the users, thus available for ordering. + + + + +## Order the Metrico Service + +Order the service from the previously assigned Service Catalog > Service Category. + +Here, we assume that the user will not provide the ```_MT_SERVICEUUID``` during the Service Order Checkout phase, neither the task's interval (which defaults to 1 hour). Note how the values are filled in with the defaults from the designing phase. + + + +Once ordered, you may navigate to the Order Preview by Manage Services > Service Orders list. + +## Order Fulfillment and Monitoring Data Retrieval + +The default state of a Service Order is **INITIAL**. Unless not opted differently (via an API call, for instance), this step requires user intervention to change the state to **ACKNOWLEDGED** (via the Edit button). + +As soon as the Service Order is in **ACKNOWLEDGED** state, it will be processed and the state will be automatically updated to **INPROGRESS**, as seen in the figure below. + + + +As defined by the designed Creation Rule, the Service Order is expecting the user to provide the ```_MT_SERVICEUUID```. + +Starting from the Service Order overview and specifically the Order Item #1 tab > Supporting Services, select the Metrico Service. + +Navigate to the "Service Characteristics" tab and click the edit Service Characteristics button. Provide the ID of the Metrico Service (as found in the address bar), at the ```_MT_SERVICEUUID``` value, as depicted in the figure below. + + + +Once the ```_MT_SERVICEUUID``` value is provided, the Metrico RFS will be created and eventually the Service Order will become "COMPLETED", as seen in the Service Order overview. + + + +From this menu, if you navigate once more at the Order Item #1 tab > Supporting Services > Metrico Service, you will be able to see the retrieved monitoring data. + +Specifically, the "Service Characteristics" tab now has a new entry, i.e. ```Metrico Results```, with the respective data. The data are updated with the defined interval of 1 minute and every potential change will appear there. At this point, someone can create a "SUPERVISION" rule, which is triggered by changes in Service Characteristics (e.g. ```Metrico Results```), and perform some action based on the monitoring data results. + + + + +> The ```_MT_SERVICEUUID``` could have been automatically provided by a Rule, thus minimizing the need for user intervention. \ No newline at end of file diff --git a/doc/service_design/kubernetes/exposing_kubernetes_resources.md b/doc/service_design/kubernetes/exposing_kubernetes_resources.md index 5eba68457f7ffaaa69954de0f81a381bdcfb8c7d..a9d6844e0df3cc8db4ce11cda4b01f9c21df62c7 100644 --- a/doc/service_design/kubernetes/exposing_kubernetes_resources.md +++ b/doc/service_design/kubernetes/exposing_kubernetes_resources.md @@ -134,7 +134,7 @@ OpenSlice adds automatically as we see the following characteristics: - See examples of exposing Kubernetes Operators as a Service via OpenSlice: - [Offering "Calculator as a Service"](../examples/calculator_crd_aas/calculator_crd_aas.md) - [Offering "Helm installation as a Service" (Jenkins example)](../examples/jenkins_helm_install_aas/jenkins_helm_install_aas.md) -- [Learn more about CRIDGE, the service in OpenSlice that manages CRDs/CRs](../../architecture/cridge/cridge_introduction.md) +- [Learn more about CRIDGE, the service in OpenSlice that manages CRDs/CRs](../../architecture/cridge.md) diff --git a/mkdocs.yml b/mkdocs.yml index 4ac6a61eef2edb50a4ed13d9aa3bb8f97a928ac7..72ab0b927142ddc2445922f90dab45a2a53757ff 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -162,6 +162,7 @@ nav: # - Open5GS (Kubernetes approach): ./service_design/examples/open5gs_kubernetes.md - Calculator CRD aaS: ./service_design/examples/calculator_crd_aas/calculator_crd_aas.md - Jenkins Helm Installation aaS : ./service_design/examples/jenkins_helm_install_aas/jenkins_helm_install_aas.md + - Monitoring aaS: ./service_design/examples/monitoring_aas/monitoring_aas.md - Service Ordering: - Ordering Services from catalogs: ./service_ordering/ordering_services.md # - Testing services: @@ -182,9 +183,10 @@ nav: - Quality on Demand: ./addons/camara/qod.md - Design & Architecture: - Architecture: ./architecture/architecture.md - - CRIDGE: ./architecture/cridge/cridge_introduction.md - Message bus: ./architecture/messagebus.md - OSOM: ./architecture/osom.md + - CRIDGE: ./architecture/cridge.md + - METRICO: ./architecture/metrico.md - Authentication: ./architecture/oauth.md - APIs: - TMF API: ./architecture/tmfapi.md