-
Notifications
You must be signed in to change notification settings - Fork 7
Remote Server using AWS
A remote, web accessible version of the PiScout Server is a great way to make scouting data accessible for your team (or to share with other teams!)
An easy way to set up such a server is to use Amazon Web Services (AWS). The PiScout Server can run on resources available through the Amazon Free Tier for up to 12 months after sign-up. After this period, it costs about $0.40 per day to run (to have it only running during events could cost < $20 for the season, continuous would be ~$150 per year).
If you need to create an AWS account, visit https://signin.aws.amazon.com and click Create a new AWS account, then fill out the form.
Once you are signed into the AWS console, you will need to create the EC2 instance (this refers to the server itself). There is a pre-configured image available with Python, Github Desktop, DBBrowser and a copy of the PiScout code repository (not, this will likely not be up to date) already installed. From the AWS console:
- Click EC2 to open the EC2 Management Console
- Click "AMIs" on the left sidebar.
- Click the dropdown that says Owned by me and change it to Public images. In the search box, paste the following: ami-c243fcb8. Right click on the entry that appears (you can verify that the AMI name says PiScoutServer) and select Launch
- The default selected value should be t2.micro, ensure this is selected, then click Next: Configure Instance Details. Click through Next on the next few screens until you reach Step 6: Configure Security Group
- In this step you will create rules to allow web traffic out from the server. There will be a default rule already created for RDP, leave that in place.
- Click Add Rule and select HTTP from the Type dropdown
- Click Add Rule and select HTTPS from the Type dropdown
- Then click Review and Launch
- On the next screen click Launch. This will create an instance of the preconfigured image
- Select Continue without key pair. This image has a user account created with an initial password already specified, you will not need a keypair to get the password. Then click Launch Instances
- On the next screen, there should be a green box that says Your instances are now launching, click the link that looks like a random string (not launch log). This will bring you to the Instance section of the EC2 console. You may need to wait a little bit for the Instance State to say running before proceeding.
Generally the IP of the server will remain the same while the instance is running, however, if you would like to be able to Start and Stop the instance and maintain the IP (or just to be absolutely sure), it is recommended to create and assign an Elastic IP.
- In the left panel click Elastic IPs
- Click the Allocate New Address button, then click Allocate.
- Right click on the address entry that was just created and select Associate Address
- Make sure Instance is selected, then click the Instance dropdown and select the instance you just created.
- Click Associate
To access the server, we will use a program built into Windows called Remote Desktop Connection
- Open the Windows Menu and start typing "Remote Desktop" into the Search box. When Remote Desktop Connection appears, click on it to open.
- Using the Instances or Elastic IP tab, note the Public IP of the server.
- Enter this address into the Computer box in Remote Desktop Connection.
- Click Connect then click Connect again if a security window appears
- Click Use another account. Enter the credentials:
- Username: PiScoutAdmin
- Password: PiScoutPass123!
- Click Yes on the certificate warning.
- It is recommended to change the user password.
You should be able to use GitHub Desktop or a web browser to update the PiScout folder if needed
To run the PiScout server, open the PiScout folder and double click on server.py. You should now be able to connect from any other machine by entering the Public IP address into a web browser.