From 442ef20eb32c29a909339ad4d7e9d20933a304a5 Mon Sep 17 00:00:00 2001 From: boneyard93501 Date: Fri, 18 Jun 2021 15:26:28 +0000 Subject: [PATCH 01/10] GitBook: [builtins] 57 pages and 20 assets modified --- ..._fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (1).png} | Bin ..._fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (2).png} | Bin ..._fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (3).png} | Bin ..._null_6 (1) (2) (2) (3) (3) (3) (3) (3) (1).png} | Bin ..._null_6 (1) (2) (2) (3) (3) (3) (3) (3) (2).png} | Bin ..._null_6 (1) (2) (2) (3) (3) (3) (3) (3) (3).png} | Bin ...l_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (1).png} | Bin ...l_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (2).png} | Bin ...l_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (3).png} | Bin ...l_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4).png} | Bin SUMMARY.md | 1 + .../hll/knowledge_aquamarine_air.md | 2 +- tutorials_tutorials/add-your-own-builtin.md | 2 ++ 13 files changed, 4 insertions(+), 1 deletion(-) rename .gitbook/assets/{air_fold_4 (1) (2) (2) (3) (3) (3) (3) (1).png => air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (1).png} (100%) rename .gitbook/assets/{air_fold_4 (1) (2) (2) (3) (3) (3) (3) (2).png => air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (2).png} (100%) rename .gitbook/assets/{air_fold_4 (1) (2) (2) (3) (3) (3) (3).png => air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (3).png} (100%) rename .gitbook/assets/{air_null_6 (1) (2) (2) (3) (3) (3) (3) (1).png => air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (1).png} (100%) rename .gitbook/assets/{air_null_6 (1) (2) (2) (3) (3) (3) (3) (2).png => air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (2).png} (100%) rename .gitbook/assets/{air_null_6 (1) (2) (2) (3) (3) (3) (3).png => air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (3).png} (100%) rename .gitbook/assets/{air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (1).png => air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (1).png} (100%) rename .gitbook/assets/{air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (2).png => air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (2).png} (100%) rename .gitbook/assets/{air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (3).png => air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (3).png} (100%) rename .gitbook/assets/{air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4).png => air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4).png} (100%) create mode 100644 tutorials_tutorials/add-your-own-builtin.md diff --git a/.gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (1).png b/.gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (1).png similarity index 100% rename from .gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (1).png rename to .gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (1).png diff --git a/.gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (2).png b/.gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (2).png similarity index 100% rename from .gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (2).png rename to .gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (2).png diff --git a/.gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3).png b/.gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (3).png similarity index 100% rename from .gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3).png rename to .gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (3).png diff --git a/.gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (1).png b/.gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (1).png similarity index 100% rename from .gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (1).png rename to .gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (1).png diff --git a/.gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (2).png b/.gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (2).png similarity index 100% rename from .gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (2).png rename to .gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (2).png diff --git a/.gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3).png b/.gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (3).png similarity index 100% rename from .gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3).png rename to .gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (3).png diff --git a/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (1).png b/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (1).png similarity index 100% rename from .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (1).png rename to .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (1).png diff --git a/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (2).png b/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (2).png similarity index 100% rename from .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (2).png rename to .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (2).png diff --git a/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (3).png b/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (3).png similarity index 100% rename from .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (3).png rename to .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (3).png diff --git a/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4).png b/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4).png similarity index 100% rename from .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4).png rename to .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4).png diff --git a/SUMMARY.md b/SUMMARY.md index 5d6e7c9..086dc88 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -39,6 +39,7 @@ * [Tutorials](tutorials_tutorials/README.md) * [Deploy A Local Fluence Node](tutorials_tutorials/tutorial_run_local_node.md) * [Deploy A Private Fluence Network](tutorials_tutorials/running-a-fluence-network.md) + * [Add Your Own Builtin](tutorials_tutorials/add-your-own-builtin.md) * [TrustGraph In Action](tutorials_tutorials/tutorial_trustgraph.md) * [Securing Services](tutorials_tutorials/securing-services.md) * [Developing a Frontend Application with JS-SDK](tutorials_tutorials/developing-a-frontend-application-with-js-sdk.md) diff --git a/knowledge_knowledge/knowledge_aquamarine/hll/knowledge_aquamarine_air.md b/knowledge_knowledge/knowledge_aquamarine/hll/knowledge_aquamarine_air.md index 24d8bb8..d9a1d24 100644 --- a/knowledge_knowledge/knowledge_aquamarine/hll/knowledge_aquamarine_air.md +++ b/knowledge_knowledge/knowledge_aquamarine/hll/knowledge_aquamarine_air.md @@ -23,7 +23,7 @@ AIR instructions are intended to launch the execution of a service method as fol 4. The arguments specified by the argument list are passed to the method 5. The result of the method returned under the name output name -**Figure 2: Sequential Instruction** ![Execution](../../../.gitbook/assets/air_sequential_2%20%281%29%20%281%29%20%281%29%20%281%29%20%281%29%20%282%29%20%283%29%20%284%29%20%282%29.png) +**Figure 2: Sequential Instruction** ![Execution](../../../.gitbook/assets/air_sequential_2%20%281%29%20%281%29%20%281%29%20%281%29%20%281%29%20%282%29%20%283%29%20%284%29%20%284%29%20%282%29.png) The _**seq**_ instruction takes two instructions at most as its arguments and executes them sequentially, one after the other. diff --git a/tutorials_tutorials/add-your-own-builtin.md b/tutorials_tutorials/add-your-own-builtin.md new file mode 100644 index 0000000..f8afaeb --- /dev/null +++ b/tutorials_tutorials/add-your-own-builtin.md @@ -0,0 +1,2 @@ +# Add Your Own Builtin + From 240de99f24e98596aff453211f6578292bb2c77a Mon Sep 17 00:00:00 2001 From: boneyard93501 Date: Fri, 18 Jun 2021 15:26:43 +0000 Subject: [PATCH 02/10] GitBook: [builtins] 2 pages modified --- .../hll/knowledge_aquamarine_air.md | 2 +- tutorials_tutorials/add-your-own-builtin.md | 63 +++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/knowledge_knowledge/knowledge_aquamarine/hll/knowledge_aquamarine_air.md b/knowledge_knowledge/knowledge_aquamarine/hll/knowledge_aquamarine_air.md index d9a1d24..24d8bb8 100644 --- a/knowledge_knowledge/knowledge_aquamarine/hll/knowledge_aquamarine_air.md +++ b/knowledge_knowledge/knowledge_aquamarine/hll/knowledge_aquamarine_air.md @@ -23,7 +23,7 @@ AIR instructions are intended to launch the execution of a service method as fol 4. The arguments specified by the argument list are passed to the method 5. The result of the method returned under the name output name -**Figure 2: Sequential Instruction** ![Execution](../../../.gitbook/assets/air_sequential_2%20%281%29%20%281%29%20%281%29%20%281%29%20%281%29%20%282%29%20%283%29%20%284%29%20%284%29%20%282%29.png) +**Figure 2: Sequential Instruction** ![Execution](../../../.gitbook/assets/air_sequential_2%20%281%29%20%281%29%20%281%29%20%281%29%20%281%29%20%282%29%20%283%29%20%284%29%20%282%29.png) The _**seq**_ instruction takes two instructions at most as its arguments and executes them sequentially, one after the other. diff --git a/tutorials_tutorials/add-your-own-builtin.md b/tutorials_tutorials/add-your-own-builtin.md index f8afaeb..0e0b839 100644 --- a/tutorials_tutorials/add-your-own-builtin.md +++ b/tutorials_tutorials/add-your-own-builtin.md @@ -1,2 +1,65 @@ # Add Your Own Builtin + + +If you want to have a service that available out-of-the-box with startup script and scheduled scripts, you can use `builtins deployer` feature. It will upload modules, deploy service, run init script and schedule others. +You should put your service files in the corresponding folder specified in config as `builtins_base_dir`. + +### Builtins directory structure + +```text +-- builtins + -- {service_alias} + -- scheduled + -- {script_name}_{interval_in_seconds}.air [optional] + -- blueprint.json + -- on_start.air [optional] + -- on_start.json [optional] + -- {module1_name}.wasm + -- {module1_name}_config.json + -- {module2_name}.wasm + -- {module2_name}_config.json + ... +``` + +In blueprint you can specify dependencies either with name or hashes but .wasm files and config should have corresponding names. `blieprint.json` example: + +```javascript +{ + "name": "aqua-dht", + "dependencies": [ + "hash:558a483b1c141b66765947cf6a674abe5af2bb5b86244dfca41e5f5eb2a86e9e", + "name:aqua-dht" + ] +} +``` + +So modules and configs names should look like this: + +```text +-- aqua-dht.wasm +-- aqua-dht_config.json +-- 558a483b1c141b66765947cf6a674abe5af2bb5b86244dfca41e5f5eb2a86e9e.wasm +-- 558a483b1c141b66765947cf6a674abe5af2bb5b86244dfca41e5f5eb2a86e9e_config.json +``` + +`on_start.air` is optional and can contain some startup script and you can specify necessary variables in `on_start.json`. It will be executed only once after service deployment or node restart. + +`on_start.json` example: + +```javascript +{ + "variable1" : "some_string", + "variable2" : 5, +} +``` + +`on_start.air` example: + +```text +(seq + (call relay ("some_service_alias" "some_func1") [variable1] result) + (call relay ("some_service_alias" "some_func2") [variable2 result]) +) +``` + From 762dd70143624bedf43d008559936e1fb10fdb33 Mon Sep 17 00:00:00 2001 From: boneyard93501 Date: Fri, 18 Jun 2021 18:29:00 +0000 Subject: [PATCH 03/10] GitBook: [builtins] 57 pages and 20 assets modified --- ...) (2) (2) (3) (3) (3) (3) (3) (3) (1).png} | Bin ...) (2) (2) (3) (3) (3) (3) (3) (3) (2).png} | Bin ...) (2) (2) (3) (3) (3) (3) (3) (3) (3).png} | Bin ...) (2) (2) (3) (3) (3) (3) (3) (3) (1).png} | Bin ...) (2) (2) (3) (3) (3) (3) (3) (3) (2).png} | Bin ...) (2) (2) (3) (3) (3) (3) (3) (3) (3).png} | Bin ...) (1) (1) (1) (2) (3) (4) (4) (4) (1).png} | Bin ...) (1) (1) (1) (2) (3) (4) (4) (4) (2).png} | Bin ...) (1) (1) (1) (2) (3) (4) (4) (4) (3).png} | Bin ...) (1) (1) (1) (2) (3) (4) (4) (4) (4).png} | Bin SUMMARY.md | 2 +- .../hll/knowledge_aquamarine_air.md | 2 +- tutorials_tutorials/add-your-own-builtin.md | 44 ++++++++++++++++-- 13 files changed, 41 insertions(+), 7 deletions(-) rename .gitbook/assets/{air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (1).png => air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (3) (1).png} (100%) rename .gitbook/assets/{air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (2).png => air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (3) (2).png} (100%) rename .gitbook/assets/{air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3).png => air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (3) (3).png} (100%) rename .gitbook/assets/{air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (1).png => air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (3) (1).png} (100%) rename .gitbook/assets/{air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (2).png => air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (3) (2).png} (100%) rename .gitbook/assets/{air_null_6 (1) (2) (2) (3) (3) (3) (3) (3).png => air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (3) (3).png} (100%) rename .gitbook/assets/{air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (1).png => air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4) (1).png} (100%) rename .gitbook/assets/{air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (2).png => air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4) (2).png} (100%) rename .gitbook/assets/{air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (3).png => air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4) (3).png} (100%) rename .gitbook/assets/{air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4).png => air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4) (4).png} (100%) diff --git a/.gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (1).png b/.gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (3) (1).png similarity index 100% rename from .gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (1).png rename to .gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (3) (1).png diff --git a/.gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (2).png b/.gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (3) (2).png similarity index 100% rename from .gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (2).png rename to .gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (3) (2).png diff --git a/.gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3).png b/.gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (3) (3).png similarity index 100% rename from .gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3).png rename to .gitbook/assets/air_fold_4 (1) (2) (2) (3) (3) (3) (3) (3) (3) (3).png diff --git a/.gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (1).png b/.gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (3) (1).png similarity index 100% rename from .gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (1).png rename to .gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (3) (1).png diff --git a/.gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (2).png b/.gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (3) (2).png similarity index 100% rename from .gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (2).png rename to .gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (3) (2).png diff --git a/.gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3).png b/.gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (3) (3).png similarity index 100% rename from .gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3).png rename to .gitbook/assets/air_null_6 (1) (2) (2) (3) (3) (3) (3) (3) (3) (3).png diff --git a/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (1).png b/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4) (1).png similarity index 100% rename from .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (1).png rename to .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4) (1).png diff --git a/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (2).png b/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4) (2).png similarity index 100% rename from .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (2).png rename to .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4) (2).png diff --git a/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (3).png b/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4) (3).png similarity index 100% rename from .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (3).png rename to .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4) (3).png diff --git a/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4).png b/.gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4) (4).png similarity index 100% rename from .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4).png rename to .gitbook/assets/air_sequential_2 (1) (1) (1) (1) (1) (2) (3) (4) (4) (4) (4).png diff --git a/SUMMARY.md b/SUMMARY.md index 086dc88..02e5061 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -39,7 +39,7 @@ * [Tutorials](tutorials_tutorials/README.md) * [Deploy A Local Fluence Node](tutorials_tutorials/tutorial_run_local_node.md) * [Deploy A Private Fluence Network](tutorials_tutorials/running-a-fluence-network.md) - * [Add Your Own Builtin](tutorials_tutorials/add-your-own-builtin.md) + * [Add Your Own Node Native Service](tutorials_tutorials/add-your-own-builtin.md) * [TrustGraph In Action](tutorials_tutorials/tutorial_trustgraph.md) * [Securing Services](tutorials_tutorials/securing-services.md) * [Developing a Frontend Application with JS-SDK](tutorials_tutorials/developing-a-frontend-application-with-js-sdk.md) diff --git a/knowledge_knowledge/knowledge_aquamarine/hll/knowledge_aquamarine_air.md b/knowledge_knowledge/knowledge_aquamarine/hll/knowledge_aquamarine_air.md index 24d8bb8..af87768 100644 --- a/knowledge_knowledge/knowledge_aquamarine/hll/knowledge_aquamarine_air.md +++ b/knowledge_knowledge/knowledge_aquamarine/hll/knowledge_aquamarine_air.md @@ -23,7 +23,7 @@ AIR instructions are intended to launch the execution of a service method as fol 4. The arguments specified by the argument list are passed to the method 5. The result of the method returned under the name output name -**Figure 2: Sequential Instruction** ![Execution](../../../.gitbook/assets/air_sequential_2%20%281%29%20%281%29%20%281%29%20%281%29%20%281%29%20%282%29%20%283%29%20%284%29%20%282%29.png) +**Figure 2: Sequential Instruction** ![Execution](../../../.gitbook/assets/air_sequential_2%20%281%29%20%281%29%20%281%29%20%281%29%20%281%29%20%282%29%20%283%29%20%284%29%20%284%29%20%284%29%20%282%29.png) The _**seq**_ instruction takes two instructions at most as its arguments and executes them sequentially, one after the other. diff --git a/tutorials_tutorials/add-your-own-builtin.md b/tutorials_tutorials/add-your-own-builtin.md index 0e0b839..2bd8bb9 100644 --- a/tutorials_tutorials/add-your-own-builtin.md +++ b/tutorials_tutorials/add-your-own-builtin.md @@ -1,14 +1,48 @@ -# Add Your Own Builtin +--- +description: The Case For Node Native Services +--- +# Add Your Own Node Native Service +As discussed in the [Node](../knowledge_knowledge/node/knowledge_node_services.md) section, some service functionalities useful to a large audience. Such services and can be directly deployed to a peer node as a Wasm module. The remainder of this tutorial guides you through the steps necessary to create and submit a Node Native Service candidate. -If you want to have a service that available out-of-the-box with startup script and scheduled scripts, you can use `builtins deployer` feature. It will upload modules, deploy service, run init script and schedule others. -You should put your service files in the corresponding folder specified in config as `builtins_base_dir`. +In order to have a service available out-of-the-box with the necessary startup and scheduling scripts, we can take advantage of the Fluence [deployer feature](https://github.com/fluencelabs/fluence/tree/master/deploy) for Node native Services. This feature handles the complete deployment process including -### Builtins directory structure +* module uploads, +* service deployment, +* script initialization and scheduling + +Note that the deployment process is a fully automated workflow requiring you to merely submit your service assets in the appropriate structure as a PR to the appropriate GitHub repository. At this point you should have a solid grasp of creating service modules and their associated configuration files. See the [Developing Modules And Services](../development_development/) section for details. + +Our first step is fork the ??? repo by clicking on the Fork button, upper right of the repo webpage, and follow the instructions to create a local copy. In your local repo copy, checkout a new branch with a new, unique branch name: + +```text +git checkout -b MyBranchName +``` + +In your new branch create a new directory with the service name in the _builtin_ directory: + +```text +cd builtins +mkdir my-new-super-service +cd new-super-service +``` + + Replace my-_new-super-service_ with your service name. + +Now we can build and populate the required directory structure with your service assets. You should put your service files in the corresponding my-_new-super-service_ directory specified in config as `builtins_base_dir` **TODO: check if that applies to new repo approach.** + +Asset Requirements + +In order to deploy a builtin service, you need + +* the wasm files for each module as the module build +* the blueprint file for the service +* start and schedule scripts + +Just to recap, Blueprints capture module names, blueprint name, and blueprint id. -- builtins ```text --- builtins -- {service_alias} -- scheduled -- {script_name}_{interval_in_seconds}.air [optional] From af4920806ea2676f6568c96516cc7b46d9fba79e Mon Sep 17 00:00:00 2001 From: boneyard93501 Date: Fri, 18 Jun 2021 22:21:42 +0000 Subject: [PATCH 04/10] GitBook: [builtins] 57 pages modified --- SUMMARY.md | 2 +- tutorials_tutorials/add-your-own-builtin.md | 103 ++++++++++++-------- 2 files changed, 66 insertions(+), 39 deletions(-) diff --git a/SUMMARY.md b/SUMMARY.md index 02e5061..ddf097d 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -39,7 +39,7 @@ * [Tutorials](tutorials_tutorials/README.md) * [Deploy A Local Fluence Node](tutorials_tutorials/tutorial_run_local_node.md) * [Deploy A Private Fluence Network](tutorials_tutorials/running-a-fluence-network.md) - * [Add Your Own Node Native Service](tutorials_tutorials/add-your-own-builtin.md) + * [Add Your Own Builtins](tutorials_tutorials/add-your-own-builtin.md) * [TrustGraph In Action](tutorials_tutorials/tutorial_trustgraph.md) * [Securing Services](tutorials_tutorials/securing-services.md) * [Developing a Frontend Application with JS-SDK](tutorials_tutorials/developing-a-frontend-application-with-js-sdk.md) diff --git a/tutorials_tutorials/add-your-own-builtin.md b/tutorials_tutorials/add-your-own-builtin.md index 2bd8bb9..9b5bf05 100644 --- a/tutorials_tutorials/add-your-own-builtin.md +++ b/tutorials_tutorials/add-your-own-builtin.md @@ -1,10 +1,6 @@ ---- -description: The Case For Node Native Services ---- +# Add Your Own Builtins -# Add Your Own Node Native Service - -As discussed in the [Node](../knowledge_knowledge/node/knowledge_node_services.md) section, some service functionalities useful to a large audience. Such services and can be directly deployed to a peer node as a Wasm module. The remainder of this tutorial guides you through the steps necessary to create and submit a Node Native Service candidate. +As discussed in the [Node](../knowledge_knowledge/node/knowledge_node_services.md) section, some service functionalities useful to a large audience and such services and can be directly deployed to a peer node. The remainder of this tutorial guides you through the steps necessary to create and deploy a Builtin service. In order to have a service available out-of-the-box with the necessary startup and scheduling scripts, we can take advantage of the Fluence [deployer feature](https://github.com/fluencelabs/fluence/tree/master/deploy) for Node native Services. This feature handles the complete deployment process including @@ -30,35 +26,37 @@ cd new-super-service Replace my-_new-super-service_ with your service name. -Now we can build and populate the required directory structure with your service assets. You should put your service files in the corresponding my-_new-super-service_ directory specified in config as `builtins_base_dir` **TODO: check if that applies to new repo approach.** +Now we can build and populate the required directory structure with your service assets. You should put your service files in the corresponding my-_new-super-service_ directory specified in config as `builtins_base_dir` -Asset Requirements +**TODO: check if that applies to new repo approach.** + +#### Requirements In order to deploy a builtin service, you need -* the wasm files for each module as the module build -* the blueprint file for the service -* start and schedule scripts +* the Wasm files for each module comprising the service +* a blueprint file specifying service dependencies +* service start or schedule scripts -Just to recap, Blueprints capture module names, blueprint name, and blueprint id. -- builtins +Blueprints -```text - -- {service_alias} - -- scheduled - -- {script_name}_{interval_in_seconds}.air [optional] - -- blueprint.json - -- on_start.air [optional] - -- on_start.json [optional] - -- {module1_name}.wasm - -- {module1_name}_config.json - -- {module2_name}.wasm - -- {module2_name}_config.json - ... -``` - -In blueprint you can specify dependencies either with name or hashes but .wasm files and config should have corresponding names. `blieprint.json` example: +Just to recap, blueprints specify the service name and module dependencies: ```javascript +// blueprint.json +{ + "name": "my-new-super-service", + "dependencies": [ + "name: module_1", + "name: module_2" + ] +} +``` + +where _module\_i_ is the name of the Wasm module. Note that dependencies can be specified as string literals or hashes: + +```javascript +// blueprint.json { "name": "aqua-dht", "dependencies": [ @@ -77,23 +75,52 @@ So modules and configs names should look like this: -- 558a483b1c141b66765947cf6a674abe5af2bb5b86244dfca41e5f5eb2a86e9e_config.json ``` -`on_start.air` is optional and can contain some startup script and you can specify necessary variables in `on_start.json`. It will be executed only once after service deployment or node restart. +**Start Script** -`on_start.json` example: - -```javascript -{ - "variable1" : "some_string", - "variable2" : 5, -} -``` - -`on_start.air` example: +Start scripts, which are optional, execute once after service deployment or node restarts and are submitted as _air_ files and may be accompanied by a json file containing the necessary parameters. ```text +;; on_start.air (seq (call relay ("some_service_alias" "some_func1") [variable1] result) (call relay ("some_service_alias" "some_func2") [variable2 result]) ) ``` +and the associated data file: + +```javascript +// on_start.json +{ + "variable1" : "some_string", + "variable2" : 5, +} +``` + + + +**Scheduling Script** + + + +#### Directory Structure + + + +```text +-- builtins + -- {service_alias} + -- scheduled + -- {script_name}_{interval_in_seconds}.air [optional] + -- blueprint.json + -- on_start.air [optional] + -- on_start.json [optional] + -- {module1_name}.wasm + -- {module1_name}_config.json + -- {module2_name}.wasm + -- {module2_name}_config.json + ... +``` + + + From 293f71344727a24aaff0a41c4abae76cdbe1744d Mon Sep 17 00:00:00 2001 From: boneyard93501 Date: Fri, 18 Jun 2021 23:07:46 +0000 Subject: [PATCH 05/10] GitBook: [builtins] 56 pages modified --- tutorials_tutorials/add-your-own-builtin.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tutorials_tutorials/add-your-own-builtin.md b/tutorials_tutorials/add-your-own-builtin.md index 9b5bf05..74623cd 100644 --- a/tutorials_tutorials/add-your-own-builtin.md +++ b/tutorials_tutorials/add-your-own-builtin.md @@ -101,11 +101,15 @@ and the associated data file: **Scheduling Script** +TBD +see previous reference in [additional concepts](../development_development/development_reward_block_app/development_additional_concepts.md) + +Scheduling scripts allows us to decouple service execution from the client and instead can rely on a cron-like scheduler to independently trigger our service\(s\). #### Directory Structure - +Now that we got our requirements covered, we can populate the directory structure we started to lay out at the beginning of this section. As mentioned above, service deployment as a builtin is an automated workflow one our PR is accepted. Hence, it is imperative to adhere to the directory structure below: ```text -- builtins @@ -122,5 +126,5 @@ and the associated data file: ... ``` - +can we call service _alias just service name._ From 7f12495ca2362aa3a543846690af23af4748e73d Mon Sep 17 00:00:00 2001 From: boneyard93501 Date: Fri, 18 Jun 2021 23:11:36 +0000 Subject: [PATCH 06/10] GitBook: [builtins] 56 pages modified --- tutorials_tutorials/add-your-own-builtin.md | 65 +++++++++++++++++++-- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/tutorials_tutorials/add-your-own-builtin.md b/tutorials_tutorials/add-your-own-builtin.md index 74623cd..37c0930 100644 --- a/tutorials_tutorials/add-your-own-builtin.md +++ b/tutorials_tutorials/add-your-own-builtin.md @@ -34,14 +34,71 @@ Now we can build and populate the required directory structure with your service In order to deploy a builtin service, you need -* the Wasm files for each module comprising the service -* a blueprint file specifying service dependencies -* service start or schedule scripts +* the Wasm file for each module required for the service +* the blueprint file for the service +* start and scheduling scripts -Blueprints +Just to recap, blueprints capture the service name and dependencies. For example: + +```javascript +// example_blueprint.json +{ + "name": "my-new-super-service", + "dependencies": [ + "name:my_module_1", + "name:my_module_2" + ] +} +``` + +where name specifies the service's name and _my\_module\_i_ refers to ith module created when you compiled your service code, i.e. _my\_module\_i.wasm_. Please note that dependencies may also be specified as hashes: + +```javascript +// example_blueprint.json with hashes +{ + "name": "aqua-dht", + "dependencies": [ + "hash:558a483b1c141b66765947cf6a674abe5af2bb5b86244dfca41e5f5eb2a86e9e", + "name:aqua-dht" + ] +} +``` + + + +Start Script + + + +Scheduling Script + + + +Putting it all together: + +```text +-- builtins + -- {service_alias} + -- scheduled + -- {script_name}_{interval_in_seconds}.air [optional] + -- blueprint.json + -- on_start.air [optional] + -- on_start.json [optional] + -- {module1_name}.wasm + -- {module1_name}_config.json + -- {module2_name}.wasm + -- {module2_name}_config.json + ... +``` + +In blueprint you can specify dependencies either with name or hashes but .wasm files and config should have corresponding names. `blieprint.json` example: Just to recap, blueprints specify the service name and module dependencies: + + +In blueprint you can specify dependencies either with name or hashes but .wasm files and config should have corresponding names. `blieprint.json` example: + ```javascript // blueprint.json { From 4d4b12e118872c73bfa8e16beac9166ec32e5389 Mon Sep 17 00:00:00 2001 From: boneyard93501 Date: Fri, 18 Jun 2021 23:12:19 +0000 Subject: [PATCH 07/10] GitBook: [builtins] 56 pages modified --- tutorials_tutorials/add-your-own-builtin.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tutorials_tutorials/add-your-own-builtin.md b/tutorials_tutorials/add-your-own-builtin.md index 37c0930..9ae0bce 100644 --- a/tutorials_tutorials/add-your-own-builtin.md +++ b/tutorials_tutorials/add-your-own-builtin.md @@ -30,7 +30,7 @@ Now we can build and populate the required directory structure with your service **TODO: check if that applies to new repo approach.** -#### Requirements +### Requirements In order to deploy a builtin service, you need @@ -38,7 +38,9 @@ In order to deploy a builtin service, you need * the blueprint file for the service * start and scheduling scripts -Just to recap, blueprints capture the service name and dependencies. For example: +#### Blueprint + +Just to recap, blueprints capture the service name and dependencies: ```javascript // example_blueprint.json @@ -132,7 +134,7 @@ So modules and configs names should look like this: -- 558a483b1c141b66765947cf6a674abe5af2bb5b86244dfca41e5f5eb2a86e9e_config.json ``` -**Start Script** +#### **Start Script** Start scripts, which are optional, execute once after service deployment or node restarts and are submitted as _air_ files and may be accompanied by a json file containing the necessary parameters. @@ -156,7 +158,7 @@ and the associated data file: -**Scheduling Script** +#### **Scheduling Script** TBD From 774d8a7b36a9a98635fa71bd36531d960aafa314 Mon Sep 17 00:00:00 2001 From: boneyard93501 Date: Mon, 21 Jun 2021 21:24:43 +0000 Subject: [PATCH 08/10] GitBook: [builtins] 56 pages modified --- tutorials_tutorials/add-your-own-builtin.md | 129 +++++++------------- 1 file changed, 42 insertions(+), 87 deletions(-) diff --git a/tutorials_tutorials/add-your-own-builtin.md b/tutorials_tutorials/add-your-own-builtin.md index 9ae0bce..27c0319 100644 --- a/tutorials_tutorials/add-your-own-builtin.md +++ b/tutorials_tutorials/add-your-own-builtin.md @@ -1,14 +1,16 @@ # Add Your Own Builtins -As discussed in the [Node](../knowledge_knowledge/node/knowledge_node_services.md) section, some service functionalities useful to a large audience and such services and can be directly deployed to a peer node. The remainder of this tutorial guides you through the steps necessary to create and deploy a Builtin service. +As discussed in the [Node](../knowledge_knowledge/node/knowledge_node_services.md) section, some service functionalities have ubiquitous demand making them suitable candidates to be directly deployed to a peer node. The [Aqua distributed hash table](https://github.com/fluencelabs/fluence/tree/master/deploy/builtins/aqua-dht) \(DHT\) is an example of builtin service. The remainder of this tutorial guides you through the steps necessary to create and deploy a Builtin service. -In order to have a service available out-of-the-box with the necessary startup and scheduling scripts, we can take advantage of the Fluence [deployer feature](https://github.com/fluencelabs/fluence/tree/master/deploy) for Node native Services. This feature handles the complete deployment process including +In order to have a service available out-of-the-box with the necessary startup and scheduling scripts, we can take advantage of the Fluence [deployer feature](https://github.com/fluencelabs/fluence/tree/master/deploy) for Node native services. This feature handles the complete deployment process including * module uploads, -* service deployment, +* service deployment and * script initialization and scheduling -Note that the deployment process is a fully automated workflow requiring you to merely submit your service assets in the appropriate structure as a PR to the appropriate GitHub repository. At this point you should have a solid grasp of creating service modules and their associated configuration files. See the [Developing Modules And Services](../development_development/) section for details. +Note that the deployment process is a fully automated workflow requiring you to merely submit your service assets, i.e., Wasm modules and configuration scripts, in the appropriate format as a PR to the ??? GitHub repository. + +At this point you should have a solid grasp of creating service modules and their associated configuration files. See the [Developing Modules And Services](../development_development/) section for more details. Our first step is fork the ??? repo by clicking on the Fork button, upper right of the repo webpage, and follow the instructions to create a local copy. In your local repo copy, checkout a new branch with a new, unique branch name: @@ -16,7 +18,7 @@ Our first step is fork the ??? repo by clicking on the Fork button, upper right git checkout -b MyBranchName ``` -In your new branch create a new directory with the service name in the _builtin_ directory: +In our new branch, we create a directory with the service name in the _builtin_ directory: ```text cd builtins @@ -26,7 +28,7 @@ cd new-super-service Replace my-_new-super-service_ with your service name. -Now we can build and populate the required directory structure with your service assets. You should put your service files in the corresponding my-_new-super-service_ directory specified in config as `builtins_base_dir` +Now we can build and populate the required directory structure with your service assets. You should put your service files in the corresponding _my_-_new-super-service_ directory. **TODO: check if that applies to new repo approach.** @@ -36,11 +38,11 @@ In order to deploy a builtin service, you need * the Wasm file for each module required for the service * the blueprint file for the service -* start and scheduling scripts +* the optional start and scheduling scripts #### Blueprint -Just to recap, blueprints capture the service name and dependencies: +Blueprints capture the service name and dependencies: ```javascript // example_blueprint.json @@ -48,95 +50,33 @@ Just to recap, blueprints capture the service name and dependencies: "name": "my-new-super-service", "dependencies": [ "name:my_module_1", - "name:my_module_2" + "name:my_module_2", + "hash:Hash(my_module_3.wasm)" ] } ``` -where name specifies the service's name and _my\_module\_i_ refers to ith module created when you compiled your service code, i.e. _my\_module\_i.wasm_. Please note that dependencies may also be specified as hashes: +where -```javascript -// example_blueprint.json with hashes -{ - "name": "aqua-dht", - "dependencies": [ - "hash:558a483b1c141b66765947cf6a674abe5af2bb5b86244dfca41e5f5eb2a86e9e", - "name:aqua-dht" - ] -} -``` +* name specifies the service's name and +* dependencies list the names of the Wasm modules or the Blake3 hash of the Wasm module +In the above example, _my\_module\_i_ refers to ith module created when you compiled your service code - -Start Script - - - -Scheduling Script - - - -Putting it all together: +{% hint style="info" %} +The easiest way to get the Blake3 hash of our Wasm modules is to install the [b3sum](https://crates.io/crates/blake3) utility: ```text --- builtins - -- {service_alias} - -- scheduled - -- {script_name}_{interval_in_seconds}.air [optional] - -- blueprint.json - -- on_start.air [optional] - -- on_start.json [optional] - -- {module1_name}.wasm - -- {module1_name}_config.json - -- {module2_name}.wasm - -- {module2_name}_config.json - ... +cargo install b3sum +b3sum my_module_3.wasm ``` +{% endhint %} -In blueprint you can specify dependencies either with name or hashes but .wasm files and config should have corresponding names. `blieprint.json` example: - -Just to recap, blueprints specify the service name and module dependencies: - - - -In blueprint you can specify dependencies either with name or hashes but .wasm files and config should have corresponding names. `blieprint.json` example: - -```javascript -// blueprint.json -{ - "name": "my-new-super-service", - "dependencies": [ - "name: module_1", - "name: module_2" - ] -} -``` - -where _module\_i_ is the name of the Wasm module. Note that dependencies can be specified as string literals or hashes: - -```javascript -// blueprint.json -{ - "name": "aqua-dht", - "dependencies": [ - "hash:558a483b1c141b66765947cf6a674abe5af2bb5b86244dfca41e5f5eb2a86e9e", - "name:aqua-dht" - ] -} -``` - -So modules and configs names should look like this: - -```text --- aqua-dht.wasm --- aqua-dht_config.json --- 558a483b1c141b66765947cf6a674abe5af2bb5b86244dfca41e5f5eb2a86e9e.wasm --- 558a483b1c141b66765947cf6a674abe5af2bb5b86244dfca41e5f5eb2a86e9e_config.json -``` +If you decide to use the hash approach, please use the hash for the config files names as well \(see below\). #### **Start Script** -Start scripts, which are optional, execute once after service deployment or node restarts and are submitted as _air_ files and may be accompanied by a json file containing the necessary parameters. +Start scripts, which are optional, execute once after service deployment or node restarts and are submitted as _air_ files and may be accompanied by a _json_ file containing the necessary parameters. ```text ;; on_start.air @@ -149,7 +89,7 @@ Start scripts, which are optional, execute once after service deployment or node and the associated data file: ```javascript -// on_start.json +// on_start.json data for on_start.air { "variable1" : "some_string", "variable2" : 5, @@ -180,10 +120,25 @@ Now that we got our requirements covered, we can populate the directory structur -- on_start.json [optional] -- {module1_name}.wasm -- {module1_name}_config.json - -- {module2_name}.wasm - -- {module2_name}_config.json + -- Hash(module2_name.wasm).wasm + -- Hash(module2_name.wasm)_config.json ... ``` -can we call service _alias just service name._ +For a complete example, please see the [aqua-dht](https://github.com/fluencelabs/fluence/tree/master/deploy/builtins/aqua-dht) builtin: + +```text +fluence + --deploy + --builtins + --aqua-dht + -aqua-dht.wasm + -aqua-dht_config.json + -blueprint.json + -scheduled + -sqlite3.wasm + -sqlite3_config.json +``` + +which based on the [eponymous](https://github.com/fluencelabs/aqua-dht) service project. From 9d79d18843dfba6585b9cb040dc371ee912fb92c Mon Sep 17 00:00:00 2001 From: boneyard93501 Date: Mon, 21 Jun 2021 21:30:42 +0000 Subject: [PATCH 09/10] GitBook: [builtins] 56 pages modified --- tutorials_tutorials/add-your-own-builtin.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tutorials_tutorials/add-your-own-builtin.md b/tutorials_tutorials/add-your-own-builtin.md index 27c0319..d66776e 100644 --- a/tutorials_tutorials/add-your-own-builtin.md +++ b/tutorials_tutorials/add-your-own-builtin.md @@ -96,15 +96,9 @@ and the associated data file: } ``` - - #### **Scheduling Script** -TBD - -see previous reference in [additional concepts](../development_development/development_reward_block_app/development_additional_concepts.md) - -Scheduling scripts allows us to decouple service execution from the client and instead can rely on a cron-like scheduler to independently trigger our service\(s\). +Scheduling scripts allow us to decouple service execution from the client and instead can rely on a cron-like scheduler running on a node to trigger our service\(s\). For a brief overview, see [additional concepts](../development_development/development_reward_block_app/development_additional_concepts.md) #### Directory Structure From bab83cebf04aefd62f6ef557b85d30b1ca1cfab1 Mon Sep 17 00:00:00 2001 From: boneyard93501 Date: Mon, 21 Jun 2021 21:42:32 +0000 Subject: [PATCH 10/10] GitBook: [builtins] 56 pages modified --- tutorials_tutorials/add-your-own-builtin.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tutorials_tutorials/add-your-own-builtin.md b/tutorials_tutorials/add-your-own-builtin.md index d66776e..a176627 100644 --- a/tutorials_tutorials/add-your-own-builtin.md +++ b/tutorials_tutorials/add-your-own-builtin.md @@ -8,33 +8,32 @@ In order to have a service available out-of-the-box with the necessary startup a * service deployment and * script initialization and scheduling -Note that the deployment process is a fully automated workflow requiring you to merely submit your service assets, i.e., Wasm modules and configuration scripts, in the appropriate format as a PR to the ??? GitHub repository. +Note that the deployment process is a fully automated workflow requiring you to merely submit your service assets, i.e., Wasm modules and configuration scripts, in the appropriate format as a PR to the [Fluence](https://github.com/fluencelabs/fluence) repository. At this point you should have a solid grasp of creating service modules and their associated configuration files. See the [Developing Modules And Services](../development_development/) section for more details. -Our first step is fork the ??? repo by clicking on the Fork button, upper right of the repo webpage, and follow the instructions to create a local copy. In your local repo copy, checkout a new branch with a new, unique branch name: +Our first step is fork the [Fluence](https://github.com/fluencelabs/fluence) repo by clicking on the Fork button, upper right of the repo webpage, and follow the instructions to create a local copy. In your local repo copy, checkout a new branch with a new, unique branch name: ```text +cd fluence git checkout -b MyBranchName ``` -In our new branch, we create a directory with the service name in the _builtin_ directory: +In our new branch, we create a directory with the service name in the _deploy/builtin_ directory: ```text -cd builtins +cd deploy/builtins mkdir my-new-super-service cd new-super-service ``` - Replace my-_new-super-service_ with your service name. + Replace _my_-_new-super-service_ with your service name. Now we can build and populate the required directory structure with your service assets. You should put your service files in the corresponding _my_-_new-super-service_ directory. -**TODO: check if that applies to new repo approach.** - ### Requirements -In order to deploy a builtin service, you need +In order to deploy a builtin service, we need * the Wasm file for each module required for the service * the blueprint file for the service @@ -130,9 +129,9 @@ fluence -aqua-dht_config.json -blueprint.json -scheduled - -sqlite3.wasm - -sqlite3_config.json + -sqlite3.wasm # or 558a483b1c141b66765947cf6a674abe5af2bb5b86244dfca41e5f5eb2a86e9e.wasm + -sqlite3_config.json # or 558a483b1c141b66765947cf6a674abe5af2bb5b86244dfca41e5f5eb2a86e9e_config.json ``` -which based on the [eponymous](https://github.com/fluencelabs/aqua-dht) service project. +which is based on the [eponymous](https://github.com/fluencelabs/aqua-dht) service project.