AWS EC2 Instance
Previously we recommended that Windows users use Pushkin through an AWS EC2 instance due to bugs in WSL that made the setup unreliable. This issue seems to have been resolved, so we now recommend using WSL instead of an EC2 instance. Using an EC2 instance has a number of limitations, including:
- You cannot do true local testing via
localhost, as the IPv4 public IP address must be used.
- In our experience, timeout errors are more common on EC2 instances.
- If multiple experiments are installed, the EC2 instances may run out of space with the default amount of storage.
However, users can choose to create a free-tier Amazon Web Services (AWS) EC2 instance for using and deploying Pushkin as an alternative to using WSL on Windows. In your instance, you will be able to run an Ubuntu virtual machine and follow the Ubuntu setup instructions. We suggest accessing this AWS EC2 instance from your local computer using the PuTTY SSH client, though in principle any SSH client for Windows should work.
Complete the sign-up process and go to your inbox to confirm your email address.
Click on the Launch Instance button. In the left sidebar, click the Free tier only check box.
Then, scroll down to Ubuntu Server 18.04 LTS and click Select.
On the next page, click Review and launch in the bottom-right corner.
Next, under the Security Groups heading, select Edit Security Groups on the right-hand side.
Select Add rule scroll down and, under Type, choose HTTP in the drop-down menu. Then, select Add rule again and, under Type, select "HTTPS". Then click Review and Launch in the bottom-right corner.
Click Launch then create a new key pair and give it a name, (e.g., "pushkin-testing-key") and press Download Key Pair. Keep track of where this key has downloaded (it will have a ".pem" extension), as you will need this to connect to your instance later.
Once the key has downloaded, press Launch Instance.
Next, in the box that says "Your instances are now launching," click the instance ID, which will be an alphanumeric string.
This will take you to the AWS EC2 console. You should keep this window open.
Now that you have launched the Ubuntu instance, you can connect to it. We recommend using PuTTY for this. Instructions for configuring PuTTY to connect to your EC2 instance can be found here and are copied here for convenience.
In the Windows start menu, open PuTTYgen.
Under Type of key to generate, choose RSA. If you're using an older version of PuTTYgen, choose SSH-2 RSA.
Choose Load. By default, PuTTYgen displays only files with the extension ".ppk". To locate your ".pem" file, choose the option to display all file types. Select the ".pem" file and choose Open. On the notice that pops up, choose OK.
To save the key in the format that PuTTY can use, choose Save private key. PuTTYgen displays a warning about saving the key without a passphrase. Choose Yes.
Specify the same name for the key that you used for the key pair (in this example, "pushkin-testing-key") and choose Save. PuTTY automatically adds the ".ppk" file extension. After this you can close PuTTYgen.
In the Windows start menu, open PuTTY.
In the Category pane, choose Session.
The public DNS is found on the AWS EC2 console. One example is "ec2-18-191-193-31.us-east-2.compute.amazonaws.com". The 2- and 3-digit numbers will be different for each instance and "us-east-2" is based on what region you are in.
Ensure that the Port value is 22, the under Connection type select SSH.
In the Category pane, expand Connection, expand SSH, then choose Auth.
Choose Browse, then select the ".ppk" file you generated for your key pair and choose Open.
If you plan to start the session again later, you can save the session information. Under Category, choose Session, enter a name for the session in Saved Sessions, and then choose Save.
Note: When you stop running the AWS instance from the AWS console, on restart the IP address and the Public DNS will be different. If you save your settings in PuTTY, you will need to replace part of your host name with the new IP address. All other saved settings remain the same.
You can now choose Open to connect to your instance. PuTTY will display a security alert dialog box asking if you trust the host you are connecting to: choose Yes.
You are now connected to your instance! In the window that appears, run the following commands to update your Ubuntu EC2 instance:
$ sudo apt update
$ sudo apt upgrade
While upgrading, a box may come up that says the following:
A new version of /boot/grub/menu.lst is available, but the version installed currently has been locally modified.
Use the UP arrow key to select
install the package maintainer's versionand press ENTER to continue.
To avoid incurring charges on AWS's Free Tier, always shut down your AWS EC2 instance when you're done using it. To do this, go to the AWS EC2 console, right-click on your instance, expand Instance State, and select Stop. When a dialog box appears, click Yes, Stop.
To restart your instance, go to the AWS EC2 console, right-click on your instance, expand Instance State, and select Start.