Commit 6f74a5b8 authored by Stavros-Anastasios Charismiadis's avatar Stavros-Anastasios Charismiadis
Browse files

Fix yamls and bash script

parent d4539635
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -2,20 +2,13 @@

## Description

For the sake of SNS4SNS 2026 OCF tutorial, this project is provided to work as an API Exposing Function (AEF).
For the SNS4SNS 2026 OCF tutorial, this project is provided to work as an API Exposing Function (AEF).
The service is a simple Flask server, hosting a GET request.

```
GET /hello
```

The API of this AEF, for the sake of the tutorial, will be accessible via the [CAPIF Provider Gateway](https://labs.etsi.org/rep/ocf/provider-gateway)
The neccesary files to configure the Provider Gateway with the AEF API are:
- northbound.yaml
- southbound.yaml

First fill the "..." of the above fiels with the correct information and then use then to Provider Gateway.

### Prerequisites
- Docker (tested in version 29.1.3)

@@ -24,8 +17,15 @@ First fill the "..." of the above fiels with the correct information and then us
To deploy the service, run the following command in an Ubuntu or MacOS terminal.

```
 ./start_dummy_api.sh <Participant name or username>
 ./start_dummy_api.sh <Username provided by organizers>
```

The above command will deploy a docker container with the name or username inserted

The API of this AEF, during the tutorial, has to be accessible via the [CAPIF Provider Gateway](https://labs.etsi.org/rep/ocf/provider-gateway)
The neccesary files to configure the Provider Gateway with the AEF API are:
- northbound.yaml
- southbound.yaml

First fill the fields starting with <> with the correct information and then copy them to the Provider Gateway folder.
+0 −1
Original line number Diff line number Diff line
@@ -13,6 +13,5 @@ def hello():
    return jsonify(f"Hello, {app_name}!")

if __name__ == "__main__":
    # The port is often set via environment variable in production
    port = int(os.getenv("PORT", 8000))
    app.run(host='0.0.0.0', port=port)
 No newline at end of file
+13 −13
Original line number Diff line number Diff line
northbound:
  ip: ...
  port: ...
  ip: <IP of workstation (in the internal network) e.g. 192.168.68.51>
  port: <8088 suggested>
  opencapif_sdk_configuration:
    capif_host: "..."
    register_host: "..."
    capif_host: "<CAPIF domain name or IP>"
    register_host: "<CAPIF domain name or IP>"
    capif_https_port: "443"
    capif_register_port: "8084"
    capif_username: "..."
    capif_password: "..."
    capif_username: "<Username provided by hosts>"
    capif_password: "<Password provided by hosts>"
    debug_mode: "True"
    provider:
      cert_generation:
        csr_common_name: "..."
        csr_organizational_unit: "..."
        csr_organization: "..."
        csr_locality: "..."
        csr_state_or_province_name: "..."
        csr_country_name: "..."
        csr_email_address: "..."
        csr_country_name: "<Two letter abbreviation e.g. FR>"
        csr_state_or_province_name: "<Full state name e.g. Alpes-Maritimes>"
        csr_locality: "<Full city name e.g. Sophia-Antipolis>"
        csr_organization: "<Full legal company or Personal name e.g. ETSI>"
        csr_organizational_unit: "<Branch of organization e.g. Research and Development>"
        csr_common_name: "<FQDN of your domain e.g. etsi.org>"
        csr_email_address: "<Valid email address e.g. info@etsi.org>"
      supported_features: "0"
      apiSuppFeats: "0"
  openapi:
+1 −1
Original line number Diff line number Diff line
southbound:
  ip: ...
  ip: <IP of workstation (in the internal network) e.g. 192.168.68.51>
  port: 8000
  type: REST
  authentication_method: "JWT Bearer Token"
+1 −1
Original line number Diff line number Diff line
@@ -2,4 +2,4 @@

echo "Create dummy service for user: $1"
docker build -t flask-hello-service .
docker run --name "$1" -p 8000:8000 -e APP_NAME=$1 flask-hello-service
 No newline at end of file
docker run -it --rm --name "$1" -p 8000:8000 -e APP_NAME=$1 flask-hello-service
 No newline at end of file