Skip to content

Commit

Permalink
adjusted guides based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
Mik-TF committed May 3, 2023
1 parent 1dcfb42 commit 05aa1ca
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 46 deletions.
20 changes: 10 additions & 10 deletions src/getstarted/remote-desktop_gui/cockpit_guide/cockpit_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@

In this Threefold Guide, we show how easy it is to deploy a full VM and access Cockpit, a web-based interface to manage servers. For more information on Cockpit, visit this [link](https://cockpit-project.org/).

For more information on deploying a Full VM and using SSH remote connection, read [this SSH guide](https://www2.manual.grid.tf/getstarted/ssh_guide/ssh_guide.html).
For more information on deploying a full VM and using SSH remote connection, read [this SSH guide](../../ssh_guide/ssh_guide.md).

If you are new to the Threefold ecosystem and you want to deploy workloads on the Threefold Grid, read the [Get Started section](https://www2.manual.grid.tf/getstarted/tfgrid3_getstarted.html) of the Threefold Manual.
If you are new to the Threefold ecosystem and you want to deploy workloads on the Threefold Grid, read the [Get Started section](../../tfgrid3_getstarted.md) of the Threefold Manual.

***

## Deploy a Full VM and Create a Root-Access User

To start, you must [deploy and SSH into a Full VM](https://www2.manual.grid.tf/getstarted/ssh_guide/ssh_guide.html).
To start, you must [deploy and SSH into a Full VM](../../ssh_guide/ssh_guide.md).

* Go to the [Threefold Playground](https://play.grid.tf/#/)
* Deploy a Full VM (e.g. Ubuntu 22.04)
* Set an IPv4 Address
* Deploy a full VM (e.g. Ubuntu 22.04)
* With an IPv4 Address
* After deployment, copy the IPv4 address
* In the terminal write
* ```
ssh root@IPv4_address
ssh root@VM_IPv4_address
```
* To create a new user with root access
* Here we use `newuser` as an example
Expand Down Expand Up @@ -57,7 +57,7 @@ To start, you must [deploy and SSH into a Full VM](https://www2.manual.grid.tf/g
* add the authorized public key in the file, then save and quit
* Exit the VM and reconnect with new user
* ```
ssh newuser@IPv4_address
ssh newuser@VM_IPv4_address
```

***
Expand All @@ -73,14 +73,14 @@ To start, you must [deploy and SSH into a Full VM](https://www2.manual.grid.tf/g
. /etc/os-release && sudo apt install -t ${UBUNTU_CODENAME}-backports cockpit -y
```
* Access Cokcpit on a web browser:
* Write the following URL with the 3node IP address:
* Write the following URL with the VM IPv4 address:
* ```
IP_Address:9090
VM_IPv4_Address:9090
```
* Enter the username and password of the root-access user

***

## Conclusion

You now have access to a web-based graphical interface to manage your 3node. Read [Cockpit's documentation](https://cockpit-project.org/documentation.html) to explore further this interface.
You now have access to a web-based graphical interface to manage your VM. Read [Cockpit's documentation](https://cockpit-project.org/documentation.html) to explore further this interface.
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@

## Introduction

In this guide, we deploy a full virtual machine (Ubuntu 20.04) on the Threefold Grid with IPv4. We install and run [Apache Guacamole](https://guacamole.apache.org/) and access the 3node server with remote desktop connection by using [xrdp](https://www.xrdp.org/).
In this guide, we deploy a full virtual machine (Ubuntu 20.04) on the Threefold Grid with IPv4. We install and run [Apache Guacamole](https://guacamole.apache.org/) and access the VM with remote desktop connection by using [xrdp](https://www.xrdp.org/).

The Apache Guacamole instance has a two-factor authorization to give further security to the deployment.

With Apache Guacamole, a user can access different deployments and command servers remotely, with desktop access.

This guide can be done on a Windows, MAC, or Linux computer. For more information on deploying a Full VM and using SSH remote connection, read this [SSH guide](https://www2.manual.grid.tf/getstarted/ssh_guide/ssh_guide.html).
This guide can be done on a Windows, MAC, or Linux computer. For more information on deploying a full VM and using SSH remote connection, read this [SSH guide](../../ssh_guide/ssh_guide.md).

If you are new to the Threefold ecosystem and you want to deploy workloads on the Threefold Grid, read the [Get Started section](https://www2.manual.grid.tf/getstarted/tfgrid3_getstarted.html) of the Threefold Manual.
If you are new to the Threefold ecosystem and you want to deploy workloads on the Threefold Grid, read the [Get Started section](../../tfgrid3_getstarted.md) of the Threefold Manual.

***

## Deploy a Full VM and Create a Root-Access User

* Go to the [Threefold Playground](https://play.grid.tf/#/)
* Deploy a Full VM (Ubuntu 20.04) with at least the minimum specs for a desktop environment
* Deploy a full VM (Ubuntu 20.04) with at least the minimum specs for a desktop environment
* IPv4 Address
* Minimum vcores: 2vcores
* Minimum Gb of RAM: 4Gb
* Minimum storage: 15Gb
* After deployment, note the 3node IPv4 address
* Connect to the 3node server via SSH
* After deployment, note the VM IPv4 address
* Connect to the VM via SSH
* ```
ssh root@3node_IPv4_address
ssh root@VM_IPv4_address
```
* Once connected, create a new user with root access (for this guide we use "newuser")
* ```
Expand Down Expand Up @@ -69,9 +69,9 @@ If you are new to the Threefold ecosystem and you want to deploy workloads on th

## SSH with Root-Access User, Install Prerequisites and Apache Guacamole

* SSH into the 3node
* SSH into the VM
* ```
ssh newuser@3node_IPv4_address
ssh newuser@VM_IPv4_address
```
* Update and upgrade Ubuntu
* ```
Expand All @@ -94,7 +94,7 @@ If you are new to the Threefold ecosystem and you want to deploy workloads on th

* On your local computer, open a browser and write the following URL with the proper IPv4 address
* ```
https://3node_IPv4_address:8080/guacamole
https://VM_IPv4_address:8080/guacamole
```
* On Guacamole, enter the following for both the username and the password
* ```
Expand All @@ -119,7 +119,7 @@ If you are new to the Threefold ecosystem and you want to deploy workloads on th

## Download the Desktop Environment and Run xrdp

* Download a Ubuntu desktop environment on the 3node server
* Download a Ubuntu desktop environment on the VM
* ```
sudo apt install tasksel -y && sudo apt install lightdm -y
```
Expand Down Expand Up @@ -147,7 +147,7 @@ If you are new to the Threefold ecosystem and you want to deploy workloads on th
* Create an RDP connection on Guacamole
* Open Guacamole
* ```
http://3node_IPv4_address:8080/guacamole/
http://VM_IPv4_address:8080/guacamole/
```
* Go to Settings
* Click on Connections
Expand All @@ -157,7 +157,7 @@ If you are new to the Threefold ecosystem and you want to deploy workloads on th
* Location: ROOT
* Protocol: RDP
* Network
* Hostname: 3node_IPv4_Address
* Hostname: VM_IPv4_Address
* Port: 3389
* Authentication
* Username: your root-access username (newuser)
Expand Down
48 changes: 29 additions & 19 deletions src/getstarted/remote-desktop_gui/xrdp_guide/xrdp_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,32 @@
- [Client Side: Install Remote Desktop Connection for Windows, MAC or Linux](#client-side-install-remote-desktop-connection-for-windows-mac-or-linux)
- [Download the App](#download-the-app)
- [Connect Remotely](#connect-remotely)
- [Conclusion](#conclusion)

***

# Introduction
## Introduction

In this guide, we learn how to deploy a full virtual machine on a 3node on the Threefold Grid.
We access Ubuntu with a desktop environment to offer a graphical user interface (GUI).

This guide can be done on a Window, MAC or Linux machine. The only difference will be in the Remote Desktop app. The steps are very similar.
This guide can be done on a Windows, MAC, or Linux computer. The only difference will be in the Remote Desktop app. The steps are very similar.

For more information on deploying a full VM and using SSH remote connection, read this [SSH guide](../../ssh_guide/ssh_guide.md).

If you are new to the Threefold ecosystem and you want to deploy workloads on the Threefold Grid, read the [Get Started section](../../tfgrid3_getstarted.md) of the Threefold Manual.

***

# Server Side: Deploy the Full VM, install a desktop and XRDP
## Server Side: Deploy the Full VM, install a desktop and XRDP

* Go to the [Threefold Playground](https://play.grid.tf/#/)
* Deploy a Full VM (Ubuntu 20.04)
* IPv4 Address
* Deploy a full VM (Ubuntu 20.04)
* With an IPv4 Address
* After deployment, copy the IPv4 address
* To SSH into the 3node, write in the terminal
* To SSH into the VM, write in the terminal
* ```
ssh root@IPv4_address
ssh root@VM_IPv4_address
```
* Once connected, update, upgrade and install the desktop environment
* Update
Expand Down Expand Up @@ -65,9 +70,9 @@ This guide can be done on a Window, MAC or Linux machine. The only difference wi
* ```
exit
```
* Reconnect to the 3node (server) terminal and install XRDP
* Reconnect to the VM terminal and install XRDP
* ```
ssh newuser@IPv4_address
ssh newuser@VM_IPv4_address
```
* Install XRDP
* ```
Expand Down Expand Up @@ -106,7 +111,7 @@ Move to home directory
curl ifconfig.me
```

* On the 3node terminal, allow client computer port to the firewall (ufw)
* On the VM terminal, allow client computer port to the firewall (ufw)
* ```
sudo ufw allow from your_local_ip/32 to any port 3389
```
Expand All @@ -131,13 +136,13 @@ Move to home directory
```
***

# Client Side: Install Remote Desktop Connection for Windows, MAC or Linux
## Client Side: Install Remote Desktop Connection for Windows, MAC or Linux

For the client side (the local computer accessing the 3node remotely), you can use remote desktop connection for Windows, MAC and Linux. The process is very similar in all 3 cases.
For the client side (the local computer accessing the VM remotely), you can use remote desktop connection for Windows, MAC and Linux. The process is very similar in all three cases.

Simply download the app, open it and write the IP address of the 3node. You then will need to write the username and password to enter into your 3node.
Simply download the app, open it and write the IPv4 address of the VM. You then will need to write the username and password to enter into your VM.

## Download the App
### Download the App

* Client side Remote app
* Windows
Expand All @@ -148,11 +153,16 @@ Simply download the app, open it and write the IP address of the 3node. You then
* Linux
* [Remmina RDP Client](https://remmina.org/)

## Connect Remotely
### Connect Remotely

* General process
* In the Remote app, enter the following:
* your IP Address of the 3node
* 3node root-access username
* username password
* You now have remote desktop connection to your 3node
* the IPv4 Address of the VM
* the VM root-access username and password
* You now have remote desktop connection to your VM

***

## Conclusion

You now have a remote access to the desktop environment of your VM. If you have any questions, let us know by writing a post on the [Threefold Forum](https://forum.threefold.io/).
8 changes: 4 additions & 4 deletions src/terraform/advanced/terraform_nextcloud_redundant.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ In this Threefold Guide, we deploy a redundant [Nextcloud](https://nextcloud.com

We will learn how to deploy two micro virtual machines (Ubuntu 22.04) with [Terraform](https://www.terraform.io/). The Terraform deployment will be composed of a virtual private network (VPN) using [Wireguard](https://www.wireguard.com/). The two VMs will thus be connected in a private and secure network. Once this is done, we will link the two VMs together by setting up a [MariaDB](https://mariadb.org/) database and using [GlusterFS](https://www.gluster.org/). Then, we will install and deploy Nextcloud. We will add a DDNS (dynamic DNS) domain to the Nextcloud deployment. It will then be possible to connect to the Nextcloud instance over public internet. Nextcloud will be available over your computer and even your smart phone! We will also set HTTPS for the DDNS domain in order to make the Nextcloud instance as secure as possible. You are free to explore different DDNS options. In this guide, we will be using [DuckDNS](https://www.duckdns.org/) for simplicity.

The advantage of this redundant Nextcloud deployment is obvious: if one of the two 3nodes goes down, the Nextcloud instance will still be accessible, as the other 3node will take the lead. Also, the two 3nodes will be continually synced in real-time. If the master node goes down, the data will be synced to the worker node, and the worker node will become the master node. Once the master 3node goes back online, the data will be synced to the master node and the master node will retake the lead as the master node.
The advantage of this redundant Nextcloud deployment is obvious: if one of the two VMs goes down, the Nextcloud instance will still be accessible, as the other VM will take the lead. Also, the two VMs will be continually synced in real-time. If the master node goes down, the data will be synced to the worker node, and the worker node will become the master node. Once the master VM goes back online, the data will be synced to the master node and the master node will retake the lead as the master node.

This kind of real-time backup of the database is not only limited to Nextcloud. You can use the same architecture to deploy different workloads while having the redundancy over two 3nodes. This architecture could be deployed over more than two 3nodes. Feel free to explore and let us know in the [Threefold Forum](http://forum.threefold.io/) if you come up with exciting and different variations of this kind of deployment.
This kind of real-time backup of the database is not only limited to Nextcloud. You can use the same architecture to deploy different workloads while having the redundancy over two 3node servers. This architecture could be deployed over more than two 3nodes. Feel free to explore and let us know in the [Threefold Forum](http://forum.threefold.io/) if you come up with exciting and different variations of this kind of deployment.

As always, if you have questions concerning this guide, you can write a post on the [Threefold Forum](http://forum.threefold.io/).

Expand Down Expand Up @@ -320,9 +320,9 @@ After deployments, take note of the 3nodes' IPv4 address. You will need those ad

### SSH into the 3nodes

* To [SSH into the 3nodes](https://www2.manual.grid.tf/getstarted/ssh_guide/ssh_guide.html), write the following:
* To [SSH into the 3nodes](../../getstarted/ssh_guide/ssh_guide.md), write the following:
* ```
ssh root@3node_IPv4_Address
ssh root@VM_IPv4_Address
```

* If you've already deployed on other 3nodes, you might need to remove the file `known_hosts` and add the private key in the SSH `.ssh` folder:
Expand Down

0 comments on commit 05aa1ca

Please sign in to comment.