Commit 3f960cf3 authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Merge branch 'staging' into 'main'

Staging to Main for Release 3

See merge request !144
parents af72be78 819bd25f
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -37,3 +37,4 @@ results


helm/capif/*.lock
helm/capif/*.lock
helm/capif/charts/tempo*
helm/capif/charts/tempo*
*.bak
 No newline at end of file
+24 −0
Original line number Original line Diff line number Diff line
# Proposers

- name-of-proposer-1 (institution-of-proposer-1)
- name-of-proposer-2 (institution-of-proposer-2)
...

# Description

Describe your proposal in ~1000 characters.
You can reference external content listed in section "References" as [Ref-1].

# Demo or definition of done

Describe which high level conditions needs to be fulfilled to demonstrate this feature implementation is completed.
You can reference external content (example, demo paper) listed in section "References" as [Ref-2].

# References

1. [Reference name](https://reference-url)
2. Author1, Author2, Author3, et. al., “My demo using feature,” in Conference-Name Demo Track, 20XX.

# Acknowledgements
This work is funded by the European Commission through the <European project id> project with Grant Agreement number <Agreement Number>.
```example HORIZON-JU-SNS-2022 FLEX-SCALE project with Grant Agreement number 101096909.```
+24 −0
Original line number Original line Diff line number Diff line
# Proposers

- name-of-proposer-1 (institution-of-proposer-1)
- name-of-proposer-2 (institution-of-proposer-2)
...

# Description

Describe your proposal in ~1000 characters.
You can reference external content listed in section "References" as [Ref-1].

# Demo or definition of done

Describe which high level conditions needs to be fulfilled to demonstrate this feature implementation is completed.
You can reference external content (example, demo paper) listed in section "References" as [Ref-2].

# References

1. [Reference name](https://reference-url)
2. Author1, Author2, Author3, et. al., “My demo using feature,” in Conference-Name Demo Track, 20XX.

# Acknowledgements
This work is funded by the European Commission through the <European project id> project with Grant Agreement number <Agreement Number>.
```example HORIZON-JU-SNS-2022 FLEX-SCALE project with Grant Agreement number 101096909.```
+6 −135
Original line number Original line Diff line number Diff line
# Common API Framework (CAPIF)
# Common API Framework (CAPIF)


- [Common API Framework (CAPIF)](#common-api-framework-capif)
- [Common API Framework (CAPIF)](#common-api-framework-capif)
- [CAPIF\_API\_Services](#capif_api_services)
- [3GPP Common API Framework OpenCAPIF implementation](#3gpp-common-api-framework-opencapif-implementation)
- [Documentation](#documentation)
- [Documentation](#documentation)
- [Install and Run](#install-and-run)
- [Install and Run](#install-and-run)
  - [How to run CAPIF services in this Repository](#how-to-run-capif-services-in-this-repository)
    - [Run All CAPIF Services locally with Docker images](#run-all-capif-services-locally-with-docker-images)
    - [Run All CAPIF Services locally with Docker images and deploy monitoring stack](#run-all-capif-services-locally-with-docker-images-and-deploy-monitoring-stack)
    - [Run each service using Docker](#run-each-service-using-docker)
    - [Run each service using Python](#run-each-service-using-python)
- [Important urls:](#important-urls)
  - [Mongo CAPIF's DB Dashboard](#mongo-capifs-db-dashboard)
  - [Mongo Register's DB Dashboard](#mongo-registers-db-dashboard)
- [FAQ Documentation](#faq-documentation)
- [FAQ Documentation](#faq-documentation)






# CAPIF_API_Services
# 3GPP Common API Framework OpenCAPIF implementation
This repository has the python-flask Mockup servers created with openapi-generator related with CAPIF APIS defined here:
This repository includes all services developed using Python Flask servers, created with openapi-generator with swagger definitions on [Open API Descriptions of 3GPP 5G APIs] for release 18 of Technical Specifications.
[Open API Descriptions of 3GPP 5G APIs]


# Documentation
# Documentation


Please refer to [OCF Documentation] for more detailed information.
Please refer to [OCF Documentation] for more detailed information.



# Install and Run
# Install and Run


## How to run CAPIF services in this Repository
Please refer to [OCF How to run] for more detailed information.
Capif services are developed under /service/ folder.

### 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 all CAPIF APIs locally using docker and docker-compose you can execute:
```
cd services/

./run.sh
```
This will build and run all services using docker images, including mongodb and nginx locally and in background, and import ca.crt to nginx.

Nginx deployed by default use **capifcore** hostname, but can add a parameter when run.sh is executed setting a different hostname, for example,
```
./run.sh -c openshift.evolved-5g.eu
```

Also you can run monitoring just using option -m true, for example:
```
./run.sh -m true
./run.sh -m true -c openshift.evolved-5g.eu
```

If you want to check if all CAPIF services are running properly in local machine after execute run.sh, we can use:
```
./check_services_are_running.sh
```
This shell script will return 0 if all services are running properly.

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
```
./clean_capif_docker_services.sh -h

Usage: clean_capif_docker_services.sh <options>
       -c : clean capif services
       -v : clean vault service
       -r : clean register service
       -m : clean monitoring service
       -a : clean all services
       -h : show this help
``````

This shell script will remove and clean all CAPIF services started previously with run.sh

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.
Usage: ./show_logs.sh <options>
       -c : Show capif services
       -v : Show vault service
       -r : Show register service
       -m : Show monitoring service
       -a : Show all services
       -f : Follow log output
       -h : Show this help
```
You can also use option -f in order to live follow log output

### 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.

To deploy CAPIF together with the monitoring stack, it is only necessary to execute the following.

```
./run.sh -m true
```

After they have been built, the different panels can be consulted in Grafana at the url

```
http://localhost:3000
```

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:
```
cd <Service>
docker build -t capif_security .
docker run -p 8080:8080 capif_security
```

### Run each service using Python

Run using python
```
cd <Service>
pip3 install -r requirements.txt
python3 -m <service>
```

# Important urls:

## Mongo CAPIF's DB Dashboard
```
http://localhost:8082/ (if accessed from localhost) 

or

http://<Mongo CAPIF Express Host IP>:8082/ (if accessed from another host)
```

## Mongo Register's DB Dashboard
```
http://localhost:8083/ (if accessed from localhost) 

or

http://<Mongo Register Express Host IP>:8083/ (if accessed from another host)
```



# FAQ Documentation
# FAQ Documentation


@@ -159,4 +29,5 @@ Frequently asked questions can be found here: [FAQ Directory]
[Testing with Robot Framework]: ./docs/testing_with_robot/README.md  "Testing with Robot Framework"
[Testing with Robot Framework]: ./docs/testing_with_robot/README.md  "Testing with Robot Framework"
[FAQ Directory]: https://ocf.etsi.org/documentation/latest/FAQ/ "FAQ Url"
[FAQ Directory]: https://ocf.etsi.org/documentation/latest/FAQ/ "FAQ Url"
[OCF Documentation]: https://ocf.etsi.org/documentation/latest/ "OCF Documentation"
[OCF Documentation]: https://ocf.etsi.org/documentation/latest/ "OCF Documentation"
[OCF How to run]: https://ocf.etsi.org/documentation/latest/gettingstarted/howtorun/ "How to run"
+4 −0
Original line number Original line Diff line number Diff line
@@ -68,6 +68,10 @@ dependencies:
    version: "*"
    version: "*"
  - name: renderer
  - name: renderer
    version: "*"
    version: "*"
  - name: celery-beat
    version: "*"
  - name: celery-worker
    version: "*"
  - name: "tempo"
  - name: "tempo"
    condition: tempo.enabled
    condition: tempo.enabled
    repository: "https://grafana.github.io/helm-charts"
    repository: "https://grafana.github.io/helm-charts"
Loading