From c7dc09ddb9427d5f299ddbe8b02571dac132cf10 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Wed, 24 Jan 2024 09:35:34 -0800 Subject: [PATCH] add quick start --- src/SUMMARY.md | 1 + src/intro.md | 4 ---- src/quick-start.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 src/quick-start.md diff --git a/src/SUMMARY.md b/src/SUMMARY.md index acd4746f..23c4814c 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -1,5 +1,6 @@ # Summary +[Quick Start](./quick-start.md) [Introduction](./intro.md) [Identity System](./identity_system.md) [Design Philosophy](./design_philosophy.md) diff --git a/src/intro.md b/src/intro.md index 76ffc805..226706fb 100644 --- a/src/intro.md +++ b/src/intro.md @@ -2,10 +2,6 @@ The Kinode Book describes the Kinode operating system, both in conceptual and practical terms. -* To get your hands dirty developing, jump to [My First Kinode Application](./my_first_app/chapter_1.md). -* To learn about high-level concepts, keep reading these documents in-order. -* To learn about how the system functions, start reading about [System Components](./processes.md). - Kinode OS is a decentralized operating system, peer-to-peer app framework, and node network designed to simplify the development and deployment of decentralized applications. It is also a *sovereign cloud computer*, in that Kinode can be deployed anywhere and act as a server controlled by anyone. Ultimately, Kinode facilitates the writing and distribution of software that runs on privately-held, personal server nodes or node clusters. diff --git a/src/quick-start.md b/src/quick-start.md new file mode 100644 index 00000000..e40d37fb --- /dev/null +++ b/src/quick-start.md @@ -0,0 +1,53 @@ +# Quick Start + +Kinode OS is a decentralized operating system, peer-to-peer app framework, and node network designed to simplify the development and deployment of decentralized applications. + +This Quick Start page is targeted at developers: if you want to get your hands dirty, continue [below](#run-two-fake-kinodes-and-chat-between-them). +A more detailed version of this Quick Start leads off the [My First Kinode Application](./my_first_app/chapter_1.md) section. + +Otherwise: +* To learn about high-level concepts, start with the [Introduction](./intro.md), and work through the book in-order. +* To learn about how the system functions, start reading about [System Components](./processes.md). + +## Run two fake Kinodes and chat between them + +``` +# Get Rust and `kit` Kinode development tools +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +cargo install --git https://github.com/uqbar-dao/kit + +# Start two fake nodes, each in a new terminal on ports 8080 and 8081: +## First new terminal: +kit boot-fake-node + +## Second new terminal: +kit boot-fake-node --home /tmp/kinode-fake-node-2 --port 8081 --fake-node-name fake2.os + +# Back in the original terminal that is not running a fake node: +## Create and build a chat app from a template: +kit new my_chat_app +kit build my_chat_app + +## Load the chat app into each node & start it: +kit start-package my_chat_app +kit start-package my_chat_app --port 8081 + +## Chat between the nodes: +kit inject-message my_chat_app:my_chat_app:template.os '{"Send": {"target": "fake2.os", "message": "hello from the outside world"}}' +kit inject-message my_chat_app:my_chat_app:template.os '{"Send": {"target": "fake.os", "message": "replying from fake2.os using first method..."}}' --node fake2.os +kit inject-message my_chat_app:my_chat_app:template.os '{"Send": {"target": "fake.os", "message": "and second!"}}' -p 8081 + +# Or, from the terminal running one of the fake nodes: +## First fake node terminal: +/m our@my_chat_app:my_chat_app:template.os {"Send": {"target": "fake2.os", "message": "hello world"}} + +## Second fake node terminal: +/m our@my_chat_app:my_chat_app:template.os {"Send": {"target": "fake.os", "message": "wow, it works!"}} +``` + +## Next steps + +The first chapter of the [My First Kinode Application](./my_first_app/chapter_1.md) tutorial is a more detailed version of this Quick Start. +Alternatively, you can learn more about `kit` in the [`kit` documentation](./kit/kit.md). + +If instead, you want to learn more about high-level concepts, start with the [Introduction](./intro.md) and work your way through the book in-order.