FWB Docker

Quick start

  1. Download and install Docker Desktop (if not already installed)

  2. Start a Windows Command Prompt or a bash shell. Run the following command to download the latest image:

docker pull sdmxio/fwb:latest
  1. In the same window or bash shell, run the following command to create a container called ‘fwb’ and start it:
docker run -p8080:8080 --name fwb sdmxio/fwb:latest
  1. Navigate to http://localhost:8080

  2. When finished, stop the container

docker stop fwb

Overview

Connections to remote registries - the properties file

To edit the properties file, use the following command when the container is running. When editing is complete save and the restart the container so the configuration file can be read. The editor is a standard vim editor and uses the vim commands, to edit and save the document.

docker exec -it fwb /usr/bin/vi /root/MetadataTechnology/FusionRegistry/fwb_config.json

Restart the container

docker restart fwb 

Example Config

{
    "Properties": {
        server.url: "http://localhost:8080/fwb"
    },
    "Environments": [
        {
            "id": "BIS",
            "name" : "Bank for International Settlements",
            "api": {
                "query": "https://stats.bis.org/api/v1",
                "version": "1.5.0"
            },
            "auth": "NONE",
            "locale": ["en"],
            "format": "fusion"
        },{
            "id": "DOT_STAT",
            "name" : "Dot Stat Test",
            "api": {
                "query": "https://nsi-demo-reset.siscc.org/rest",
                "persist": "https://nsi-demo-reset.siscc.org/rest/structure",
                "delete": "https://nsi-demo-stable.siscc.org/rest/structure",
                "version": "1.5.0"
            },
            "agencies": ["SDMX", "METATECH"],
            "auth": "OIDC_PKCE",
            "locale": ["en", "fr"],
            "oidc": {
                "config": "https://keycloak.siscc.org/auth/realms/OECD/.well-known/openid-configuration",
                "clientId": "app"
            },
            "format": "mlv2.1"
        },
        {
            "id": "DOT_STAT_STABLE",
            "name" : "Dot Stat Stable",
            "api": {
                "query": "https://nsi-demo-stable.siscc.org/rest",
                "persist": "https://nsi-demo-stable.siscc.org/rest/structure",
                "delete": "https://nsi-demo-stable.siscc.org/rest/structure",
                "version": "1.5.0"
            },
            "auth": "OIDC_PKCE",
            "oidc": {
                "config": "https://keycloak.siscc.org/auth/realms/OECD/.well-known/openid-configuration",
                "clientId": "app"
            },
            "locale": ["en", "fr"],
            "format": "mlv2.1"
        },
        {
            "id": "ECB",
            "name" : "European Central Bank",
            "api": {
                "query": "https://sdw-wsrest.ecb.europa.eu/service",
                "version": "1.5.0"
            },
            "auth": "NONE",
            "locale": ["en"],
            "format": "mlv2.1"
        },
        {
            "id": "GLOBAL_REGISTRY",
            "name" : "Global Registry",
            "api": {
                "query": "https://registry.sdmx.org/ws/public/sdmxapi/rest",
                "version": "1.5.0"
            },
            "auth": "BASIC",
            "locale": ["en", "fr"],
            "format": "mlv2.1"
        },
        {
            "id": "ILO",
            "api": {
                "query": "https://www.ilo.org/sdmx/rest",
                "version": "1.5.0"
            },
            "auth": "BASIC",
            "locale": ["en", "fr"],
            "format": "mlv2.1"
    }
        ,
        {
            "id": "NSO_TH",
            "name" : "Thailand NSO",
            "api": {
                "query": "https://sdmx.nso.go.th/FusionMetadataRegistry/sdmx/v2",
                "version": "2.0.0"
            },
            "auth": "BASIC",
            "locale": ["en", "th"],
            "format": "fusion"
    },{
            "id": "UNICEF",
            "name" : "Unicef",
            "api": {
                "query": "https://sdmx.data.unicef.org/ws/public/sdmxapi/rest",
                "version": "1.5.0"
            },
            "auth": "NONE",
            "locale": ["en"],
            "format": "fusion"
        },        
    ]
}

To start the Fusion Workbench and persist the properties to a local mounted directory

docker run -p8080:8080 --name fwb -d -v <LOCAL-PATH>:/root/MetadataTechnology/FusionRegistry  sdmxio/fwb:latest

The command above will mount the LOCAL-PATH on the system that starts the docker container, this path will be bound to the location where the Fusion Workbench reads the properties file “fwb_config.json”. If there is no file in the LOCAL-PATH called “fwb_config.json”, the file will be created and left blank, container won’t start. If the “fwb_config.json” file is present it will be read when the container starts.

To examine the log output from the container use the following command

docker logs fwb

About this image

This images contains the Fusion Workbench running on tomcat 9.0 and includes VIM to allow editing of the properties file

Troubleshooting

If the container fails to start or terminates under load when running on Windows, it is likely that insufficient memory resources have been allocated. Open Docker Settings and look for Advanced under Resources. In some circumstances, Docker puts a limit of 2GB on memory which is insufficient. Increase memory to a minimum of 4GB. There’s more on configuring Docker Desktop for Windows in the Docker documentation.

License

Web application: Public License Agreement Source code: Apache 2.0 License Agreement Copyright Bank for International Settlements 2023 all rights reserved.

By using the software you agree to the license terms.