Skip to content

Commit

Permalink
Add AWS how-to: Launch Ubuntu desktop on EC2
Browse files Browse the repository at this point in the history
  • Loading branch information
k-dimple committed Oct 18, 2023
1 parent 137dc09 commit 37c1a7c
Show file tree
Hide file tree
Showing 11 changed files with 122 additions and 18 deletions.
8 changes: 5 additions & 3 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ vCPUs
PAYG
preemptible
CVEs
config.toml
DaemonSet
containerd
CUDA
allocatable
Remmina
VNC
TightVNC
URL
TCP
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions aws/aws-explanation/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Explanation
===========

Discussion and clarification of some key topics are available here:


.. toctree::
:maxdepth: 1

canonical-offerings
eks-image-retention-policy

4 changes: 2 additions & 2 deletions aws/aws-how-to/eks-gpu-enablement.rst
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
3 changes: 2 additions & 1 deletion aws/aws-how-to/index.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down
91 changes: 91 additions & 0 deletions aws/aws-how-to/launch-ubuntu-desktop.rst
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 2 additions & 4 deletions aws/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`

---------

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions azure/azure-how-to/upgrade-from-focal-to-jammy.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Upgrade from Focal to Jammy on Azure
====================================
Upgrade from Focal to Jammy
===========================

General Advice
---------------
Expand Down
8 changes: 4 additions & 4 deletions google/google-how-to/index.rst
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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::
Expand All @@ -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

4 changes: 2 additions & 2 deletions oracle/oracle-how-to/upgrade-from-focal-to-jammy.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Upgrade from Focal to Jammy on Oracle
=====================================
Upgrade from Focal to Jammy
===========================

General Advice
---------------
Expand Down

0 comments on commit 37c1a7c

Please sign in to comment.