Capif services are developed under [services folder](https://labs.etsi.org/rep/ocf/capif/-/tree/main/services).
### Run All CAPIF Services locally with Docker images
To run using docker and docker compose, version 2.10 or higher, you must ensure you have that tools installed at your machine. Also to simplify the process, we have 3 script to control docker images to deploy, check and cleanup.
To run using docker and docker compose, version 2.10 or higher, you must ensure you have those tools installed in your machine. Also to simplify the process, we have 3 scripts allowing docker images to deploy, check and cleanup.
All script are present under ***services*** directory.
All these scripts are available under ***services*** directory.
To run CAPIF APIs locally using docker and docker-compose you can use run.sh script:
```
...
...
@@ -19,7 +19,7 @@ Usage: ./run.sh <options>
-m : Clean monitoring service
-h : show this help
```
This script build and run all services using docker images, including mongodb and nginx locally and in background, and import ca.crt to nginx. By default monitoring is not activated and Nginx deployed use **capifcore** as a hostname.
This script builds and runs all services using docker images, including mongodb and nginx locally and in the background, and imports ca.crt to nginx. By default monitoring is not activated and Nginx is deployed use **capifcore** as a hostname.
Some examples of use:
```
...
...
@@ -34,7 +34,7 @@ Some examples of use:
```
If you want to check if all CAPIF services are running properly in local machine after execute run.sh, we can use:
If you want to check if all CAPIF services are running properly in a local machine after executing run.sh, you can use:
```
./check_services_are_running.sh
```
...
...
@@ -45,7 +45,7 @@ When we need to stop all CAPIF services, we can use next bash script:
./clean_capif_docker_services.sh -a
```
NOTE: You can use different flags if you only want to stop some of them, please check help using
NOTE: You can use different flags if you only want to stop some of them, please check the help using
```
./clean_capif_docker_services.sh -h
...
...
@@ -63,7 +63,7 @@ This shell script will remove and clean all CAPIF services started previously wi
On the other hand you can check logs using show_logs.sh script, please check options:
```
./show_logs.sh
You must specify an option before run script.
You must specify an option when running the script.
Usage: ./show_logs.sh <options>
-c : Show capif services
-v : Show vault service
...
...
@@ -73,7 +73,7 @@ Usage: ./show_logs.sh <options>
-f : Follow log output
-h : Show this help
```
You can also use option -f in order to live follow log output
You can also use option -f in order to follow log output in real time
### Run All CAPIF Services locally with Docker images and deploy monitoring stack
It is now possible to deploy a monitoring stack for CAPIF with Grafana, Prometheus, FluentBit, Loki, Cadvisor, Tempo and Opentelemetry.
...
...
@@ -90,11 +90,11 @@ After they have been built, the different panels can be consulted in Grafana at
http://localhost:3000
```
By default, the monitoring option is set to false. Once up, all data sources and dashboards are automatically provisioned
By default, the monitoring option is set to false. Once up, all data sources and dashboards are automatically provisioned.
### Run each service using Docker
Also you can run service by service using docker:
Also you can run OpenCAPIF service by service using docker:
@@ -39,8 +38,8 @@ The CAPIF Core Function is the cornerstone of the Common API Framework and provi
* Monitoring the service API invocations;
* Onboarding a new API Invoker and offboarding an API Invoker;
* Storing policy configurations related to CAPIF and service APIs;
* Support accessing the logs for auditing (e.g., detecting abuse); and
* Support publishing and discovery of service APIs information among CAPIF Core Function (CAPIF interconnection).
* Support for accessing the logs for auditing (e.g., detecting abuse); and
* Support for publishing and discovery of service APIs information among CAPIF Core Function (CAPIF interconnection).
The following diagram shows how API Invokers and API Providers interact with the CAPIF Core Function to Register in CAPIF, Publish APIs, Discover APIs and Consume APIs. It is important to highlight that the CAPIF Core Function is not a classical API Gateway. The API consumption takes place directly between the API Invoker and the API Provider. Therefore, CAPIF does not impact API performance in API consumption between API Invokers and API Providers.
...
...
@@ -81,23 +80,23 @@ This repository has the python-flask Mockup servers created with openapi-generat
## How to test CAPIF APIs
The above APIs can be tested either with POSTMAN tool or running developed tests with Robot Framework.
The above APIs can be tested either with POSTMAN tool or running the developed tests with Robot Framework.
## Test Plan Documentation
Complete documentation of tests is here: [Test Plan Directory]
Complete documentation of tests is available here: [Test Plan Directory]
## Robot Framework
In order to ensure modifications over CAPIF services still accomplish the required functionality, Robot Framework test suite must be success.
In order to ensure that modifications over CAPIF services still fulfills the required functionality, the Robot Framework Test Suite must be successfully run.
Test suite implemented accomplish requirements described under test plan at [Test Plan Directory] folder.
The Robot Test Suite covers the requirements described in the test plan at [Test Plan Directory] folder.
Please go to [Testing with Robot Framework] Section
Please check the [Testing with Robot Framework] Section
## Using PostMan
You can test the CAPIF flow using the Postman tool. To do this, we have created a collection with some examples of CAPIF requests with everything necessary to carry them out.
You can also test the CAPIF flow using the Postman tool. To do this, we have created a collection with some examples of CAPIF requests with everything necessary to carry them out.
For more information on how to test the APIs with POSTMAN, go to this [POSTMAN Section].