-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from threefoldtech/threefold_guides
Threefold guides
- Loading branch information
Showing
8 changed files
with
1,393 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
src/getstarted/remote-desktop_gui/cockpit_guide/cockpit_guide.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<h1> Deploy a Full VM and Run Cockpit, a Web-based Interface for Servers </h1> | ||
|
||
<h2> Table of Contents </h2> | ||
|
||
- [Introduction](#introduction) | ||
- [Deploy a Full VM and Create a Root-Access User](#deploy-a-full-vm-and-create-a-root-access-user) | ||
- [Set the VM, Install and Access Cockpit](#set-the-vm-install-and-access-cockpit) | ||
- [Conclusion](#conclusion) | ||
|
||
*** | ||
|
||
## Introduction | ||
|
||
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](../../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. | ||
|
||
*** | ||
|
||
## Deploy a Full VM and Create a Root-Access User | ||
|
||
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) | ||
* With an IPv4 Address | ||
* After deployment, copy the IPv4 address | ||
* In the terminal write | ||
* ``` | ||
ssh root@VM_IPv4_address | ||
``` | ||
* To create a new user with root access | ||
* Here we use `newuser` as an example | ||
* ``` | ||
adduser newuser | ||
``` | ||
* To see the directory of the `newuser` | ||
* ``` | ||
ls /home | ||
``` | ||
* Give sudo capacity to the new user | ||
* ``` | ||
usermod -aG sudo newuser | ||
``` | ||
* Make the new user accessible by SSH | ||
* ``` | ||
su - newuser | ||
``` | ||
* ``` | ||
mkdir ~/.ssh | ||
``` | ||
* ``` | ||
nano ~/.ssh/authorized_keys | ||
``` | ||
* add the authorized public key in the file, then save and quit | ||
* Exit the VM and reconnect with new user | ||
* ``` | ||
ssh newuser@VM_IPv4_address | ||
``` | ||
|
||
*** | ||
|
||
## Set the VM, Install and Access Cockpit | ||
|
||
* Set the system up to date: | ||
* ``` | ||
sudo apt update -y && sudo apt upgrade -y && sudo apt-get update -y | ||
``` | ||
* Install Cockpit: | ||
* ``` | ||
. /etc/os-release && sudo apt install -t ${UBUNTU_CODENAME}-backports cockpit -y | ||
``` | ||
* Access Cokcpit on a web browser: | ||
* Write the following URL with the VM IPv4 address: | ||
* ``` | ||
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 VM. Read [Cockpit's documentation](https://cockpit-project.org/documentation.html) to explore further this interface. |
184 changes: 184 additions & 0 deletions
184
src/getstarted/remote-desktop_gui/guacamole_guide/guacamole_guide.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
<h1> Deploy a Full VM and Run Apache Guacamole (RDP Connection, Remote Desktop) </h1> | ||
|
||
<h2> Table of Contents </h2> | ||
|
||
- [Introduction](#introduction) | ||
- [Deploy a Full VM and Create a Root-Access User](#deploy-a-full-vm-and-create-a-root-access-user) | ||
- [SSH with Root-Access User, Install Prerequisites and Apache Guacamole](#ssh-with-root-access-user-install-prerequisites-and-apache-guacamole) | ||
- [Access Apache Guacamole and Create Admin-Access User](#access-apache-guacamole-and-create-admin-access-user) | ||
- [Download the Desktop Environment and Run xrdp](#download-the-desktop-environment-and-run-xrdp) | ||
- [Create an RDP Connection and Access the Server Remotely](#create-an-rdp-connection-and-access-the-server-remotely) | ||
- [Feedback and Questions](#feedback-and-questions) | ||
- [References](#references) | ||
|
||
*** | ||
|
||
## 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 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](../../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. | ||
|
||
*** | ||
|
||
## 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 | ||
* IPv4 Address | ||
* Minimum vcores: 2vcores | ||
* Minimum Gb of RAM: 4Gb | ||
* Minimum storage: 15Gb | ||
* After deployment, note the VM IPv4 address | ||
* Connect to the VM via SSH | ||
* ``` | ||
ssh root@VM_IPv4_address | ||
``` | ||
* Once connected, create a new user with root access (for this guide we use "newuser") | ||
* ``` | ||
adduser newuser | ||
``` | ||
* You should now see the new user directory | ||
* ``` | ||
ls /home | ||
``` | ||
* Give sudo capacity to the new user | ||
* ``` | ||
usermod -aG sudo newuser | ||
``` | ||
* Make the new user accessible by SSH | ||
* ``` | ||
su - newuser | ||
``` | ||
* ``` | ||
mkdir ~/.ssh | ||
``` | ||
* Add authorized public key in the file and save it | ||
* ``` | ||
nano ~/.ssh/authorized_keys | ||
``` | ||
* Exit the VM and reconnect with the new user | ||
|
||
*** | ||
|
||
## SSH with Root-Access User, Install Prerequisites and Apache Guacamole | ||
|
||
* SSH into the VM | ||
* ``` | ||
ssh newuser@VM_IPv4_address | ||
``` | ||
* Update and upgrade Ubuntu | ||
* ``` | ||
sudo apt update && sudo apt upgrade -y && sudo apt-get install software-properties-common -y | ||
``` | ||
* Download and run Apache Guacamole | ||
* ``` | ||
wget -O guac-install.sh https://git.io/fxZq5 | ||
``` | ||
* ``` | ||
chmod +x guac-install.sh | ||
``` | ||
* ``` | ||
sudo ./guac-install.sh | ||
``` | ||
|
||
*** | ||
|
||
## Access Apache Guacamole and Create Admin-Access User | ||
|
||
* On your local computer, open a browser and write the following URL with the proper IPv4 address | ||
* ``` | ||
https://VM_IPv4_address:8080/guacamole | ||
``` | ||
* On Guacamole, enter the following for both the username and the password | ||
* ``` | ||
guacadmin | ||
``` | ||
* Download the [TOTP](https://totp.app/) app on your Android or iOS | ||
* Scan the QR Code | ||
* Enter the code | ||
* Next time you log in | ||
* go to the TOTP app and enter the given code | ||
* Go to the Guacamole Settings | ||
* Users | ||
* Create a new user with all admin privileges | ||
* Log out of the session | ||
* Enter with the new admin user | ||
* Go to Settings | ||
* Users | ||
* Delete the default user | ||
* Apache Guacamole is now installed | ||
|
||
*** | ||
|
||
## Download the Desktop Environment and Run xrdp | ||
|
||
* Download a Ubuntu desktop environment on the VM | ||
* ``` | ||
sudo apt install tasksel -y && sudo apt install lightdm -y | ||
``` | ||
* Choose lightdm | ||
* Run tasksel and choose `ubuntu desktop` | ||
* ``` | ||
sudo tasksel | ||
``` | ||
|
||
* Download and run xrdp | ||
* ``` | ||
wget https://c-nergy.be/downloads/xRDP/xrdp-installer-1.4.6.zip | ||
``` | ||
* ``` | ||
unzip xrdp-installer-1.4.6.zip | ||
``` | ||
* ``` | ||
bash xrdp-installer-1.4.6.sh | ||
``` | ||
|
||
*** | ||
|
||
## Create an RDP Connection and Access the Server Remotely | ||
|
||
* Create an RDP connection on Guacamole | ||
* Open Guacamole | ||
* ``` | ||
http://VM_IPv4_address:8080/guacamole/ | ||
``` | ||
* Go to Settings | ||
* Click on Connections | ||
* Click on New Connection | ||
* Write the following parameters | ||
* Name: Choose a name for the connection | ||
* Location: ROOT | ||
* Protocol: RDP | ||
* Network | ||
* Hostname: VM_IPv4_Address | ||
* Port: 3389 | ||
* Authentication | ||
* Username: your root-access username (newuser) | ||
* Password: your root-access username password (newuser) | ||
* Security mode: Any | ||
* Ignore server certificate: Yes | ||
* Click Save | ||
* Go to the Apache Guacamole Home menu (top right button) | ||
* Click on the new connection | ||
* The remote desktop access is done | ||
|
||
*** | ||
|
||
## Feedback and Questions | ||
|
||
If you have any questions, let us know by writing a post on the [Threefold Forum](https://forum.threefold.io/). | ||
|
||
*** | ||
|
||
## References | ||
|
||
Apache Guacamole for Secure Remote Access to your Computers, [https://discussion.scottibyte.com/t/apache-guacamole-for-secure-remote-access-to-your-computers/32](https://discussion.scottibyte.com/t/apache-guacamole-for-secure-remote-access-to-your-computers/32) | ||
|
||
MysticRyuujin's guac-install, [https://github.com/MysticRyuujin/guac-install](https://github.com/MysticRyuujin/guac-install) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Remote Desktop and GUI | ||
|
||
This section of the Threefold Guide provides different methods to access your 3node servers with either a remote desktop protocol or a graphical user interface (GUI). | ||
|
||
If you have any questions, or if you would like to see a specific guide on remote desktop connection or GUI, please let us know by writing a post on the [Threefold Forum](http://forum.threefold.io/). | ||
|
||
<h2>Table of Contents</h2> | ||
|
||
- [Cockpit: a Web-based Graphical Interface for Servers](./cockpit_guide/cockpit_guide.md) | ||
- [XRDP: an Open-Source Remote Desktop Procol](./xrdp_guide/xrdp_guide.md) | ||
- [Apache Guacamole: a Clientless Remote Desktop Gateway.](./guacamole_guide/guacamole_guide.md) |
Oops, something went wrong.