diff --git a/marine-examples/url-downloader/README.md b/marine-examples/url-downloader/README.md index 9dc96f1..1ace332 100644 --- a/marine-examples/url-downloader/README.md +++ b/marine-examples/url-downloader/README.md @@ -14,5 +14,17 @@ Example that shows how to work with disk access and how to link several Wasm mod aqua run \ --addr /dns4/kras-06.fluence.dev/tcp/19001/wss/p2p/12D3KooWDUszU2NeWyUVjCXhGEt1MoZrhvdmaQQwtZUriuGN1jTr \ -i download_url.aqua \ - -f'download("https://fluence.network/img/svg/logo_new.svg", "logo.svg", "12D3KooWDUszU2NeWyUVjCXhGEt1MoZrhvdmaQQwtZUriuGN1jTr", "e693d1c3-3fbc-4ccd-8eae-1ba9c767e2f5")' + -f'download("https://fluence.network/img/svg/logo_new.svg", "logo.svg", "", "")' ``` +Please note that the `` is a peer where you deployed your service to using the `deploy.sh` script and the `` is one you get after successfully deploying you service on the peer, e.g.: + +``` +... +Now time to make a blueprint... +Blueprint id: +d0a0c3cff0b371f833918ceb7dccbb8e38e3847bc7bf5d35a0e730f24568e13e +And your service id is: +"46477b20-c061-46ea-89bc-25906ad543d6" +``` + +For more in depth reading on the example please refer to the [Marine Examples Readme](../README.md) \ No newline at end of file diff --git a/marine-examples/url-downloader/deploy.sh b/marine-examples/url-downloader/deploy.sh index 020db98..ae5f477 100755 --- a/marine-examples/url-downloader/deploy.sh +++ b/marine-examples/url-downloader/deploy.sh @@ -1,13 +1,33 @@ #!/usr/bin/env bash set -o errexit -o nounset -o pipefail +function is_installed { + if command -v "$1" >/dev/null 2>&1; then + echo "${1} is installed" + else + echo "${1} not found, please install it" + echo "exiting..." + exit 1 + fi +} + +echo "building wasm modules..." # build wasms ./build.sh ( + is_installed jq + is_installed aqua + + echo "generating keys..." + + SK=$(aqua key create | jq -r ."secretKey") + + echo "deploying the url-downloader service" aqua remote deploy_service \ --addr /dns4/kras-05.fluence.dev/tcp/19001/wss/p2p/12D3KooWCMr9mU894i8JXAFqpgoFtx6qnV1LFPSfVc3Y34N4h4LS \ --config-path deployment_cfg.json \ + --sk ${SK} \ --service url-downloader )