mirror of
https://github.com/fluencelabs/examples
synced 2024-12-04 19:20:17 +00:00
replace dist with remote
This commit is contained in:
parent
e9420bd3ae
commit
8e472d56ce
25
.github/workflows/check-deploy.yml
vendored
25
.github/workflows/check-deploy.yml
vendored
@ -22,34 +22,34 @@ jobs:
|
||||
~/.cargo/bin
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
|
||||
- run: docker run -d --rm -e RUST_LOG="info" --name fluence -p 5001:5001 -p 1210:1210 -p 4310:4310 fluencelabs/fluence -t 1210 -w 4310 -k gKdiCSUr1TFGFEgu2t8Ch1XEUsrN5A2UfBLjSZvfci9SPR3NvZpACfcpPGC3eY4zma1pk7UvYv5zb1VjvPHwCjj --local
|
||||
|
||||
|
||||
- name: Download marine
|
||||
run: sudo bash $GITHUB_WORKSPACE/.github/download_marine.sh
|
||||
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
rustup toolchain install nightly-2021-04-24-x86_64-unknown-linux-gnu
|
||||
rustup default nightly-2021-04-24-x86_64-unknown-linux-gnu
|
||||
rustup target add wasm32-wasi --toolchain nightly-2021-04-24-x86_64-unknown-linux-gnu
|
||||
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-v1-node-16-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-v1-node-16
|
||||
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-v1-node-16-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-v1-node-16
|
||||
|
||||
- name: Setup Node.js 16
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 16
|
||||
|
||||
- run: npm install -g @fluencelabs/aqua@0.6.4-283
|
||||
|
||||
- name: "Wait for aqua-ipfs service to start"
|
||||
run: |
|
||||
run: |
|
||||
set -o errexit -o nounset -o pipefail
|
||||
set -x
|
||||
while true; do
|
||||
@ -87,6 +87,5 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
aqua dist remove --addr $NODE --sk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo= --id "$SERVICE_ID"
|
||||
remove --addr $NODE --sk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo= --id "$SERVICE_ID"
|
||||
working-directory: marine-examples/call_parameters
|
||||
|
||||
|
@ -238,7 +238,7 @@ That is, `...\"chainId\":\"eip155:3\",\"blockNumber\":11266361,\"blockTimestamp\
|
||||
Looks like our services are working and ready for deployment to the `stage` network. We use the `aqua` command line tool to do so:
|
||||
|
||||
```bash
|
||||
aqua dist deploy \
|
||||
aqua remote deploy \
|
||||
--addr /dns4/stage.fluence.dev/tcp/19004/wss/p2p/12D3KooWJ4bTHirdTFNZpCS72TAzwtdmavTBkkEXtzo6wHL25CtE \
|
||||
--data-path configs/ceramic_adapter_deploy_cfg.json \
|
||||
--service ceramic-service
|
||||
|
@ -114,7 +114,7 @@ Any one of the peers will do and we can deploy our services with the `aqua` cli
|
||||
|
||||
```text
|
||||
# deploy greeting service
|
||||
aqua dist deploy \
|
||||
aqua remote deploy \
|
||||
--addr /dns4/kras-03.fluence.dev/tcp/19001/wss/p2p/12D3KooWJd3HaMJ1rpLY1kQvcjRPEvnDwcXrH8mJvk7ypcZXqXGE \
|
||||
--data-path configs/echo_greeter_deploy_cfg.json \
|
||||
--service echo-greeter
|
||||
@ -139,7 +139,7 @@ and
|
||||
|
||||
```text
|
||||
# deploy echo service
|
||||
aqua dist deploy \
|
||||
aqua remote deploy \
|
||||
--addr /dns4/kras-03.fluence.dev/tcp/19001/wss/p2p/12D3KooWJd3HaMJ1rpLY1kQvcjRPEvnDwcXrH8mJvk7ypcZXqXGE \
|
||||
--data-path configs/echo_greeter_deploy_cfg.json \
|
||||
--service echo-service
|
||||
|
@ -355,7 +355,7 @@ func rpc_foo(network_id: string, block_ref:string, node_string, service_id: stri
|
||||
Before we can use our Fluence NEAR adapter, we need to deploy our Wasm modules to one or more host peers. We can do that with [Aqua CLI](https://doc.fluence.dev/aqua-book/aqua-cli):
|
||||
|
||||
```bash
|
||||
aqua dist deploy \
|
||||
aqua remote deploy \
|
||||
--addr /dns4/kras-04.fluence.dev/tcp/19001/wss/p2p/12D3KooWFEwNWcHqi9rtsmDhsYcDbRUCDXH84RC4FW6UfsFWaoHi \
|
||||
--data-path configs/near_deploy_cfg.json \
|
||||
--service near-adapter
|
||||
|
@ -163,7 +163,7 @@ aqua env
|
||||
Pick any of the peer ids from the listed peers to deploy your services. Let's say we use peer id `12D3KooWFEwNWcHqi9rtsmDhsYcDbRUCDXH84RC4FW6UfsFWaoHi`:
|
||||
|
||||
```bash
|
||||
aqua dist deploy \
|
||||
aqua remote deploy \
|
||||
--addr /dns4/kras-04.fluence.dev/tcp/19001/wss/p2p/12D3KooWFEwNWcHqi9rtsmDhsYcDbRUCDXH84RC4FW6UfsFWaoHi \
|
||||
--data-path configs/ts_oracle_deploy_cfg.json \
|
||||
--service price-getter
|
||||
@ -191,7 +191,7 @@ Your peerId: 12D3KooWBK198aAioxPsiBDXBkkXkaQfkqCkLxTN3oZXVTN4B2em
|
||||
and to deploy the mean service:
|
||||
|
||||
```bash
|
||||
aqua dist deploy \
|
||||
aqua remote deploy \
|
||||
--addr /dns4/kras-04.fluence.dev/tcp/19001/wss/p2p/12D3KooWFEwNWcHqi9rtsmDhsYcDbRUCDXH84RC4FW6UfsFWaoHi \
|
||||
--data-path configs/ts_oracle_deploy_cfg.json \
|
||||
--service mean-service
|
||||
|
@ -56,7 +56,7 @@ cargo +nightly test --release
|
||||
and deploy the service to a peer of your choice with the `aqua` cli tool:
|
||||
|
||||
```bash
|
||||
aqua dist deploy \
|
||||
aqua remote deploy \
|
||||
--addr /dns4/kras-06.fluence.dev/tcp/19001/wss/p2p/12D3KooWDUszU2NeWyUVjCXhGEt1MoZrhvdmaQQwtZUriuGN1jTr \
|
||||
--data-path configs/ts_oracle_deploy_cfg.json \
|
||||
--service ts-oracle
|
||||
|
@ -744,12 +744,12 @@ In each of the examples we created modules and services configurations and teste
|
||||
|
||||
Before we begin, you need to have the `aqua` tool installed. See the [Tools documentation](https://doc.fluence.dev/docs/knowledge_tools) for more information.
|
||||
|
||||
We use the `aqua dist deploy` command to do our bidding:
|
||||
We use the `aqua remote deploy` command to do our bidding:
|
||||
|
||||
```zsh
|
||||
aqua dist deploy --help
|
||||
aqua remote deploy --help
|
||||
|
||||
Usage: aqua dist deploy [--timeout <integer>] [--log-level <string>] --addr <string> [--on <string>] [--print-air] [--sk <string>] --data-path <string> --service <string>
|
||||
Usage: aqua remote deploy [--timeout <integer>] [--log-level <string>] --addr <string> [--on <string>] [--print-air] [--sk <string>] --data-path <string> --service <string>
|
||||
|
||||
Deploy a service onto a remote peer
|
||||
|
||||
@ -779,13 +779,13 @@ Aside from our modules and configuration, we also want to supply the peer id of
|
||||
To create our greeting service on peer `12D3KooWKnEqMfYo9zvfHmqTLpLdiHXPe4SVqUWcWHDJdFGrSmcA`:
|
||||
|
||||
```zsh
|
||||
aqua dist deploy \
|
||||
aqua remote deploy \
|
||||
--addr /dns4/kras-01.fluence.dev/tcp/19001/wss/p2p/12D3KooWKnEqMfYo9zvfHmqTLpLdiHXPe4SVqUWcWHDJdFGrSmcA
|
||||
--data-path configs/greeting_deploy_cfg.json \
|
||||
--service my-greeting-service
|
||||
```
|
||||
|
||||
To recap the `aqua dist deploy` command: We specify the
|
||||
To recap the `aqua remote deploy` command: We specify the
|
||||
|
||||
1. Peer id with the `addr` flag
|
||||
2. Config file location with the `data-path` flag
|
||||
|
@ -16,5 +16,5 @@ test -f "$WASM" || echo >&2 "Couldn't find $WASM"
|
||||
|
||||
# create a service from that .wasm
|
||||
CONFIG="config.json"
|
||||
SERVICE_ID=$(aqua dist deploy --sk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo= --data-path config.json --service call_parameters --addr "$NODE" | tail -n 1 | tr -d \")
|
||||
SERVICE_ID=$(aqua remote deploy --sk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo= --data-path config.json --service call_parameters --addr "$NODE" | tail -n 1 | tr -d \")
|
||||
echo $SERVICE_ID
|
||||
|
@ -1,4 +1,4 @@
|
||||
aqua dist deploy \
|
||||
aqua remote deploy \
|
||||
--addr /dns4/kras-06.fluence.dev/tcp/19001/wss/p2p/12D3KooWDUszU2NeWyUVjCXhGEt1MoZrhvdmaQQwtZUriuGN1jTr \
|
||||
--data-path deployment_cfg.json \
|
||||
--service url-downloader
|
||||
|
6
package-lock.json
generated
6
package-lock.json
generated
@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "examples",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash -o errexit -o nounset -o pipefail
|
||||
|
||||
aqua dist deploy \
|
||||
aqua remote deploy \
|
||||
--addr /dns4/kras-04.fluence.dev/tcp/19001/wss/p2p/12D3KooWFEwNWcHqi9rtsmDhsYcDbRUCDXH84RC4FW6UfsFWaoHi \
|
||||
--data-path configs/ts_oracle_deploy_cfg.json \
|
||||
--service ts-oracle \
|
||||
|
Loading…
Reference in New Issue
Block a user