Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Wiki Setting up a free AWS cloud server for VisibleTesla etc

This site may earn commission on affiliate links.

Wiki

Member
Mar 21, 2016
34
200
Amazon AWS offer Free Cloud services for 12 months when you sign up for a new account.
You get use of their smallest "instance" which is more than powerful enough to run VisibleTesla, so on request I've drafted a small HOWTO that will help you get started.

After the free period runs out it will cost up to US$20 per month so set yourself a calendar reminder to avoid bill shock!

This is only a rough draft for now, any assistance cleaning it up is appreciated

Before starting, create yourself an amazon AWS account
I won't repeat the already excellent documentation available here
Step 1 - change region
- new virtual servers are created in one of Amazon's datacentres
across the globe.
- the default is "US West", for more responsive interaction with your
new server I suggest changing this to your closest region.
- in my case, Sydney is the closest.




01-change-region.png


02-change-region.png


Step 2 - create new EC2 instance
- click "EC2"
- click "Launch Instance"



03-EC2.png


- select "Ubuntu Server 14.04 LTS (HVM) SSD Volume (64-bit)

04-Ubuntu.png


- make sure the "Free tier eligible" top tier is selected


05-freetier.png


- click "Next: Configure Instance Details"


06-configure-instance-details.png


- change "Auto-assign Public IP" to "Enable"
this will allow you to access your new VM directly


07-public-IP.png


- click "Next: Add Storage"

08-add-storage.png


- increase the Root volume size to 30 GiB

09-30GB.png


- click "Next: Tag Instance"

10-Tag-instance.png


- click "Next: Configure Security Group"

11-Security-Group.png


- Add a rule for TCP port 5901 (VNC) so you can manage VisibleTesla
- Make sure the SSH rule (port 22) is there as well.
- if you have a static IP at home, choose "My IP" for extra security


12-SecGroup-Rules.png

12-SecGroup-Rules2.png


- click "Review and Launch"

- click "Launch"




13-Review.png


- you will be asked to use or create a new key pair, this is used for accessing your server's command line. If unsure, select "create a new key pair". Put in your name as the key pair name.
14-keypair.png


- click "Download Key Pair" and store this in a safe location

- then click "Launch Instances"
- click "View Instances" and wait until "Instance State" is "running"
and has passed the "status checks"

16-Running.png


17-StatusChecks.png

Step 3 - Connect via ssh to your new EC2 VM to install Java7 and VisibleTesla
Install Putty and load your private key using these handy instructions from Amazon AWS
Use Putty to connect to the "Public IP" of your AWS instance and log in with username "ubuntu"
set your timezone with the following command

Code:
sudo dpkg-reconfigure tzdata
install Oracle Java 7
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
install vncserver and some other useful tools
Code:
sudo apt-get install vnc4server xfdesktop4 xfce4-session unzip nano vim screen fonts-freefont-ttf libxslt1.1
download and unzip the latest beta version of VisibleTesla (0.50.xx)
Code:
wget https://dl.dropboxusercontent.com/u/7045813/VT2/RawApp/VisibleTesla.zip
unzip VisibleTesla.zip
configure vncserver to start VT automatically
Code:
mkdir .vnc
nano .vnc/xstartup
then type these two lines into the nano window:
Code:
xsetroot -solid black
java -jar "/home/ubuntu/VisibleTesla 0.50.08/VisibleTesla.jar"
press "Control-X" then "Y" for Yes, and press "Enter" for the file name
change permissions on the xstartup file
Code:
chmod 700 .vnc/xstartup
now run vncserver
Code:
vnc4server -geometry 640x460
it will ask for a password.
this is the password for accessing your VNC (VisibleTesla)
this is not the same as your "My Tesla" password but should be a secure password
because anyone that can guess this password has full access to VT
and to your amazon instance, and therefore can potentially cost you a large amount of money
If you want to reset your VNC password, type:
Code:
rm ./vnc/passwd

you can now close the PuTTY window, as from here on you can configure VT via VNC
Code:
exit
Load up your VNC client, put in your public ip and port (eg 52.1.2.3:5901), and connect. After typing in the VNC password you set above, you should see the VT login screen. Enter the email address and password you use for accessing "My Tesla", and click "Log In"

VT documentation is available here

add your email address to the "Email for notifications" section (click the "Prefs" tab)
then under the "Notify" tab in the "Charging" section I suggest setting some custom Message options (click the + next to each of the options)
eg under "SOC" Hits or Exceeded I have:


19-SOC.png
 

Attachments

  • 15-View-Instances.png
    15-View-Instances.png
    3 KB · Views: 137