|
| 1 | +Using EC2 Instances with a GUI |
| 2 | +============================== |
| 3 | + |
| 4 | +Table of Contents |
| 5 | +----------------- |
| 6 | + |
| 7 | +- `What is Amazon DCV? <#what-is-amazon-dcv>`__ |
| 8 | +- `Installing the Amazon DCV Server on an Amazon EC2 |
| 9 | + Instance <#installing-the-amazon-dcv-server-on-an-amazon-ec2-instance>`__ |
| 10 | + |
| 11 | + - `Prerequisites <#prerequisites>`__ |
| 12 | + - `Amazon DCV Server Installation <#amazon-dcv-server-installation>`__ |
| 13 | + - `Post-Installation Checks <#post-installation-checks>`__ |
| 14 | + - `Setting a Password for Your |
| 15 | + Sessions <#setting-a-password-for-your-sessions>`__ |
| 16 | + - `Setting Security Rules to Allow Traffic on Port |
| 17 | + 8443 <#setting-security-rules-to-allow-traffic-on-port-8443>`__ |
| 18 | + |
| 19 | +- `Amazon DCV Client Installation <#amazon-dcv-client-installation>`__ |
| 20 | +- `Basic Session Management <#basic-session-management>`__ |
| 21 | + |
| 22 | + - `Quick Session Startup <#quick-session-startup>`__ |
| 23 | + |
| 24 | +What is Amazon DCV? |
| 25 | +------------------- |
| 26 | + |
| 27 | +`Amazon |
| 28 | +DCV <https://docs.aws.amazon.com/dcv/latest/adminguide/what-is-dcv.html>`__ |
| 29 | +is a high-performance remote display protocol that provides customers |
| 30 | +with a secure way to deliver remote desktops and application streaming |
| 31 | +from any cloud or data center to any device, over varying network |
| 32 | +conditions. With Amazon DCV and Amazon EC2, customers can run |
| 33 | +graphics-intensive applications remotely on EC2 instances and stream the |
| 34 | +results to simpler client machines, eliminating the need for expensive |
| 35 | +dedicated workstations. |
| 36 | + |
| 37 | +This guide helps customers developing for AWS F2 instances create a |
| 38 | +virtual desktop running on EC2 instances based on the `FPGA Developer |
| 39 | +AMI <../User-Guide-AWS-EC2-FPGA-Development-Kit.html#fpga-developer-ami>`__. |
| 40 | +The FPGA Developer AMI has pre-installed tools which are license free. |
| 41 | +Combined with DCV, this enables development using Vivado or Vitis' |
| 42 | +graphical Integrated Design Environment (IDE), which provides an |
| 43 | +intuitive graphical user interface (GUI) to visualize FPGA development |
| 44 | +in the cloud. |
| 45 | + |
| 46 | +Installing the Amazon DCV Server on an Amazon EC2 Instance |
| 47 | +---------------------------------------------------------- |
| 48 | + |
| 49 | +Prerequisites |
| 50 | +~~~~~~~~~~~~~ |
| 51 | + |
| 52 | +1. `Depenency |
| 53 | + Installation <https://docs.aws.amazon.com/dcv/latest/adminguide/setting-up-installing-linux-prereq.html#linux-prereq-gui>`__ |
| 54 | + |
| 55 | + - ⚠️ DO NOT PERFORM STEP 3! Upgrading may impact the stability of |
| 56 | + development kit software! |
| 57 | + |
| 58 | +2. `Protocol |
| 59 | + Setup <https://docs.aws.amazon.com/dcv/latest/adminguide/setting-up-installing-linux-prereq.html#linux-prereq-wayland>`__ |
| 60 | +3. `Driver |
| 61 | + Installation <https://docs.aws.amazon.com/dcv/latest/adminguide/setting-up-installing-linux-prereq.html#linux-prereq-nongpu>`__ |
| 62 | + |
| 63 | +Amazon DCV Server Installation |
| 64 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 65 | + |
| 66 | +In the `install procedure described |
| 67 | +here <https://docs.aws.amazon.com/dcv/latest/adminguide/setting-up-installing-linux-server.html#linux-server-install>`__, |
| 68 | +follow steps 1 through 5, 7, and 8. When you get to step 9, do the |
| 69 | +following: |
| 70 | + |
| 71 | +.. code:: bash |
| 72 | +
|
| 73 | + sudo apt --fix-broken install |
| 74 | + sudo apt install -y mesa-utils |
| 75 | + sudo dpkg -i nice-dcv-gl_2024.0.1096-1_amd64.ubuntu<2404 or 2004>.deb |
| 76 | +
|
| 77 | +Post-Installation Checks |
| 78 | +~~~~~~~~~~~~~~~~~~~~~~~~ |
| 79 | + |
| 80 | +`This section of the post-installation |
| 81 | +check <https://docs.aws.amazon.com/dcv/latest/adminguide/setting-up-installing-linux-checks.html#checks-xserver>`__ |
| 82 | +should be run to ensure that all aspects of the setup are working as |
| 83 | +expected. |
| 84 | + |
| 85 | +Setting a Password for Your Sessions |
| 86 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 87 | + |
| 88 | +In order to connect to an Amazon DCV session, you must have a password |
| 89 | +set for your user on the EC2 instance. This can be done with this |
| 90 | +command: |
| 91 | + |
| 92 | +.. code:: bash |
| 93 | +
|
| 94 | + sudo passwd $USER |
| 95 | +
|
| 96 | +Setting Security Rules to Allow Traffic on Port 8443 |
| 97 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 98 | + |
| 99 | +In order for Amazon DCV to communicate with your EC2 instance, TCP and |
| 100 | +UDP traffic must be allowed on port 8443. This can be accomplished by |
| 101 | +updating the security group you used to launch your instance. |
| 102 | + |
| 103 | +Amazon DCV Client Installation |
| 104 | +------------------------------ |
| 105 | + |
| 106 | +The `Amazon DCV client <https://www.amazondcv.com/>`__ should be |
| 107 | +installed on your local machine and is used to view your virtual |
| 108 | +desktop on your EC2 instance. |
| 109 | + |
| 110 | +Basic Session Management |
| 111 | +------------------------ |
| 112 | + |
| 113 | +To begin, run the following two commands: |
| 114 | + |
| 115 | +.. code:: bash |
| 116 | +
|
| 117 | + sudo systemctl isolate multi-user.target (Ubuntu 20.04 only) |
| 118 | + sudo systemctl restart dcvserver.service |
| 119 | + sudo systemctl restart dcvsessionlauncher.service |
| 120 | +
|
| 121 | +Next, refer to the `session management user guide |
| 122 | +here <https://docs.aws.amazon.com/dcv/latest/adminguide/managing-sessions.html>`__. |
| 123 | +This guide will provide you with all of the information you need to |
| 124 | +customize and manage your Amazon DCV sessions. |
| 125 | + |
| 126 | +Quick Session Startup |
| 127 | +~~~~~~~~~~~~~~~~~~~~~ |
| 128 | + |
| 129 | +To start a session, use the following command: |
| 130 | + |
| 131 | +.. code:: bash |
| 132 | +
|
| 133 | + dcv create-session $your_session_number |
| 134 | + dcv list-sessions |
| 135 | + Session: '1' (owner:ubuntu type:virtual) |
| 136 | +
|
| 137 | +You may give your session any number you like, but no two sessions may |
| 138 | +have the same number. |
| 139 | + |
| 140 | +From this point, you can access your session using the Amazon DCV client |
| 141 | +on your local machine or via the `DCV console in your web browser <https://docs.aws.amazon.com/dcv/latest/userguide/using-connecting-browser-connect.html>`__. |
| 142 | + |
| 143 | +Enter ``https://user@ec2_instance_ip_address:8443`` into the |
| 144 | +``Hostname or IP Address`` box and click ``Connect``. Next, click "Trust |
| 145 | +and Connect". |
| 146 | + |
| 147 | +Enter the password you set in `Post-Installation |
| 148 | +Checks <#post-installation-checks>`__ in the ``Password`` box and click |
| 149 | +``Login``. |
| 150 | + |
| 151 | +At this point, you should see your session begin and a virtual desktop |
| 152 | +displayed after a brief delay. |
| 153 | + |
| 154 | +Any popups about not having a license may be safely ignored. This is a |
| 155 | +known issue with DCV. |
| 156 | + |
| 157 | +Now, open a terminal and run the following command: |
| 158 | +``source /etc/profile.d/default_module.sh``. You're now ready to use |
| 159 | +your GUI-enabled EC2 Instance. |
| 160 | + |
| 161 | +.. code:: bash |
| 162 | +
|
| 163 | + ubuntu@ip-1-2-3-4:~$ source /etc/profile.d/default_module.sh |
| 164 | + ubuntu@ip-1-2-3-4:~$ vivado -version |
| 165 | + vivado v2024.1 (64-bit) |
0 commit comments