From 37c1a7c33198ab29a6c0cf2e9d434612f21ceeba Mon Sep 17 00:00:00 2001 From: Dimple Kuriakose Date: Thu, 19 Oct 2023 00:24:42 +0530 Subject: [PATCH] Add AWS how-to: Launch Ubuntu desktop on EC2 --- .wordlist.txt | 8 +- .../canonical-offerings.rst | 0 .../eks-image-retention-policy.rst | 0 aws/aws-explanation/index.rst | 12 +++ aws/aws-how-to/eks-gpu-enablement.rst | 4 +- aws/aws-how-to/index.rst | 3 +- aws/aws-how-to/launch-ubuntu-desktop.rst | 91 +++++++++++++++++++ aws/index.rst | 6 +- .../upgrade-from-focal-to-jammy.rst | 4 +- google/google-how-to/index.rst | 8 +- .../upgrade-from-focal-to-jammy.rst | 4 +- 11 files changed, 122 insertions(+), 18 deletions(-) rename aws/{ => aws-explanation}/canonical-offerings.rst (100%) rename aws/{ => aws-explanation}/eks-image-retention-policy.rst (100%) create mode 100644 aws/aws-explanation/index.rst create mode 100644 aws/aws-how-to/launch-ubuntu-desktop.rst diff --git a/.wordlist.txt b/.wordlist.txt index d23047f0..712a2ba5 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -187,8 +187,10 @@ vCPUs PAYG preemptible CVEs -config.toml DaemonSet -containerd -CUDA allocatable +Remmina +VNC +TightVNC +URL +TCP diff --git a/aws/canonical-offerings.rst b/aws/aws-explanation/canonical-offerings.rst similarity index 100% rename from aws/canonical-offerings.rst rename to aws/aws-explanation/canonical-offerings.rst diff --git a/aws/eks-image-retention-policy.rst b/aws/aws-explanation/eks-image-retention-policy.rst similarity index 100% rename from aws/eks-image-retention-policy.rst rename to aws/aws-explanation/eks-image-retention-policy.rst diff --git a/aws/aws-explanation/index.rst b/aws/aws-explanation/index.rst new file mode 100644 index 00000000..164fc980 --- /dev/null +++ b/aws/aws-explanation/index.rst @@ -0,0 +1,12 @@ +Explanation +=========== + +Discussion and clarification of some key topics are available here: + + +.. toctree:: + :maxdepth: 1 + + canonical-offerings + eks-image-retention-policy + \ No newline at end of file diff --git a/aws/aws-how-to/eks-gpu-enablement.rst b/aws/aws-how-to/eks-gpu-enablement.rst index 42bd016d..bb2b2133 100644 --- a/aws/aws-how-to/eks-gpu-enablement.rst +++ b/aws/aws-how-to/eks-gpu-enablement.rst @@ -1,5 +1,5 @@ -Enable GPUs on AWS Ubuntu EKS worker nodes -========================================== +Enable GPUs on EKS worker nodes +=============================== GPU-based EKS worker nodes are needed for many applications, such as for the training of deep learning models. diff --git a/aws/aws-how-to/index.rst b/aws/aws-how-to/index.rst index 92d38b29..3e33303e 100644 --- a/aws/aws-how-to/index.rst +++ b/aws/aws-how-to/index.rst @@ -1,13 +1,14 @@ How-to guides ============= -Linked below are step-by-step guides for some key operations such as: finding the right Ubuntu images, building your own Ubuntu Pro AMI, deploying an EKS cluster, deploying Charmed Kubernetes on Ubuntu Pro, using UEFI Secure Boot and upgrading from Ubuntu 20.04 to 22.04. +Linked below are step-by-step guides for some key operations such as: finding the right Ubuntu images, launching an Ubuntu desktop on EC2, building your own Ubuntu Pro AMI, deploying an EKS cluster, deploying Charmed Kubernetes on Ubuntu Pro, using UEFI Secure Boot, upgrading from Ubuntu 20.04 to 22.04 and enabling GPUs on EKS worker nodes. .. toctree:: :maxdepth: 1 find-ubuntu-images + launch-ubuntu-desktop build-pro-ami-using-packer deploy-ubuntu-pro-cluster deploy-charmed-kubernetes-on-ubuntu-pro diff --git a/aws/aws-how-to/launch-ubuntu-desktop.rst b/aws/aws-how-to/launch-ubuntu-desktop.rst new file mode 100644 index 00000000..ae1f7113 --- /dev/null +++ b/aws/aws-how-to/launch-ubuntu-desktop.rst @@ -0,0 +1,91 @@ +Launch an Ubuntu desktop on EC2 +=============================== + +To create an Ubuntu desktop environment on your EC2 VM, you can use TightVNC as your remote desktop server and Remmina as your local desktop client. + +.. Note:: + + Both the remote EC2 instance and your local machine are assumed to be running Ubuntu 16.04 or greater. + + +Install Ubuntu desktop and TightVNC on your VM +---------------------------------------------- + +To install Ubuntu desktop and TightVNC server on your EC2 instance, SSH into it and run: + +.. code:: + + sudo apt update + sudo apt install ubuntu-desktop + sudo apt install tightvncserver + sudo apt install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal + +Save the password created during the installation of the VNC server. + + +Configure the VNC server +------------------------ + +On your VM, launch the VNC server to create an initial configuration file: + +.. code:: + + vncserver :1 + +Edit the configuration file ``~/.vnc/xstartup`` to include: + +.. code:: + + #!/bin/sh + + export XKL_XMODMAP_DISABLE=1 + unset SESSION_MANAGER + unset DBUS_SESSION_BUS_ADDRESS + + [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup + [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources + xsetroot -solid grey + + vncconfig -iconic & + gnome-panel & + gnome-settings-daemon & + metacity & + nautilus & + gnome-terminal & + + +Kill and restart the VNC server: + +.. code:: + + vncserver -kill :1 + + vncserver :1 + + +Allow traffic on the VNC port +----------------------------- + +To allow an external connection to the VNC server, you'll need to ensure that the relevant port of your VM is open. On your EC2 console, modify the inbound rules for your instance by adding an entry for TCP port 5901: ``Custom TCP Rule | TCP | 5901 | Custom | 0.0.0.0/0 | VNC Connect`` + + +Install Remmina on your local machine +-------------------------------------- + +To access the Ubuntu desktop installed on your VM, use a remote desktop client like Remmina on your local machine. Install Remmina using: + +.. code:: + + sudo apt install remmina + + +Connect to your remote Ubuntu desktop +------------------------------------- + +Launch Remmina, and choose the connection type as 'VNC'. For the connection string, enter your EC2 instance URL along with 1 as the port number, something similar to: + +.. code:: + + ec2-54-172-197-171.compute-1.amazonaws.com:1 + +Select :guilabel:`Connect!` and enter the VNC server password saved earlier. This should give you access to the remote Ubuntu desktop. \ No newline at end of file diff --git a/aws/index.rst b/aws/index.rst index 4c7f5d36..43908703 100644 --- a/aws/index.rst +++ b/aws/index.rst @@ -29,7 +29,7 @@ For each Ubuntu release, we deliver multiple customised images to AWS. These ima * **virtualisation types** - Paravirtual (PV), Hardware Virtual Machine (HVM) * **support/security compliance levels** - standard, Ubuntu Pro, Ubuntu Pro FIPS -For more details read about :doc:`canonical-offerings` +For more details read about :doc:`aws-explanation/canonical-offerings` --------- @@ -49,10 +49,8 @@ suggestions, fixes and constructive feedback. :hidden: :maxdepth: 2 - canonical-offerings aws-how-to/index - eks-image-retention-policy - + aws-explanation/index .. _Code of conduct: https://ubuntu.com/community/governance/code-of-conduct .. _Get support: https://ubuntu.com/cloud/public-cloud diff --git a/azure/azure-how-to/upgrade-from-focal-to-jammy.rst b/azure/azure-how-to/upgrade-from-focal-to-jammy.rst index 2cb7bb0a..58c98dc1 100644 --- a/azure/azure-how-to/upgrade-from-focal-to-jammy.rst +++ b/azure/azure-how-to/upgrade-from-focal-to-jammy.rst @@ -1,5 +1,5 @@ -Upgrade from Focal to Jammy on Azure -==================================== +Upgrade from Focal to Jammy +=========================== General Advice --------------- diff --git a/google/google-how-to/index.rst b/google/google-how-to/index.rst index 097c1263..dce01b5c 100644 --- a/google/google-how-to/index.rst +++ b/google/google-how-to/index.rst @@ -1,10 +1,11 @@ How-to guides ============= -If you want to find Ubuntu images on GCP, create different types of instances based on those images or just launch an Ubuntu desktop on your VM, refer to these guides: +If you want to find Ubuntu images on GCP, create different types of instances based on those images, upgrade from Ubuntu 20.04 to 22.04 or just launch an Ubuntu desktop on your VM, refer to these guides: * :doc:`./find-ubuntu-images` * :doc:`./create-different-instance-types` +* :doc:`./upgrade-from-focal-to-jammy` * :doc:`./launch-ubuntu-desktop` For step-by-step guides related to Ubuntu Pro, use: @@ -14,10 +15,9 @@ For step-by-step guides related to Ubuntu Pro, use: * :doc:`./build-ubuntu-pro-golden-image` * :doc:`./deploy-kubernetes-with-ubuntu-pro` -Finally, if you are creating a customised docker container or upgrading from Ubuntu 20.04 to 22.04, use: +Finally, if you are creating a customised docker container use: * :doc:`./create-customised-docker-container` -* :doc:`./upgrade-from-focal-to-jammy` .. toctree:: @@ -26,11 +26,11 @@ Finally, if you are creating a customised docker container or upgrading from Ubu find-ubuntu-images create-different-instance-types + upgrade-from-focal-to-jammy launch-ubuntu-desktop upgrade-in-place-from-lts-to-pro enable-pro-features build-ubuntu-pro-golden-image deploy-kubernetes-with-ubuntu-pro create-customised-docker-container - upgrade-from-focal-to-jammy \ No newline at end of file diff --git a/oracle/oracle-how-to/upgrade-from-focal-to-jammy.rst b/oracle/oracle-how-to/upgrade-from-focal-to-jammy.rst index e2c081d9..0fc745f6 100644 --- a/oracle/oracle-how-to/upgrade-from-focal-to-jammy.rst +++ b/oracle/oracle-how-to/upgrade-from-focal-to-jammy.rst @@ -1,5 +1,5 @@ -Upgrade from Focal to Jammy on Oracle -===================================== +Upgrade from Focal to Jammy +=========================== General Advice ---------------