Skip to content

Local testing of packager service with catalogues

Manuel Peuster edited this page Apr 12, 2019 · 3 revisions

Local Packager Testing

#5gtango

Terminal 1: Catalogue

git clone https://github.com/sonata-nfv/tng-cat.git
cd tng-cat
docker-compose up

Terminal 2: Run packager in service mode

git clone https://github.com/sonata-nfv/tng-sdk-package.git
cd tng-sdk-package
# build Docker container
pipeline/build/build.sh
# get IP of your machine on which the dockers run (eg. eth0)
ifconfig eth0
# start packager service and point to catalogue
docker run --rm -it -p 5099:5099 --name tng-sdk-package --env CATALOGUE_URL='http://131.234.242.136:4011/catalogues/api/v2' registry.sonata-nfv.eu:5000/tng-sdk-package

Terminal 3: Push the package

# push a pakcage (you can also use tng-cli)
curl -X POST -v -H "Content-Type: multipart/form-data" \
    -F package="@misc/5gtango-ns-package-example.tgo" \
    http://127.0.0.1:5099/api/v1/packages
    
# get status of unpackaging process
curl -X GET http://127.0.0.1:5099/api/v1/packages/status