From 3439077dac2947f1537c00dd1d31b421ac8dac6d Mon Sep 17 00:00:00 2001 From: sasha-astiadi Date: Tue, 13 Feb 2024 14:31:11 +0300 Subject: [PATCH 01/15] add missing files / fix --- collections/dy_intro/learn.md | 0 collections/problems/problems.md | 0 collections/solutions/cloud/cloud.md | 0 collections/solutions/solutions.md | 0 collections/values/poa.md | 0 collections/values/values.md | 1 + collections/why/countries_no_internet.md | 1 + collections/why/current_cloud_too_centralized.md | 1 + 8 files changed, 3 insertions(+) create mode 100644 collections/dy_intro/learn.md create mode 100644 collections/problems/problems.md create mode 100644 collections/solutions/cloud/cloud.md create mode 100644 collections/solutions/solutions.md create mode 100644 collections/values/poa.md create mode 100644 collections/values/values.md create mode 100644 collections/why/countries_no_internet.md create mode 100644 collections/why/current_cloud_too_centralized.md diff --git a/collections/dy_intro/learn.md b/collections/dy_intro/learn.md new file mode 100644 index 0000000..e69de29 diff --git a/collections/problems/problems.md b/collections/problems/problems.md new file mode 100644 index 0000000..e69de29 diff --git a/collections/solutions/cloud/cloud.md b/collections/solutions/cloud/cloud.md new file mode 100644 index 0000000..e69de29 diff --git a/collections/solutions/solutions.md b/collections/solutions/solutions.md new file mode 100644 index 0000000..e69de29 diff --git a/collections/values/poa.md b/collections/values/poa.md new file mode 100644 index 0000000..e69de29 diff --git a/collections/values/values.md b/collections/values/values.md new file mode 100644 index 0000000..f9c8866 --- /dev/null +++ b/collections/values/values.md @@ -0,0 +1 @@ +# Our Values \ No newline at end of file diff --git a/collections/why/countries_no_internet.md b/collections/why/countries_no_internet.md new file mode 100644 index 0000000..c4a318f --- /dev/null +++ b/collections/why/countries_no_internet.md @@ -0,0 +1 @@ +# countries_no_internet \ No newline at end of file diff --git a/collections/why/current_cloud_too_centralized.md b/collections/why/current_cloud_too_centralized.md new file mode 100644 index 0000000..c20076d --- /dev/null +++ b/collections/why/current_cloud_too_centralized.md @@ -0,0 +1 @@ +# current_cloud_too_centralized \ No newline at end of file From 9dee08117879639c6dd9b0768ad7e7b8131a1b99 Mon Sep 17 00:00:00 2001 From: sasha-astiadi Date: Tue, 13 Feb 2024 14:31:34 +0300 Subject: [PATCH 02/15] move file to the right dir --- .../painkiller/cd_issues_cloud_not_enough.md} | 0 .../content_providers => problems/painkiller}/cd_issues_cost.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename collections/{solutions/content_providers/cnd_issues_cloud_not_enough.md => problems/painkiller/cd_issues_cloud_not_enough.md} (100%) rename collections/{solutions/content_providers => problems/painkiller}/cd_issues_cost.md (100%) diff --git a/collections/solutions/content_providers/cnd_issues_cloud_not_enough.md b/collections/problems/painkiller/cd_issues_cloud_not_enough.md similarity index 100% rename from collections/solutions/content_providers/cnd_issues_cloud_not_enough.md rename to collections/problems/painkiller/cd_issues_cloud_not_enough.md diff --git a/collections/solutions/content_providers/cd_issues_cost.md b/collections/problems/painkiller/cd_issues_cost.md similarity index 100% rename from collections/solutions/content_providers/cd_issues_cost.md rename to collections/problems/painkiller/cd_issues_cost.md From 7fb111734e76b53f7752a16a921dad2235e13a66 Mon Sep 17 00:00:00 2001 From: sasha-astiadi Date: Tue, 13 Feb 2024 14:31:49 +0300 Subject: [PATCH 03/15] fix summary error --- books/duniayetu_dar/SUMMARY.md | 38 +++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/books/duniayetu_dar/SUMMARY.md b/books/duniayetu_dar/SUMMARY.md index 98bb2b0..a1d7853 100644 --- a/books/duniayetu_dar/SUMMARY.md +++ b/books/duniayetu_dar/SUMMARY.md @@ -6,16 +6,28 @@ - [Social Warming](why/social_warming.md) - [Farming](farming/farming.md) - [3Nodes](farming/3nodes.md) -- [Vision](priciples/planet_people_first.md) - - [Proof of Authenticity](priciples/poa.md) -- [Solutions](tfgrid_structure/solutions.md) - - [Decentralized Cloud](solutions/cloud.md) - - [Content Providing](solutions/content_providers.md) +- [Vision](values/values.md) + - [Planet and People First](values/planet_people_first.md) + - [Proof of Authenticity](values/poa.md) +- [Problems](problems/problems.md) - [painkillers and onions](problems/no_pain_killer.md) - - [clouds are complicated](problems/internet_infra/cloud_issues.md) - - [content delivery is expensive](problems/internet_infra/cdn_issues.md) + - [Clouds are C omplicated](problems/cd_issues_cloud_not_enough.md) + - [Content Delivery is Expensive](problems/cd_issues_cost.md) +- [Solutions](solutions/solutions.md) + - [Decentralized Cloud](solutions/cloud/cloud.md) + - [Content Providers](solutions/content_providers/content_providers.md) - - [Web4](solutions/web4.md) + - [Web4](WEB4/web4.md) +- [FreeFlow Movement](freeflow/freeflow_movement.md) + - [Community Principles](freeflow/community_principles/community_principles.md) +- [Social Media Protocols](social_media_protocols/protocols.md) + - [Nostr Protocol](social_media_protocols/nostr.md) + - [Activity Pub](social_media_protocols/activitypub.md) + - [Activity Pub 2](social_media_protocols/activitypub2.md) +- [Technology](web4/web4.md) + - [FreeFlow Self](web4/freeflowself/freeflowself.md) + - [Actor Based Development](web4/actor_based/actor_based_approach.md) + - [Vlang](web4/vlang/vlang.md) - [Dunia Yetu](dy_intro/dunia_yetu/dunia_yetu.md) - [About Us](dy_intro/dunia_yetu/about_us.md) - [Our Core Values](dy_intro/dunia_yetu/our_core_values.md) @@ -28,15 +40,7 @@ - [Build on top of Tanzania's decentralised Internet](dy_intro/how_you_can_participate/build.md) - [Join Our Coding Academy](dy_intro/how_you_can_participate/coding_participate.md) - [Join Our Community](dy_intro/how_you_can_participate/community_participate.md) -- [FreeFlow Movement](freeflow_movement/freeflow_movement.md) - - [Community Principles](freeflow_movement/community_principles/community_principles.md) - - [Social Media Protocols](social_media_protocols/protocols.md) - - [Nostr Protocol](social_media_protocols/nostr.md) - - [Activity Pub](social_media_protocols/activitypub.md) - - [Activity Pub 2](social_media_protocols/activitypub2.md) - - [Technology](ffself_specs/tech.md) - - [Actor Based Development](ffself_specs/actor_based/actor_based_approach.md) - - [Vlang](ffself_specs/vlang/vlang.md) + From eb9aa2df90a11f396e384778d9c68fe080117575 Mon Sep 17 00:00:00 2001 From: sasha-astiadi Date: Tue, 13 Feb 2024 14:32:02 +0300 Subject: [PATCH 04/15] add missing file --- .../social_media_protocols/activitypub2.md | 0 collections/values/planet_people_first.md | 5 +++-- collections/web4/vlang/img/vlang.png | Bin 0 -> 6953 bytes 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 collections/social_media_protocols/activitypub2.md create mode 100644 collections/web4/vlang/img/vlang.png diff --git a/collections/social_media_protocols/activitypub2.md b/collections/social_media_protocols/activitypub2.md new file mode 100644 index 0000000..e69de29 diff --git a/collections/values/planet_people_first.md b/collections/values/planet_people_first.md index dba8170..90bf3f8 100644 --- a/collections/values/planet_people_first.md +++ b/collections/values/planet_people_first.md @@ -1,3 +1,5 @@ +# planet_people_first.md + ![](img/planet_first.png) ## Core Values @@ -15,5 +17,4 @@ ## Simplicity -> TODO: values, do it in the 2 layers - +> TODO: values, do it in the 2 layers \ No newline at end of file diff --git a/collections/web4/vlang/img/vlang.png b/collections/web4/vlang/img/vlang.png new file mode 100644 index 0000000000000000000000000000000000000000..e5543cde493a7f9e0174114839d98bbb2866d012 GIT binary patch literal 6953 zcmZu$RZtX;*Chm`{UO~b-Q6q#0wRrchakOxz*0+hry$)ZT}!ic$I>a?xeKgxe7^o? zzLz^^?#!LJFXx<@bD}iV6!CE=aZpfD@RdG&)Ivc)1^mN#uhIWay=nQUe+zmI6>a&K zmlySjev`V~dqlZc+W`iAbFzLs|ABy4(Nap@g9uU}wDbbL~J zcHYL;mV%PzzmH@UKcnE2n?!cRCZ-OKj8_zDYx_e?!uyr1f>2OM+4;q-Y#n_3z|L;& z;OG)<9le~=ww>@yw}i&P%=V1RkzZ}Ii<_srCl@`#({=3wQEA040cp+&(6Hnp1>-<6 zdKMdxXal3KSVW|FWDHuiK`3}{#iSJISOg2JTiJL7>>?U_r*^HPAs=)>U%uys<+kyB zcFM>q?dzWjjIa0b4bLrVk4X8wy)}+lUbpPmJ48XD=vVqEqwSS_W)fxjM>x4ksKEh& zVu!*X8TrbN7VxpU@{|2)R-aq)Pga4+oR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Ui&-PEE{=w9mn7l{$R7ar!wA_R20<`Z9xLsja5KR5 zB`N(`pY13+u0pyvY3rU6X>;%XpTJRpsXh64KHUZeY_2n~j!g#P(c36&>j0VfAi(=r zTRRvqC#GpJOs9k`32J3jM49bf)Vg~X<@Cgx{)?u%RC*eWOV^`eR{y0jLK$kz@fM>GDp-@#BKHv0> mXU3r~mCDMEF8%#8omFz$+X Date: Wed, 14 Feb 2024 14:59:48 +0300 Subject: [PATCH 05/15] test --- books/duniayetu_dar/SUMMARY.md | 2 ++ collections/sasha/ilovezanzibar.md | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 collections/sasha/ilovezanzibar.md diff --git a/books/duniayetu_dar/SUMMARY.md b/books/duniayetu_dar/SUMMARY.md index a1d7853..bb1b8a8 100644 --- a/books/duniayetu_dar/SUMMARY.md +++ b/books/duniayetu_dar/SUMMARY.md @@ -29,6 +29,7 @@ - [Actor Based Development](web4/actor_based/actor_based_approach.md) - [Vlang](web4/vlang/vlang.md) - [Dunia Yetu](dy_intro/dunia_yetu/dunia_yetu.md) + - [About Us](dy_intro/dunia_yetu/about_us.md) - [Our Core Values](dy_intro/dunia_yetu/our_core_values.md) - [What We Offer](dy_intro/what_we_offer/what_we_offer.md) @@ -40,6 +41,7 @@ - [Build on top of Tanzania's decentralised Internet](dy_intro/how_you_can_participate/build.md) - [Join Our Coding Academy](dy_intro/how_you_can_participate/coding_participate.md) - [Join Our Community](dy_intro/how_you_can_participate/community_participate.md) + - [SASHA sidebar](sasha/ilovezanzibar.md) diff --git a/collections/sasha/ilovezanzibar.md b/collections/sasha/ilovezanzibar.md new file mode 100644 index 0000000..dcfd175 --- /dev/null +++ b/collections/sasha/ilovezanzibar.md @@ -0,0 +1,9 @@ +# HEEEY WHATS UP + +JUSt testing. + +stay awesome. + +live +laugh +love \ No newline at end of file From 7603272a345ae78ef496a4a9866a307ce7b99cba Mon Sep 17 00:00:00 2001 From: sasha-astiadi Date: Wed, 14 Feb 2024 15:00:17 +0300 Subject: [PATCH 06/15] edit --- books/duniayetu_dar/SUMMARY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/books/duniayetu_dar/SUMMARY.md b/books/duniayetu_dar/SUMMARY.md index bb1b8a8..6068a4d 100644 --- a/books/duniayetu_dar/SUMMARY.md +++ b/books/duniayetu_dar/SUMMARY.md @@ -41,7 +41,7 @@ - [Build on top of Tanzania's decentralised Internet](dy_intro/how_you_can_participate/build.md) - [Join Our Coding Academy](dy_intro/how_you_can_participate/coding_participate.md) - [Join Our Community](dy_intro/how_you_can_participate/community_participate.md) - - [SASHA sidebar](sasha/ilovezanzibar.md) +- [SASHA sidebar](sasha/ilovezanzibar.md) From 3121c2e123a5ce305e5739bf7866e118a1957f8d Mon Sep 17 00:00:00 2001 From: Mik Perreault Date: Wed, 14 Feb 2024 16:24:39 +0000 Subject: [PATCH 07/15] Update README.md Added that root is needed to properly set the path when running the script. --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1d1b7eb..0a9efbc 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,17 @@ -# info for our new Internet / Social network +# Info for our new Internet / Social network > [https://info.ourworld.tf/duniayetu](https://info.ourworld.tf/duniayetu) ## First install hero: ```bash +# Download the hero installer script curl https://raw.githubusercontent.com/freeflowuniverse/crystallib/development/scripts/installer_hero.sh > /tmp/hero_install.sh +# Run the script as root to properly complete the script (e.g. sudo bash ...) bash /tmp/hero_install.sh -#check how to use, can also do on each of the subcommands +# Check how to use, can also do on each of the subcommands hero -help -#if it can't find hero, do the following on osx +# If it can't find hero, do the following on osx source ~/.zprofile ``` @@ -20,7 +22,7 @@ source ~/.zprofile ```bash hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/heroscript -# in case you want to open the generated book and edit +# In case you want to open the generated book and edit hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/heroscript -e ``` From 9391ea20abe6de6c51f53212e6080e25826d5de8 Mon Sep 17 00:00:00 2001 From: pcone Date: Wed, 14 Feb 2024 18:47:55 -0500 Subject: [PATCH 08/15] added docs/fullvm guide --- README.md | 1 + docs/hero_mdbook_fullvm.md | 122 +++++++++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 docs/hero_mdbook_fullvm.md diff --git a/README.md b/README.md index 0a9efbc..864aa2f 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ hero -help source ~/.zprofile ``` +There is also a quick guide on setting mdbook and hero on a full VM running on the TFGrid. Read the [docs](./docs/hero_mdbook_fullvm.md) for more information. ## to run the book diff --git a/docs/hero_mdbook_fullvm.md b/docs/hero_mdbook_fullvm.md new file mode 100644 index 0000000..a1c1b95 --- /dev/null +++ b/docs/hero_mdbook_fullvm.md @@ -0,0 +1,122 @@ +

Hero and mdbook

+ +

Table of Contents

+ +- [Introduction](#introduction) +- [Prerequisites](#prerequisites) +- [Setting the Full VM](#setting-the-full-vm) + - [Install cargo](#install-cargo) + - [Install redis](#install-redis) +- [Install pkg-config, gcc and libssl](#install-pkg-config-gcc-and-libssl) +- [Set Hero](#set-hero) +- [Generate the mdbook](#generate-the-mdbook) + - [Access the mdbook from your local machine with the SSH tunnel](#access-the-mdbook-from-your-local-machine-with-the-ssh-tunnel) + +*** + +## Introduction + +We show how to work with mdbook using the [hero](https://github.com/freeflowuniverse/crystallib/tree/development/cli/hero) tool. + +For this guide, we show an example using the mdbook from the repository [info_tfgrid](https://git.ourworld.tf/tfgrid/info_tfgrid). + +This guide can be done locally or on a VM. It should be run as root. We show the steps for a full VM deployed on the TFGrid with WireGuard. + +## Prerequisites + +On the full VM, you will need to install the following: + +- cargo +- redis +- gcc +- pkg-config +- libssl-dev + +Steps will be show to install those prerequisites. + +## Setting the Full VM + +- Deploy a full VM with WireGuard on the TFGrid +- Connect to the full VM with an SSH tunnel on port 3333 on both local and VM + ``` + ssh -4 -L 3333:127.0.0.1:3333 root@10.20.4.2 + ``` +- Preprare the VM: + ``` + apt update && apt upgrade -y + ``` + +### Install cargo + +Once you install cargo, all mdbook dependencies will be installed via the hero script. + +- Install cargo rust for linux and mac (with default installation) + ``` + curl https://sh.rustup.rs -sSf | sh + ``` +- Configure the current shell + ``` + source "$HOME/.cargo/env" + ``` + +### Install redis + +- Install redis on the VM + ``` + apt install lsb-release curl gpg + curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/redis.list + apt-get update + apt-get install redis -y + ``` + +## Install pkg-config, gcc and libssl + +- Install other packages + ``` + apt install pkg-config -y + apt-get install gcc -y + apt install libssl-dev + ``` + +## Set Hero + +- Download the hero installation script + ``` + curl https://raw.githubusercontent.com/freeflowuniverse/crystallib/development/scripts/installer_hero.sh > /tmp/hero_install.sh + ``` +- Run the script as root + ``` + bash /tmp/hero_install.sh + ``` +- Run hero to confirm the installation is done properly + ``` + hero -help + ``` + +## Generate the mdbook + +- Start the ssh-agent + ``` + eval $(ssh-agent) # start the ssh-agent + ``` +- Generate the mdbook with hero + ``` + hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/heroscript + ``` +- Change directory to where the book is built + ``` + cd /root/hero/var/mdbuild/book_name + ``` +- You can then edit the content of the book as with any mdbook + ``` + mdbook build + ``` + +### Access the mdbook from your local machine with the SSH tunnel + +- To serve on your local machine, make sure to use the same part as the one set in your SSH tunnel (here it's port 3333) + ``` + mdbook serve --port 3333 + ``` +- To see the mdbook live, open a browser on the local machine and go to localhost:3333 \ No newline at end of file From 904168926cabc06ae54070e4eac6098fc5bd0478 Mon Sep 17 00:00:00 2001 From: pcone Date: Wed, 14 Feb 2024 18:50:59 -0500 Subject: [PATCH 09/15] adjusted details --- docs/hero_mdbook_fullvm.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/hero_mdbook_fullvm.md b/docs/hero_mdbook_fullvm.md index a1c1b95..c6b2cc4 100644 --- a/docs/hero_mdbook_fullvm.md +++ b/docs/hero_mdbook_fullvm.md @@ -1,4 +1,4 @@ -

Hero and mdbook

+

Hero and mdbook on a Full VM

Table of Contents

@@ -7,10 +7,10 @@ - [Setting the Full VM](#setting-the-full-vm) - [Install cargo](#install-cargo) - [Install redis](#install-redis) -- [Install pkg-config, gcc and libssl](#install-pkg-config-gcc-and-libssl) + - [Install pkg-config, gcc and libssl](#install-pkg-config-gcc-and-libssl) - [Set Hero](#set-hero) - [Generate the mdbook](#generate-the-mdbook) - - [Access the mdbook from your local machine with the SSH tunnel](#access-the-mdbook-from-your-local-machine-with-the-ssh-tunnel) +- [Access the mdbook from your local machine with the SSH tunnel](#access-the-mdbook-from-your-local-machine-with-the-ssh-tunnel) *** @@ -32,7 +32,7 @@ On the full VM, you will need to install the following: - pkg-config - libssl-dev -Steps will be show to install those prerequisites. +Steps will be shown to install those prerequisites. ## Setting the Full VM @@ -70,7 +70,7 @@ Once you install cargo, all mdbook dependencies will be installed via the hero s apt-get install redis -y ``` -## Install pkg-config, gcc and libssl +### Install pkg-config, gcc and libssl - Install other packages ``` @@ -113,7 +113,7 @@ Once you install cargo, all mdbook dependencies will be installed via the hero s mdbook build ``` -### Access the mdbook from your local machine with the SSH tunnel +## Access the mdbook from your local machine with the SSH tunnel - To serve on your local machine, make sure to use the same part as the one set in your SSH tunnel (here it's port 3333) ``` From 2bc550f806043f54e7c1888345e65e1de4a939f9 Mon Sep 17 00:00:00 2001 From: mik-tf Date: Thu, 15 Feb 2024 00:38:42 +0000 Subject: [PATCH 10/15] Update docs/hero_mdbook_fullvm.md removed duplicate string --- docs/hero_mdbook_fullvm.md | 242 ++++++++++++++++++------------------- 1 file changed, 121 insertions(+), 121 deletions(-) diff --git a/docs/hero_mdbook_fullvm.md b/docs/hero_mdbook_fullvm.md index c6b2cc4..04b8a04 100644 --- a/docs/hero_mdbook_fullvm.md +++ b/docs/hero_mdbook_fullvm.md @@ -1,122 +1,122 @@ -

Hero and mdbook on a Full VM

- -

Table of Contents

- -- [Introduction](#introduction) -- [Prerequisites](#prerequisites) -- [Setting the Full VM](#setting-the-full-vm) - - [Install cargo](#install-cargo) - - [Install redis](#install-redis) - - [Install pkg-config, gcc and libssl](#install-pkg-config-gcc-and-libssl) -- [Set Hero](#set-hero) -- [Generate the mdbook](#generate-the-mdbook) -- [Access the mdbook from your local machine with the SSH tunnel](#access-the-mdbook-from-your-local-machine-with-the-ssh-tunnel) - -*** - -## Introduction - -We show how to work with mdbook using the [hero](https://github.com/freeflowuniverse/crystallib/tree/development/cli/hero) tool. - -For this guide, we show an example using the mdbook from the repository [info_tfgrid](https://git.ourworld.tf/tfgrid/info_tfgrid). - -This guide can be done locally or on a VM. It should be run as root. We show the steps for a full VM deployed on the TFGrid with WireGuard. - -## Prerequisites - -On the full VM, you will need to install the following: - -- cargo -- redis -- gcc -- pkg-config -- libssl-dev - -Steps will be shown to install those prerequisites. - -## Setting the Full VM - -- Deploy a full VM with WireGuard on the TFGrid -- Connect to the full VM with an SSH tunnel on port 3333 on both local and VM - ``` - ssh -4 -L 3333:127.0.0.1:3333 root@10.20.4.2 - ``` -- Preprare the VM: - ``` - apt update && apt upgrade -y - ``` - -### Install cargo - -Once you install cargo, all mdbook dependencies will be installed via the hero script. - -- Install cargo rust for linux and mac (with default installation) - ``` - curl https://sh.rustup.rs -sSf | sh - ``` -- Configure the current shell - ``` - source "$HOME/.cargo/env" - ``` - -### Install redis - -- Install redis on the VM - ``` - apt install lsb-release curl gpg - curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg - echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/redis.list - apt-get update - apt-get install redis -y - ``` - -### Install pkg-config, gcc and libssl - -- Install other packages - ``` - apt install pkg-config -y - apt-get install gcc -y - apt install libssl-dev - ``` - -## Set Hero - -- Download the hero installation script - ``` - curl https://raw.githubusercontent.com/freeflowuniverse/crystallib/development/scripts/installer_hero.sh > /tmp/hero_install.sh - ``` -- Run the script as root - ``` - bash /tmp/hero_install.sh - ``` -- Run hero to confirm the installation is done properly - ``` - hero -help - ``` - -## Generate the mdbook - -- Start the ssh-agent - ``` - eval $(ssh-agent) # start the ssh-agent - ``` -- Generate the mdbook with hero - ``` - hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/heroscript - ``` -- Change directory to where the book is built - ``` - cd /root/hero/var/mdbuild/book_name - ``` -- You can then edit the content of the book as with any mdbook - ``` - mdbook build - ``` - -## Access the mdbook from your local machine with the SSH tunnel - -- To serve on your local machine, make sure to use the same part as the one set in your SSH tunnel (here it's port 3333) - ``` - mdbook serve --port 3333 - ``` +

Hero and mdbook on a Full VM

+ +

Table of Contents

+ +- [Introduction](#introduction) +- [Prerequisites](#prerequisites) +- [Setting the Full VM](#setting-the-full-vm) + - [Install cargo](#install-cargo) + - [Install redis](#install-redis) + - [Install pkg-config, gcc and libssl](#install-pkg-config-gcc-and-libssl) +- [Set Hero](#set-hero) +- [Generate the mdbook](#generate-the-mdbook) +- [Access the mdbook from your local machine with the SSH tunnel](#access-the-mdbook-from-your-local-machine-with-the-ssh-tunnel) + +*** + +## Introduction + +We show how to work with mdbook using the [hero](https://github.com/freeflowuniverse/crystallib/tree/development/cli/hero) tool. + +For this guide, we show an example using the mdbook from the repository [info_tfgrid](https://git.ourworld.tf/tfgrid/info_tfgrid). + +This guide can be done locally or on a VM. It should be run as root. We show the steps for a full VM deployed on the TFGrid with WireGuard. + +## Prerequisites + +On the full VM, you will need to install the following: + +- cargo +- redis +- gcc +- pkg-config +- libssl-dev + +Steps will be shown to install those prerequisites. + +## Setting the Full VM + +- Deploy a full VM with WireGuard on the TFGrid +- Connect to the full VM with an SSH tunnel on port 3333 on both local and VM + ``` + ssh -4 -L 3333:127.0.0.1:3333 root@10.20.4.2 + ``` +- Preprare the VM: + ``` + apt update && apt upgrade -y + ``` + +### Install cargo + +Once you install cargo, all mdbook dependencies will be installed via the hero script. + +- Install cargo rust for linux and mac (with default installation) + ``` + curl https://sh.rustup.rs -sSf | sh + ``` +- Configure the current shell + ``` + source "$HOME/.cargo/env" + ``` + +### Install redis + +- Install redis on the VM + ``` + apt install lsb-release curl gpg + curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/redis.list + apt-get update + apt-get install redis -y + ``` + +### Install pkg-config, gcc and libssl + +- Install other packages + ``` + apt install pkg-config -y + apt-get install gcc -y + apt install libssl-dev + ``` + +## Set Hero + +- Download the hero installation script + ``` + curl https://raw.githubusercontent.com/freeflowuniverse/crystallib/development/scripts/installer_hero.sh > /tmp/hero_install.sh + ``` +- Run the script as root + ``` + bash /tmp/hero_install.sh + ``` +- Run hero to confirm the installation is done properly + ``` + hero -help + ``` + +## Generate the mdbook + +- Start the ssh-agent + ``` + eval $(ssh-agent) + ``` +- Generate the mdbook with hero + ``` + hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/heroscript + ``` +- Change directory to where the book is built + ``` + cd /root/hero/var/mdbuild/book_name + ``` +- You can then edit the content of the book as with any mdbook + ``` + mdbook build + ``` + +## Access the mdbook from your local machine with the SSH tunnel + +- To serve on your local machine, make sure to use the same part as the one set in your SSH tunnel (here it's port 3333) + ``` + mdbook serve --port 3333 + ``` - To see the mdbook live, open a browser on the local machine and go to localhost:3333 \ No newline at end of file From a46201f06bf13b973e1832b1dc26b46bc68474da Mon Sep 17 00:00:00 2001 From: mik-tf Date: Thu, 15 Feb 2024 15:12:35 +0000 Subject: [PATCH 11/15] Update docs/hero_mdbook_fullvm.md adjusted typo --- docs/hero_mdbook_fullvm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hero_mdbook_fullvm.md b/docs/hero_mdbook_fullvm.md index 04b8a04..5123de2 100644 --- a/docs/hero_mdbook_fullvm.md +++ b/docs/hero_mdbook_fullvm.md @@ -41,7 +41,7 @@ Steps will be shown to install those prerequisites. ``` ssh -4 -L 3333:127.0.0.1:3333 root@10.20.4.2 ``` -- Preprare the VM: +- Prepare the VM: ``` apt update && apt upgrade -y ``` From 87c22f00e18ea78ab90d2b98fbfb5fc1e3df6295 Mon Sep 17 00:00:00 2001 From: pcone Date: Thu, 15 Feb 2024 14:55:04 -0500 Subject: [PATCH 12/15] added hero mdbook script --- docs/hero_mdbook_fullvm.md | 53 +++++++++++++-------- docs/hero_mdbook_fullvm_script.md | 78 +++++++++++++++++++++++++++++++ scripts/hero_mdbook.sh | 38 +++++++++++++++ 3 files changed, 150 insertions(+), 19 deletions(-) create mode 100644 docs/hero_mdbook_fullvm_script.md create mode 100644 scripts/hero_mdbook.sh diff --git a/docs/hero_mdbook_fullvm.md b/docs/hero_mdbook_fullvm.md index 5123de2..6a333f6 100644 --- a/docs/hero_mdbook_fullvm.md +++ b/docs/hero_mdbook_fullvm.md @@ -3,45 +3,56 @@

Table of Contents

- [Introduction](#introduction) -- [Prerequisites](#prerequisites) - [Setting the Full VM](#setting-the-full-vm) + - [Remote Explorer Access](#remote-explorer-access) - [Install cargo](#install-cargo) - [Install redis](#install-redis) - [Install pkg-config, gcc and libssl](#install-pkg-config-gcc-and-libssl) - [Set Hero](#set-hero) - [Generate the mdbook](#generate-the-mdbook) -- [Access the mdbook from your local machine with the SSH tunnel](#access-the-mdbook-from-your-local-machine-with-the-ssh-tunnel) +- [Serve and View the mdbook](#serve-and-view-the-mdbook) +- [Questions and Feedback](#questions-and-feedback) *** ## Introduction -We show how to work with mdbook using the [hero](https://github.com/freeflowuniverse/crystallib/tree/development/cli/hero) tool. +In this tutorial, we show all the steps to deploy an mdbook with the [hero](https://github.com/freeflowuniverse/crystallib/tree/development/cli/hero) tool. -For this guide, we show an example using the mdbook from the repository [info_tfgrid](https://git.ourworld.tf/tfgrid/info_tfgrid). +For this guide, we show an example using the mdbook from the repository [info_tfgrid](https://git.ourworld.tf/tfgrid/info_tfgrid). This setup can be done locally or on a VM. Note that it should be run as root. -This guide can be done locally or on a VM. It should be run as root. We show the steps for a full VM deployed on the TFGrid with WireGuard. +We show the steps for a full VM deployed on the TFGrid with WireGuard. We use `10.20.4.2` as a WireGuard IP address. Adjust according to your own setup. -## Prerequisites +We will be using SSH to connect to the VM and to create an SSH tunnel between the local machine and the VM. This will allow the mdbook output to be displayed on a local browser. -On the full VM, you will need to install the following: +To manage the mdbook files, we will be using the remote explorer feature of either VSCodium or VSCode. -- cargo -- redis -- gcc -- pkg-config -- libssl-dev +## Setting the Full VM -Steps will be shown to install those prerequisites. - -## Setting the Full VM +We start by deploying a full VM with WireGuard on the TFGrid. We also set an SSH tunnel. - Deploy a full VM with WireGuard on the TFGrid -- Connect to the full VM with an SSH tunnel on port 3333 on both local and VM +- Set an SSH tunnel, on port 3333 for both local and VM ``` ssh -4 -L 3333:127.0.0.1:3333 root@10.20.4.2 ``` -- Prepare the VM: + +Instead of working on the SSH tunnel terminal window, we will be using the remote explorer feature of a source-code editor. + +### Remote Explorer Access + +You can use the remote explorer feature of both [VSCode](https://marketplace.visualstudio.com/items?itemName=ms-vscode.remote-repositories) and [VSCodium](https://open-vsx.org/extension/jeanp413/open-remote-ssh) to manage the mdbook. + +- Open the window `Remote Explorer`, click on `Add New` and write the following in the SSH config file: + ``` + Host 10.20.4.2 + HostName 10.20.4.2 + User root + ``` +- Click on `Connect to Host` +- Open the main `/root` directory +- Right-click on the main window of the directory and select `Open in Integrated Terminal` +- Update and upgrade the VM ``` apt update && apt upgrade -y ``` @@ -113,10 +124,14 @@ Once you install cargo, all mdbook dependencies will be installed via the hero s mdbook build ``` -## Access the mdbook from your local machine with the SSH tunnel +## Serve and View the mdbook - To serve on your local machine, make sure to use the same part as the one set in your SSH tunnel (here it's port 3333) ``` mdbook serve --port 3333 ``` -- To see the mdbook live, open a browser on the local machine and go to localhost:3333 \ No newline at end of file +- To see the mdbook live, open a browser on the local machine and go to localhost:3333 + +## Questions and Feedback + +If you have any questions or feedback, please let us know by either writing a post on the [ThreeFold Forum](https://forum.threefold.io/), or by chatting with us on the [TF Grid Tester Community](https://t.me/threefoldtesting) Telegram channel. \ No newline at end of file diff --git a/docs/hero_mdbook_fullvm_script.md b/docs/hero_mdbook_fullvm_script.md new file mode 100644 index 0000000..1b65565 --- /dev/null +++ b/docs/hero_mdbook_fullvm_script.md @@ -0,0 +1,78 @@ +

Hero and mdbook on a Full VM: Script

+ +

Table of Contents

+ +- [Introduction](#introduction) +- [Setting the Full VM](#setting-the-full-vm) +- [Remote Explorer Access](#remote-explorer-access) +- [Download and Run the Script](#download-and-run-the-script) +- [Serve and View the mdbook](#serve-and-view-the-mdbook) +- [Questions and Feedback](#questions-and-feedback) + +*** + +## Introduction + +In this tutorial, we show how to use a script to deploy an mdbook with the [hero](https://github.com/freeflowuniverse/crystallib/tree/development/cli/hero) tool. + +For this guide, we show an example using the mdbook from the repository [info_tfgrid](https://git.ourworld.tf/tfgrid/info_tfgrid). This setup can be done locally or on a VM. Note that it should be run as root. + +We show the steps for a full VM deployed on the TFGrid with WireGuard. We use `10.20.4.2` as a WireGuard IP address. Adjust according to your own setup. + +We will be using SSH to connect to the VM and to create an SSH tunnel between the local machine and the VM. This will allow the mdbook output to be displayed on a local browser. + +To manage the mdbook files, we will be using the remote explorer feature of either VSCodium or VSCode. + +## Setting the Full VM + +We start by deploying a full VM with WireGuard on the TFGrid. We also set an SSH tunnel. + +- Deploy a full VM with WireGuard on the TFGrid +- Set an SSH tunnel, on port 3333 for both local and VM + ``` + ssh -4 -L 3333:127.0.0.1:3333 root@10.20.4.2 + ``` + +Instead of working on the SSH tunnel terminal window, we will be using the remote explorer feature of a source-code editor. + +## Remote Explorer Access + +You can use the remote explorer feature of both [VSCode](https://marketplace.visualstudio.com/items?itemName=ms-vscode.remote-repositories) and [VSCodium](https://open-vsx.org/extension/jeanp413/open-remote-ssh) to manage the mdbook. + +- Open the window `Remote Explorer`, click on `Add New` and write the following in the SSH config file: + ``` + Host 10.20.4.2 + HostName 10.20.4.2 + User root + ``` +- Click on `Connect to Host` +- Open the main `/root` directory +- Right-click on the main window of the directory and select `Open in Integrated Terminal` + +## Download and Run the Script + +- Download the script + ``` + wget https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/scripts/hero_mdbook.sh + ``` +- Run the script (this will take a couple of minutes) + ``` + source hero_mdbook.sh + ``` + +## Serve and View the mdbook + +- Serve the mdbook + ``` + mdbook serve --port 3333 + ``` +- Open your browser and use the following URL: + ``` + localhost:3333 + ``` + +You can now work on the mdbook and see live the changes your bring to the mdbook files on the remote VM. + +## Questions and Feedback + +If you have any questions or feedback, please let us know by either writing a post on the [ThreeFold Forum](https://forum.threefold.io/), or by chatting with us on the [TF Grid Tester Community](https://t.me/threefoldtesting) Telegram channel. \ No newline at end of file diff --git a/scripts/hero_mdbook.sh b/scripts/hero_mdbook.sh new file mode 100644 index 0000000..3dec9d5 --- /dev/null +++ b/scripts/hero_mdbook.sh @@ -0,0 +1,38 @@ +#!/bin/bash +sed -i "s/#\$nrconf{kernelhints} = -1;/\$nrconf{kernelhints} = -1;/g" /etc/needrestart/needrestart.conf +sed -i "/#\$nrconf{restart} = 'i';/s/.*/\$nrconf{restart} = 'a';/" /etc/needrestart/needrestart.conf +apt update && apt upgrade -y +curl https://sh.rustup.rs -sSf | sh -s -- -y +source "$HOME/.cargo/env" +export PATH=$PATH:/root/.cargo/bin +apt install lsb-release curl gpg +curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/redis.list +apt-get update +apt-get install redis -y +apt install pkg-config -y +apt-get install gcc -y +apt install libssl-dev +curl https://raw.githubusercontent.com/freeflowuniverse/crystallib/development/scripts/installer_hero.sh > /tmp/hero_install.sh +bash /tmp/hero_install.sh +eval $(ssh-agent) +hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/heroscript +cd /root/hero/var/mdbuild/duniayetu +mdbook build +cat < /dev/null; exit \ No newline at end of file From 1a8f636ef3368cf45551c864c608b75723c20dc7 Mon Sep 17 00:00:00 2001 From: pcone Date: Thu, 15 Feb 2024 15:01:14 -0500 Subject: [PATCH 13/15] adjusted wget --- docs/hero_mdbook_fullvm_script.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hero_mdbook_fullvm_script.md b/docs/hero_mdbook_fullvm_script.md index 1b65565..9385877 100644 --- a/docs/hero_mdbook_fullvm_script.md +++ b/docs/hero_mdbook_fullvm_script.md @@ -53,7 +53,7 @@ You can use the remote explorer feature of both [VSCode](https://marketplace.vis - Download the script ``` - wget https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/scripts/hero_mdbook.sh + wget https://git.ourworld.tf/tfgrid/info_tfgrid/raw/branch/main/scripts/hero_mdbook.sh ``` - Run the script (this will take a couple of minutes) ``` From 07c9f7f84fa8fbb64925adb28fedc4c8dcdca738 Mon Sep 17 00:00:00 2001 From: pcone Date: Thu, 15 Feb 2024 16:49:23 -0500 Subject: [PATCH 14/15] simplified process --- docs/hero_mdbook_fullvm.md | 16 +++--------- docs/hero_mdbook_fullvm_script.md | 16 +++--------- scripts/hero_mdbook.sh | 41 +++++++++++++++++++++++++------ 3 files changed, 41 insertions(+), 32 deletions(-) diff --git a/docs/hero_mdbook_fullvm.md b/docs/hero_mdbook_fullvm.md index 6a333f6..afdbf59 100644 --- a/docs/hero_mdbook_fullvm.md +++ b/docs/hero_mdbook_fullvm.md @@ -23,21 +23,13 @@ For this guide, we show an example using the mdbook from the repository [info_tf We show the steps for a full VM deployed on the TFGrid with WireGuard. We use `10.20.4.2` as a WireGuard IP address. Adjust according to your own setup. -We will be using SSH to connect to the VM and to create an SSH tunnel between the local machine and the VM. This will allow the mdbook output to be displayed on a local browser. - -To manage the mdbook files, we will be using the remote explorer feature of either VSCodium or VSCode. +We will be using SSH to connect to the VM and we will access the mdbook output on a local browser. To manage the mdbook files, we will be using the remote explorer feature of either VSCodium or VSCode. ## Setting the Full VM -We start by deploying a full VM with WireGuard on the TFGrid. We also set an SSH tunnel. +We start by deploying a full VM with WireGuard on the TFGrid. -- Deploy a full VM with WireGuard on the TFGrid -- Set an SSH tunnel, on port 3333 for both local and VM - ``` - ssh -4 -L 3333:127.0.0.1:3333 root@10.20.4.2 - ``` - -Instead of working on the SSH tunnel terminal window, we will be using the remote explorer feature of a source-code editor. +To connect to the VM, we will be using a remote explorer. ### Remote Explorer Access @@ -128,7 +120,7 @@ Once you install cargo, all mdbook dependencies will be installed via the hero s - To serve on your local machine, make sure to use the same part as the one set in your SSH tunnel (here it's port 3333) ``` - mdbook serve --port 3333 + mdbook serve --hostname 0.0.0.0 --port 3333 ``` - To see the mdbook live, open a browser on the local machine and go to localhost:3333 diff --git a/docs/hero_mdbook_fullvm_script.md b/docs/hero_mdbook_fullvm_script.md index 9385877..f3aa86a 100644 --- a/docs/hero_mdbook_fullvm_script.md +++ b/docs/hero_mdbook_fullvm_script.md @@ -19,21 +19,13 @@ For this guide, we show an example using the mdbook from the repository [info_tf We show the steps for a full VM deployed on the TFGrid with WireGuard. We use `10.20.4.2` as a WireGuard IP address. Adjust according to your own setup. -We will be using SSH to connect to the VM and to create an SSH tunnel between the local machine and the VM. This will allow the mdbook output to be displayed on a local browser. - -To manage the mdbook files, we will be using the remote explorer feature of either VSCodium or VSCode. +We will be using SSH to connect to the VM and we will access the mdbook output on a local browser. To manage the mdbook files, we will be using the remote explorer feature of either VSCodium or VSCode. ## Setting the Full VM -We start by deploying a full VM with WireGuard on the TFGrid. We also set an SSH tunnel. +We start by deploying a full VM with WireGuard on the TFGrid. -- Deploy a full VM with WireGuard on the TFGrid -- Set an SSH tunnel, on port 3333 for both local and VM - ``` - ssh -4 -L 3333:127.0.0.1:3333 root@10.20.4.2 - ``` - -Instead of working on the SSH tunnel terminal window, we will be using the remote explorer feature of a source-code editor. +To connect to the VM, we will be using a remote explorer. ## Remote Explorer Access @@ -64,7 +56,7 @@ You can use the remote explorer feature of both [VSCode](https://marketplace.vis - Serve the mdbook ``` - mdbook serve --port 3333 + mdbook serve --hostname 0.0.0.0 --port 3333 ``` - Open your browser and use the following URL: ``` diff --git a/scripts/hero_mdbook.sh b/scripts/hero_mdbook.sh index 3dec9d5..d94caa1 100644 --- a/scripts/hero_mdbook.sh +++ b/scripts/hero_mdbook.sh @@ -1,38 +1,63 @@ #!/bin/bash + +# Generate opening text. +cat < /tmp/hero_install.sh bash /tmp/hero_install.sh + +# Start the SSH agent, run hero mdbook and build the mdbook eval $(ssh-agent) hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/heroscript cd /root/hero/var/mdbuild/duniayetu mdbook build + +# Generate closing text after successful script. cat < /dev/null; exit \ No newline at end of file From cc8b0e67e8649b99389e2a991eb4d263fb10bd2c Mon Sep 17 00:00:00 2001 From: mik-tf Date: Fri, 16 Feb 2024 13:34:47 +0000 Subject: [PATCH 15/15] Update README.md adjusted links to docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 864aa2f..d2251be 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ hero -help source ~/.zprofile ``` -There is also a quick guide on setting mdbook and hero on a full VM running on the TFGrid. Read the [docs](./docs/hero_mdbook_fullvm.md) for more information. +There is also a [quick guide](./docs/hero_mdbook_fullvm.md) and a [script](./docs/hero_mdbook_fullvm_script.md) on setting mdbook and hero on a full VM running on the TFGrid. Read the [docs](./docs) for more information. ## to run the book