updated sync with info_grid

This commit is contained in:
mik-tf
2024-08-29 18:15:05 -04:00
parent 350531c668
commit 4b44fa1664
37 changed files with 813 additions and 184 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1018 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -0,0 +1,142 @@
<h1>Minetest on the TFGrid</h1>
<h2>Table of Contents</h2>
- [Introduction](#introduction)
- [Prerequisites](#prerequisites)
- [Deploy a Full VM](#deploy-a-full-vm)
- [DNS Settings](#dns-settings)
- [DNS Verification](#dns-verification)
- [Run a Minetest Server on the TFGrid](#run-a-minetest-server-on-the-tfgrid)
- [Run Minetest Locally](#run-minetest-locally)
- [Access the Server from Minetest](#access-the-server-from-minetest)
- [Public Server Notes](#public-server-notes)
- [References](#references)
---
## Introduction
We show how to deploy a Minetest server on the TFGrid, install Minetest on a local machine and access the Minetest server from the local machine.
![](./img/minetest_1.png)
## Prerequisites
- [A TFChain account](dashboard@@wallet_connector)
- TFT in your TFChain account
- [Buy TFT](threefold_token@@buy_sell_tft)
- [Send TFT to TFChain](threefold_token@@tft_bridges)
## Deploy a Full VM
We start by deploying a full VM on the ThreeFold Dashboard.
* On the [Threefold Dashboard](https://dashboard.grid.tf/#/), go to the [full virtual machine deployment page](https://dashboard.grid.tf/#/deploy/virtual-machines/full-virtual-machine/)
* Deploy a full VM (Ubuntu 22.04) with an IPv4 address and at least the minimum specs for a full VM
* Network
* Set IPv4 Address (required)
* Set Wireguard (optional)
* Minimum vcores: 1vcore
* Minimum MB of RAM: 512MB
* Minimum storage: 15GB
* After deployment, note the VM IPv4 address
* SSH into the VM
```
ssh root@vm_ipv4_address
```
## DNS Settings
You need to set an A record for the IPv4 address.
The following table explicitly shows how to set the A record for your domain. Note that we set `minetest` as a subdomain.
| Type | Host | Value |
| ---- | ---- | -------------- |
| A | minetest | <ipv4_address> |
You will then be able to access your server on Minetest with the URL `minetest.example.com:30033`. More on the port below.
### DNS Verification
You can use tools such as [DNSChecker](https://dnschecker.org/) or [dig](https://linux.die.net/man/1/dig) on a terminal to check if the DNS propagadation is complete.
- Check that the subdomain resolves to the IPv4 address of the full VM
```
minetest.example.com
```
## Run a Minetest Server on the TFGrid
- Install the Minetest server
```
apt update
apt install minetest-server -y
```
- Set the Minetest server
```
nano /etc/minetest/minetest.conf
```
- Update the following lines
```
server_name = Server Name
server_address = http://minetest.example.com
server_announce = true
port = 30033
```
- Run the Minetest server
```
minetestserver --worldname world
```
## Run Minetest Locally
- Update the local machine
```
apt update
```
- Install Minetest
```
apt install flatpak -y
apt install gnome-software-plugin-flatpak -y
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
```
- Reboot the machine
- Install Minetest
```
flatpak install flathub net.minetest.Minetest
```
- Run Minetest
```
flatpak run net.minetest.Minetest
```
## Access the Server from Minetest
- On Minetest, go to the server you previously set
![](./img/minetest_2.png)
- You can then access the Minetest world!
![](./img/minetest_3.png)
## Public Server Notes
Once you set the Minetest server publicly, you can see it displayed on https://servers.minetest.net/.
- Example of publicly available server
![](./img/minetest_4.png)
## References
For further information on Minetest, read the [Minetest documentation](https://wiki.minetest.net/Main_Page).

View File

@@ -9,8 +9,7 @@ In this section, tailored specifically for system administrators, we'll delve in
- [CLI and Scripts Basics](cli_scripts_basics.md)
- [Docker Basics](docker_basics.md)
- [Git and GitHub Basics](git_github_basics.md)
- [Gitea](gitea_toc.md)
- [Firewall Basics](firewall_basics.md)
- [UFW Basics](ufw_basics.md)
- [Firewalld Basics](firewalld_basics.md)
- [File Transfer](file_transfer.md)
- [Screenshots](screenshots.md)

View File

@@ -0,0 +1,98 @@
<h1>Gitea API</h1>
<h2>Table of Contents</h2>
- [Introduction](#introduction)
- [Swagger](#swagger)
- [CLI](#cli)
- [Swagger and CLI](#swagger-and-cli)
- [API Authorization](#api-authorization)
- [References](#references)
---
## Introduction
We show how to use the Gitea API with both Swagger and CLI.
## Swagger
The Gitea API is available with the slugs `/api/swagger#` after your Gitea domain URL.
- For ThreeFold, we use the following Gitea API:
```
https://git.ourworld.tf/api/swagger#/
```
You can access different levels of the Gitea instance:
![](./img/api_overview.png)
You can use the Swagger for different queries. Parameters are expained for each example so it is a fairly intuitive use.
For example, to get the raw content of a file, you can use the following:
- Go to the section `Get a file from a repository`.
- In this example, we query the tfgrid organization and its repository `info_tfgrid` for the branch `main`. We write the path of the file.
![](./img/api_example_file.png)
Once you tried a query on the API, you can take the curl command example to query the same information from the CLI. We check this in the next section.
## CLI
To use the API with a command line interface, you can use curl.
For example, we take the raw content of a file:
```
curl -X 'GET' \
'https://git.ourworld.tf/api/v1/repos/tfgrid/info_tfgrid/raw/heroscript%2Fduniayetu%2Fbook_collections.md?ref=main' \
-H 'accept: application/json'
```
We can save this in a file by adding `> filename.txt` after the line above:
```
curl -X 'GET' \
'https://git.ourworld.tf/api/v1/repos/tfgrid/info_tfgrid/raw/heroscript%2Fduniayetu%2Fbook_collections.md?ref=main' \
-H 'accept: application/json' > filename.txt
```
## Swagger and CLI
A combination of the Swagger and the CLI can be very effective.
First, find the proper `curl` command by using the Gitea Swagger, then use the CLI to pass the `curl` commands.
## API Authorization
If you want to query information that is access-protected, such as a private repository, you first need to create a Gitea access token and then log into the Gitea API with the token.
Once this is done, every Swagger request you ask will be accompanied with the access token.
- Create an access token directly on Gitea
- Go to the `Applications` section of the `User Settings` [on Gitea](https://git.ourworld.tf/user/settings/applications)
- Under `Manage Access Tokens`, choose a `Token Name`
- Select either ̀`Public only` or `All (public, private and limited)`. For private access, choose the latter
- You must select at least one permission to create a token. Click on `Select permissions` and choose the permissions for your token
- Click on `Generate token`
- Copy the generate token and keep it somewhere safe
![](./img/gitea_token.png)
- Log in the Gitea API with your access token
- On the top of the Gitea API page, click on `Authorize`
<p align="center">
<img src="./img/gitea_authorize_token.png" />
</p>
- In `AuthorizationHeaderToken (apiKey)` write `token` followed by a space and then paste your token, e.g.:
- `token 1234567890`
- Once you're logged in with your token, you can make queries with the API
## References
You can learn more by reading the [Gitea API documentation](https://docs.gitea.com/development/api-usage).

View File

@@ -0,0 +1,194 @@
<h1>Gitea Basics</h1>
<h2>Table of Contents</h2>
- [Introduction](#introduction)
- [Prerequisites](#prerequisites)
- [Register](#register)
- [Sign In](#sign-in)
- [Set an SSH Key Pair](#set-an-ssh-key-pair)
- [Start the SSH Agent](#start-the-ssh-agent)
- [Clone a Repository](#clone-a-repository)
- [Create and Push a New Branch](#create-and-push-a-new-branch)
- [On the Browser and Git](#on-the-browser-and-git)
- [Only With Git](#only-with-git)
- [Create a Pull Request](#create-a-pull-request)
- [Create a Draft Pull Request](#create-a-draft-pull-request)
- [Useful Commands](#useful-commands)
- [Gitea References](#gitea-references)
---
## Introduction
We present a basic guide for Gitea, a forge software package for hosting software development version control using Git as well as other collaborative features like bug tracking, code review, continuous integration, kanban boards, tickets, and wikis.
ThreeFold hosts its own git server on [Gitea OurWorld](https://git.ourworld.tf). We will be using OurWorld's Gitea instance for this guide.
## Prerequisites
You should have git installed on your computer to work easily with Gitea. It is not necessary to use Gitea but recommended to work with files.
- Install [git](../git_github_basics.md#install-git)
- Optional, to update repositories from your local computer
- Install [VSCodium](../git_github_basics.md#vs-codium)
- Optional, to edit your files
- Install [OpenSSH](../../getstarted/ssh_guide/ssh_openssh.md)
- Optional, to use SSH
## Register
- Go to the main gitea URL, e.g. [https://git.ourworld.tf](https://git.ourworld.tf)
- On the top right click on `Register`
- Set your credentials
- Enter a `Username`
- Enter your `Email Address`
- Enter and confirm a `Password`
- Click on `Register Account`
![](./img/gitea_register.png)
## Sign In
- Go to the main Gitea URL, e.g. [https://git.ourworld.tf](https://git.ourworld.tf)
- On the top right click on `Sign In`
- Set your credentials
- Enter your `Username` or your `Email Address`
- Enter your `Password`
- Click on `Sign In`
![](./img/gitea_sign_in.png)
## Set an SSH Key Pair
- Generate an SSH key pair. You can leave default option `~/.ssh/id_rsa.pub`
```
ssh-keygen
```
- Note the public key
```
cat ~/.ssh/id_rsa.pub
```
- [Add the SSH public key on git.ourworld.tf](https://git.ourworld.tf/user/settings/keys)
- Click on `Add Key` on the top right
- Paste the public key in `Content`
- The `Key Name` will be added automatically
- Click on `Add key` under `Content`
![](./img/gitea_ssh_key.png)
- Optional: on git.ourworld.tf, verify the key. Make sure to put the proper token.
```
echo -n 'token' | ssh-keygen -Y sign -n gitea -f ~/.ssh/id_rsa
```
## Start the SSH Agent
- Start the ssh agent
```
eval $(ssh-agent)
```
- Add private key to the agent
```
ssh-add ~/.ssh/id_rsa.pub
```
## Clone a Repository
- Clone a repository and change directory
```
git clone <repository_url>
cd <repository_url>
```
## Create and Push a New Branch
### On the Browser and Git
- On the repo of the Gitea instance, click on the ̀`Branch` icon (e.g. `development`)
- Write a branch name with the `development_branch_name` convention
- Click `Create branch`
![](./img/gitea_new_branch.png)
```
git checkout development
git fetch
git pull
```
- Make changes in the files
- When changes are done, make a new branch, add the new files, commit and push to the remote server
```
git add .
git commit -m "Commit message for new branch"
git push
```
### Only With Git
- Start by working on the latest development release
```
git checkout development
git fetch
git pull
```
- Make changes in the files
- When changes are done, make a new branch, add the new files, commit and push to the remote server
```
git checkout -b development_new_branch
git add .
git commit -m "Commit message for new branch"
git push --set-upstream origin development_new_branch
```
## Create a Pull Request
- Go to the repo of the Gitea instance
- Click on `Pull Request` then `New Pull Request`
![](./img/gitea_new_pr.png)
- Choose the branch you want to merge into development for `pull from` then click `New Pull Request`
- At ThreeFold, we protect the master/main and development branches and always make Pull Request from `development_branch_name` to `development`
![](./img/gitea_pr_create.png)
- On the next page, choose a `Title` and a `Description`, then click `Create Pull Request`
- Usually, we write at least any related issue and a brief description of the work done
![](./img/gitea_pr_title_description.png)
- At any time you can close your own Pull Request
![](./img/gitea_close_pr.png)
### Create a Draft Pull Request
To create a draft pull request, you simply need to add `WIP:` before the title of your pull request. This will set the pull request in Draft mode.
- Example of a draft pull request:
```
WIP: New Pull Request in Draft Mode
```
## Useful Commands
- See current branch
```
git branch
```
- See all branches locally
```
git branch -r
```
- See the git status
```
git status
```
## Gitea References
There are great Gitea references available online.
- [Gitea Docs](https://docs.gitea.com/)
- [Gitea Cheat Sheet](https://docs.gitea.com/administration/config-cheat-sheet)

View File

@@ -0,0 +1,6 @@
# Gitea
## Table of Contents
- [Gitea Basics](./gitea_basics.md)
- [Gitea API](./gitea_api.md)

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -7,89 +7,11 @@ For complementary information on ThreeFold grid and its cloud component, refer t
<h2> Table of Contents </h2>
- [Getting Started](tfgrid3_getstarted.md)
- [SSH Remote Connection](ssh_guide.md)
- [SSH with OpenSSH](ssh_openssh.md)
- [SSH with PuTTY](ssh_putty.md)
- [SSH with WSL](ssh_wsl.md)
- [WireGuard Access](ssh_wireguard.md)
- [Remote Desktop and GUI](remote_desktop_gui.md)
- [Cockpit: a Web-based Interface for Servers](cockpit_guide.md)
- [XRDP: an Open-Source Remote Desktop Protocol](xrdp_guide.md)
- [Apache Guacamole: a Clientless Remote Desktop Gateway](guacamole_guide.md)
- [Planetary Network](planetarynetwork.md)
- [TFGrid Services](tf_grid_services_readme.md)
- [GPU](gpu_toc.md)
- [GPU Support](gpu.md)
- [Terraform](terraform_toc.md)
- [Overview](terraform_readme.md)
- [Installing Terraform](terraform_install.md)
- [Terraform Basics](terraform_basics.md)
- [Full VM Deployment](terraform_full_vm.md)
- [GPU Support](terraform_gpu_support.md)
- [Resources](terraform_resources_readme.md)
- [Using Scheduler](terraform_scheduler.md)
- [Virtual Machine](terraform_vm.md)
- [Web Gateway](terraform_vm_gateway.md)
- [Kubernetes Cluster](terraform_k8s.md)
- [ZDB](terraform_zdb.md)
- [Zlogs](terraform_zlogs.md)
- [Quantum Safe Filesystem](terraform_qsfs.md)
- [QSFS on Micro VM](terraform_qsfs_on_microvm.md)
- [QSFS on Full VM](terraform_qsfs_on_full_vm.md)
- [CapRover](terraform_caprover.md)
- [Advanced](terraform_advanced_readme.md)
- [Terraform Provider](terraform_provider.md)
- [Terraform Provisioners](terraform_provisioners.md)
- [Mounts](terraform_mounts.md)
- [Capacity Planning](terraform_capacity_planning.md)
- [Updates](terraform_updates.md)
- [SSH Connection with Wireguard](terraform_wireguard_ssh.md)
- [Set a Wireguard VPN](terraform_wireguard_vpn.md)
- [Synced MariaDB Databases](terraform_mariadb_synced_databases.md)
- [Nomad](terraform_nomad.md)
- [Nextcloud Deployments](terraform_nextcloud_toc.md)
- [Nextcloud All-in-One Deployment](terraform_nextcloud_aio.md)
- [Nextcloud Single Deployment](terraform_nextcloud_single.md)
- [Nextcloud Redundant Deployment](terraform_nextcloud_redundant.md)
- [Nextcloud 2-Node VPN Deployment](terraform_nextcloud_vpn.md)
- [Pulumi](pulumi_readme.md)
- [Introduction to Pulumi](pulumi_intro.md)
- [Installing Pulumi](pulumi_install.md)
- [Deployment Examples](pulumi_examples.md)
- [Deployment Details](pulumi_deployment_details.md)
- [Mycelium](mycelium_toc.md)
- [Overview](overview.md)
- [Installation](installation.md)
- [Additional Information](information.md)
- [Message](message.md)
- [Packet](packet.md)
- [Data Packet](data_packet.md)
- [API YAML](api_yaml.md)
- [Computer and IT Basics](computer_it_basics.md)
- [CLI and Scripts Basics](cli_scripts_basics.md)
- [Docker Basics](docker_basics.md)
- [Git and GitHub Basics](git_github_basics.md)
- [Firewall Basics](firewall_basics.md)
- [UFW Basics](ufw_basics.md)
- [Firewalld Basics](firewalld_basics.md)
- [File Transfer](file_transfer.md)
- [Screenshots](screenshots.md)
- [Advanced](advanced.md)
- [Token Transfer Keygenerator](token_transfer_keygenerator.md)
- [Cancel Contracts](cancel_contracts.md)
- [Contract Bills Reports](contract_bill_report.md)
- [Listing Free Public IPs](list_public_ips.md)
- [Cloud Console](cloud_console.md)
- [Redis](grid3_redis.md)
- [IPFS](ipfs_toc.md)
- [IPFS on a Full VM](ipfs_fullvm.md)
- [IPFS on a Micro VM](ipfs_microvm.md)
- [MinIO Operator with Helm3](minio_helm3.md)
- [Hummingbot](hummingbot.md)
- [AI & ML Workloads](ai_ml_workloads.md)
- [Ecommerce](ecommerce.md)
- [WooCommerce](woocommerce.md)
- [nopCommerce](nopcommerce.md)
- [Hummingbot](hummingbot.md)
- [HTTPS with Caddy](https_caddy.md)
- [Node Status Bot](node_status_bot.md)
- [Advanced](advanced.md)

View File

@@ -13,6 +13,7 @@ In this section, we'll embark on a journey to explore the powerful capabilities
- [Get Started](#get-started)
- [Features](#features)
- [What is Not Supported](#what-is-not-supported)
- [OpenTofu: Alternative to Terraform](#opentofu-alternative-to-terraform)
***
@@ -43,3 +44,7 @@ Threefold loves Open Source! In v3.0 we are integrating one of the most popular
## What is Not Supported
- we don't support updates/upgrades, if you want a change you need to destroy a deployment & re-create your deployment this in case you want to change the current running instances properties or change the node, but adding a vm to an existing deployment this shouldn't affect other running vm and same if we need to decommission a vm from a deployment this also shouldn't affect the others
## OpenTofu: Alternative to Terraform
[OpenTofu](https://opentofu.org/) is a fully open-source Terraform fork that is backward compatible with all prior versions of Terraform up to version 1.6. This alternative can be used instead of Terraform for the following sections. You might need to make changes depending on the version you are working with. Check the [OpenTofu Docs](https://opentofu.org/docs/) for more information.