dev2 #78

Merged
mik-tf merged 13 commits from dev2 into development 2024-05-14 22:34:28 +00:00
10 changed files with 225 additions and 14 deletions
Showing only changes of commit 6dbedef137 - Show all commits

View File

@ -32,6 +32,7 @@
- [ownCloud](dashboard/solutions/owncloud.md)
- [Peertube](dashboard/solutions/peertube.md)
- [Presearch](dashboard/solutions/presearch.md)
- [Static Website](dashboard/solutions/static_website.md)
- [Subsquid](dashboard/solutions/subsquid.md)
- [Taiga](dashboard/solutions/taiga.md)
- [Umbrel](dashboard/solutions/umbrel.md)
@ -149,6 +150,7 @@
- [TFGrid Stacks](developers/grid_deployment/tfgrid_stacks.md)
- [Full VM Grid Deployment](developers/grid_deployment/grid_deployment_full_vm.md)
- [Grid Snapshots](developers/grid_deployment/snapshots.md)
- [Deploy the Dashboard](developers/grid_deployment/deploy_dashboard.md)
- [Farmers](farmers/farmers.md)
- [Build a 3Node](farmers/3node_building/3node_building.md)
- [1. Create a Farm](farmers/3node_building/1_create_farm.md)

View File

@ -18,6 +18,7 @@ Easily deploy your favourite applications on the ThreeFold grid with a click of
- [ownCloud](owncloud.md)
- [Peertube](peertube.md)
- [Presearch](presearch.md)
- [Static Website](static_website.md)
- [Subsquid](subsquid.md)
- [Taiga](taiga.md)
- [Umbrel](umbrel.md)

View File

@ -4,7 +4,7 @@ Here you will find everything related to deployments on the ThreeFold grid. This
- Checking the cost of a deployment using [Pricing Calculator](pricing_calculator.md)
- Finding a node to deploy on using the [Node Finder](node_finder.md)
- Deploying your desired workload from [Virtual Machines](vm_intro.md), [Orchestrators](orchestrators.md), or [Applictions](applications.md)
- Deploying your desired workload from [Virtual Machines](vm_intro.md), [Orchestrators](orchestrators.md), or [Applications](applications.md)
- Renting your own node on the ThreeFold grid from [Dedicated Machines](dedicated_machines.md)
- Consulting [Your Contracts](your_contracts.md) on the TFGrid
- Finding or publishing Flists from [Images](images.md)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -0,0 +1,53 @@
<h1> Static Website </h1>
<h2>Table of Contents </h2>
- [Introduction](#introduction)
- [Prerequisites](#prerequisites)
- [Deployment](#deployment)
---
## Introduction
Static Website is an application where a user provides a GitHub repository URL for the files to be automatically served online using Caddy.
## Prerequisites
- Make sure you have a [wallet](wallet_connector.md)
- From the sidebar click on **Applications**
- Click on **Static Website**
## Deployment
![ ](./img/solutions_staticwebsite.png)
- Enter an instance name
- Enter a GitHub repository URL that needs to be cloned
- Enter the title for the cloned repository
- Select a capacity package:
- **Small**: {cpu: 1, memory: 2 , diskSize: 50 }
- **Medium**: {cpu: 2, memory: 4, diskSize: 100 }
- **Large**: {cpu: 4, memory: 16, diskSize: 250 }
- Or choose a **Custom** plan
- `Dedicated` flag to retrieve only dedicated nodes
- `Certified` flag to retrieve only certified nodes
- Choose the location of the node
- `Region`
- `Country`
- `Farm Name`
- Choose the node to deploy on
- Note: You can select a specific node with manual selection
- `Custom Domain` flag allows the user to use a custom domain
- Choose a gateway node to deploy your static website
Once this is done, you can see a list of all of your deployed instances:
![ ](./img/staticwebsite_list.png)
Click on the button **Visit** under **Actions** to go to your static website!

View File

@ -87,4 +87,5 @@ For complementary information on the technology developed by ThreeFold, refer to
- [Grid Deployment](grid_deployment.md)
- [TFGrid Stacks](tfgrid_stacks.md)
- [Full VM Grid Deployment](grid_deployment_full_vm.md)
- [Grid Snapshots](snapshots.md)
- [Grid Snapshots](snapshots.md)
- [Deploy the Dashboard](deploy_dashboard.md)

View File

@ -0,0 +1,139 @@
<h1>Deploy the Dashboard</h1>
<h2>Table of Contents</h2>
- [Introduction](#introduction)
- [Prerequisites](#prerequisites)
- [Create an SSH Tunnel](#create-an-ssh-tunnel)
- [Editor SSH Remote Connection](#editor-ssh-remote-connection)
- [Set the VM](#set-the-vm)
- [Build the Dashboard](#build-the-dashboard)
- [Dashboard Public Access](#dashboard-public-access)
- [Set the Network](#set-the-network)
- [Questions and Feedback](#questions-and-feedback)
***
## Introduction
We show how to deploy the Dashboard (devnet) on a full VM. To do so, we set an SSH tunnel and use the VSCodium Remote Explorer function. We will then be able to use a source-code editor to explore the code and see changes on a local browser.
We also show how to provide a public access to the Dashboard by setting a gateway domain to your full VM deployment. Note that this method is not production-ready and should only be used to test the Dashboard.
## Prerequisites
- TFChain account with TFT
- [Deploy full VM with WireGuard connection](system_administrators@@ssh_wireguard)
- [Make sure you can connect via SSH on the terminal](system_administrators@@ssh_openssh)
In this guide, we use WireGuard, but you can use other connection methods, such as [Mycelium](system_administrators@@mycelium_toc).
## Create an SSH Tunnel
- Open a terminal and create an SSH tunnel
```
ssh -4 -L 5173:127.0.0.1:5173 root@10.20.4.2
```
Simply leave this window open and follow the next steps.
If you use an IPv6 address, e.g. with Mycelium, set `-6` in the line above instead of `-4`.
## Editor SSH Remote Connection
You can connect via SSH through the source-code editor to a VM on the grid. In this example, WireGuard is set.
- Add the SSH Remote extension to [VSCodium](https://vscodium.com/)
- Add a new SSH remote connection
- Set the following (adjust with your own username and host)
```
Host 10.20.4.2
HostName 10.20.4.2
User root
```
- Click on `Connect to host`
## Set the VM
We set the VM to be able to build the Dashboard.
```
apt update && apt install build-essential python3 -y
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install 18
npm install -g yarn
```
## Build the Dashboard
We now build the Dashboard.
Clone the repository, then install, build and run the Dashboard. Note that here it is called `playground`:
```
git clone https://github.com/threefoldtech/tfgrid-sdk-ts
cd tfgrid-sdk-ts/
yarn install
make build
make run project=playground
```
You can then access the dev net Dashboard on your local browser.
To stop running the Dashboard, simply enter ̀`Ctrl-C` on the terminal window.
## Dashboard Public Access
> Note: This method is not production-ready. Use only for testing purposes.
Once you've tested the Dashboard with the SSH tunnel, you can explore how to access it from the public Internet. For this, we will create a gateway domain and bind the host to `0.0.0.0`.
On the Full VM page, [add a domain](dashboard@@add_domain) to access your deployment from the public Internet.
- Under `Actions`, click on `Manage Domains`
- Go to `Add New Domain`
- Choose a gateway domain under `Select domain`
- Set the port 5173
- Click on `Add`
To run the Dashboard from the added domain, use this instead of the previous `make run` line:
```
cd packages/playground
yarn dev --host 0.0.0.0
```
You can then access the Dashboard from the domain you just created.
## Set the Network
You can set the network by running the configuration script. Simply set the network as the **MODE** (e.g. **main**, **test**, **dev**):
```
cd packages/playground/public
MODE=main ../scripts/build-env.sh
```
Once you've set the configuration file, you can build and run the Dashboard.
## 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.

View File

@ -6,4 +6,5 @@ The TFGrid whole source code is open-source and instances of the grid can be dep
- [TFGrid Stacks](tfgrid_stacks.md)
- [Full VM Grid Deployment](grid_deployment_full_vm.md)
- [Grid Snapshots](snapshots.md)
- [Grid Snapshots](snapshots.md)
- [Deploy the Dashboard](deploy_dashboard.md)

View File

@ -5,7 +5,7 @@
- [Introduction](#introduction)
- [Connect to Other Nodes](#connect-to-other-nodes)
- [Possible Peers](#possible-peers)
- [Hosted Public Nodes](#hosted-public-nodes)
- [Default Port](#default-port)
- [Check Network Information](#check-network-information)
- [Test the Network](#test-the-network)
@ -36,18 +36,32 @@ If you are using other tun inferface, e.g. utun3 (default), you can set a differ
mycelium --peers tcp://83.231.240.31:9651 quic://185.206.122.71:9651 --tun-name utun9
```
## Possible Peers
## Hosted Public Nodes
Here are some possible peers.
A couple of public nodes are provided, which can be freely connected to. This allows
anyone to join the global network. These are hosted in 3 geographic regions, on both
IPv4 and IPv6, and supporting both the Tcp and Quic protocols. The nodes are the
following:
```
tcp://146.185.93.83:9651
quic://83.231.240.31:9651
quic://185.206.122.71:9651
tcp://[2a04:f340:c0:71:28cc:b2ff:fe63:dd1c]:9651
tcp://[2001:728:1000:402:78d3:cdff:fe63:e07e]:9651
quic://[2a10:b600:1:0:ec4:7aff:fe30:8235]:9651
```
| Node ID | Region | IPv4 | IPv6 | Tcp port | Quic port |
| --- | --- | --- | --- | --- | --- |
| 01 | DE | 188.40.132.242 | 2a01:4f8:221:1e0b::2 | 9651 | 9651 |
| 02 | DE | 136.243.47.186 | 2a01:4f8:212:fa6::2 | 9651 | 9651 |
| 03 | BE | 185.69.166.7 | 2a02:1802:5e:0:8478:51ff:fee2:3331 | 9651 | 9651 |
| 04 | BE | 185.69.166.8 | 2a02:1802:5e:0:8c9e:7dff:fec9:f0d2 | 9651 | 9651 |
| 05 | FI | 65.21.231.58 | 2a01:4f9:6a:1dc5::2 | 9651 | 9651 |
| 06 | FI | 65.109.18.113 | 2a01:4f9:5a:1042::2 | 9651 | 9651 |
These nodes are all interconnected, so 2 peers who each connect to a different node
(or set of disjoint nodes) will still be able to reach each other. For optimal performance,
it is recommended to connect to all of the above at once however. An example connection
string could be:
`--peers tcp://188.40.132.242:9651 "tcp://[2a01:4f8:212:fa6::2]:9651" quic://185.69.166.7:9651 "tcp://[2a02:1802:5e:0:8c9e:7dff:fec9:f0d2]:9651" tcp://65.21.231.58:9651 "quic://[2a01:4f9:5a:1042::2]:9651"`
It is up to the user to decide which peers he wants to use, over which protocol.
Note that quotation may or may not be required, depending on which shell is being
used.
## Default Port