advertisement

Google Glass GDK on Amazon Web Services

50 %
50 %
advertisement
Information about Google Glass GDK on Amazon Web Services
Mobile

Published on October 15, 2014

Author: fwwsc

Source: slideshare.net

Description

This presentation shows how to setup the environment for Google Glass GDK using Amazon Web Services instead of Google App Engine. It describes all the process from beginning to end on how to create, upload, and manage a GDK application from AWS. The project used was the Java version of the Glass Starter Project.
advertisement

1. UPLOADING MIRROR API PROJECT ON AMAZON WEB SERVICES

2. WHY WOULD YOU USE AWS?

3. AWS • … allows you to use a free-tier for a year (micro instance) • … comes with a public IP and a unique DNS name for each instance running. • … offers more OS images to boot from than GCE.

4. YOU NEED A VALID CREDIT CARD BUT WON’T BE CHARGED IF YOU ONLY RUN ONE FREE TIER INSTANCE AT A TIME FOR A YEAR.

5. Setting up

6. Tutorial for Macintosh and PC

7. THINGS YOU NEED TO HAVE DONE BEFORE STARTING • Install JDK & Maven and set up environment variables • Download the quick start project from Github • Prep the quick start project and package it as a war file to ready to upload • Set up a Google Developers Console project (we will modify this)

8. STEP 1 GET AN AWS ACCOUNT Go to https://console.aws.amazon.com and create an account. ! If you have an amazon account, you still have to go through the process. They are separate services. Submit payment information.

9. STEP 2 LOGIN TO YOUR NEW AWS ACCOUNT https://console.aws.amazon.com

10. YOU WILL BE GREETED BY: Click on EC2 (Elastic Computing Cloud)

11. On the dashboard at the left, 1 Click either of the “Launch Instance” buttons. 2 2

12. The first thing you’ll be asked to do, is to define the OS image you want for your instance. Make sure the image you are working with says “FREE TIER ELEGIBLE”. If it doesn’t say, select it and you should see a micro-option that says “Free tier elegible”

13. We will be working with an Ubuntu Image on this tutorial, but you are more than welcome to try the other “free tier elegible” images. Just make sure you know how to configure everything. 1 Search for “AMI-864d84ee” and select it 2

14. 1 2 Pick the “General Purpose Free Tier Elegible” micro instance Click “Next”. Don’t click review and Launch, we have more settings to go over.

15. All settings are fine, but check the “Protect Against Accidental Termination” box, so you don’t delete the instance by accident. 1 Click “Next” 2

16. Since it’s a micro-instance, your hard drive will only be 8GB. I’m not sure if you add more, you will be charged. 8GB is enough for now. Click “Next” 1

17. Give a name to your instance. If you need to add more tag value pairs, click create; for now, we will only add Name. 1 Click “Next”. 2

18. 1 Select “Create a new 2 security group” and Change Name & Description Add the following network rules: SSH will let us connect to our server through a terminal or command prompt. Custom TCP rule will let the server have HTTP traffic.

19. 1 Check all the settings and click Launch. 2

20. What is a key pair? A key pair is a small (.pem) file that allows you to SSH to EC2 servers. This connects you securely to your instance from your machine. A PEM KEY CAN ONLY BE DOWNLOADED ONCE. So, make a copy and keep it safe.

21. 1 2 3 1. Select “Create a new key pair” 2. Give the key a name 3. Click download key pair Once downloaded, click “Launch Instances” 4

22. SUCCESS 1 Click “View Instances”

23. Once your instance is running, you’ll see it reflected in your instance view in the EC2 Console. If you select the instance and click “Actions” on top, you can start/stop/reboot/terminate your instance.

24. If you try to terminate your instance, you’ll get an error that you can’t terminate it unless you allow it. This is good to not delete it accidentally. We will cover how to delete an instance later.

25. If you select the instance name, you can see all of the info of the instance. What’s important right now, is that you copy the Public DNS of the instance.

26. MACINTOSH CONNECTING TO THE SERVER **Make sure Mac didn’t change the extension of your .pem key to .txt** Open a terminal and CD to where your pem key is stored and apply the following command: chmod 400 <keyname>.pem Example:

27. MACINTOSH Once the chmod is done, use the following command to SSH to your server ssh -i <keyname>.pem ubuntu@<public-dns> If you get a prompt to continue connecting, answer “yes”. Example:

28. WINDOWS 1. Find your putty suite and open PuttyGen.exe 1 2 2. Click Load and browse for the pem key we got from Amazon

29. 1 Click “OK” Make sure 3 SSH-2 RSA is checked 2 Save private key with new extension (.ppk)

30. Click “Yes” 1 2

31. Open Putty.exe Change the host name for the public dns of your instance. Change port to 22 and mark connection type as SSH.

32. Go to Connection/SSH/Auth and browse for the new .ppk key, then click Open 1 2 3

33. If you get this alert, click yes.

34. When prompted what user to login as, type “ubuntu” and hit enter. You will then be connected to the server. 1

35. INSTALL ON THE SERVER //Run the following commands on the SSH terminal: sudo su apt-get update apt-get install openjdk-7-jdk apt-get install tomcat7 apt-get install tomcat7-admin

36. In order to upload your project to the server, you will need to setup credentials so that only you have permission to upload the war file. In the next slide replace the “user” and “admin” for a username and password to can remember and use later.

37. nano /etc/tomcat7/tomcat-users.xml <user username=“user” password=“admin” roles=“manager-gui,admin-gui”/> when done, “ctrl+O” to write and “ctrl+X” to quit. MAC USERS: don’t use ⌘, use control key

38. RESTART TOMCAT SERVER Commands to handle tomcat server: • START: /etc/init.d/tomcat7 start • STOP: /etc/init.d/tomcat7 stop • RESTART: /etc/init.d/tomcat7 restart

39. Get your public dns from the aws console and go to a browser and enter the following address: http://<public dns>:8080 Example:

40. You should see the Apache Tomcat welcome page: * * If you click on the “manager-webapp” link, you’ll be prompted for username/password. It’s the same usr/pwd we set in the nano editor before. Don’t get used to clicking this link because we will delete this page from our server.

41. Go back to the SSH terminal and CD to /var/lib/tomcat7/webapps then run the following command to delete the ROOT application: ! sudo rm -rf ROOT ! Example:

42. Go to the Google Developers Console and open your project. 1 2

43. Add the public dns of your AWS instance to the Authorized JavaScript Origins and Authorized Redirect URI

44. UPLOADING TO AWS Open a local terminal/command prompt and CD to where the pom.xml file in your project is. Then run: ! mvn clean install ! mvn war:war ! Search for the “target” folder inside your project and find the war file that was generated. Rename it to “ROOT.war” (case-sensitive)

45. Head over to the tomcat manager in your server. The address is <public-dns>:8080/manager/html ! Example: Use the credentials we set on the server a few slides ago using the nano editor remember?

46. Choose the ROOT.war file and click Deploy Click the “/“ in the Path Column to be Redirected to your application.

47. TERMINATING AN INSTANCE

48. Select the instance to be deleted and Click on Actions. 2 1

49. 1 2 3 4 5

50. OK, WHAT NOW?

51. TO GIVE THE APPLICATION TO YOUR USERS You simply have to give them the URL of your project, and have them login with their credentials and configure the settings on the browser, not glass! It’s that easy!

52. USEFUL LINKS/BOOKS • https://developers.google.com/glass/design/ui • https://developers.google.com/glass/develop/overview DESIGN CODE

53. And so we’ve come to the end of the presentation! My contact information: Diana Melara dm22510n@pace.edu

Add a comment

Related presentations

mPortal designs, develops and hosts mobile apps and services for cable, telecom an...

Vorstellung des 7. App Day in München mit Übersicht über den Show Your App Award u...

Доклад Галины Диваковой на конференции Appsconference на тему ". 1 НОЯБРЯ, 2014 ...

Vortrag von Anna-Maria Zahn und Stefan Hauck auf der AllFacebook Marketing Confere...

Мобио - кейсы по продвижению мобильных приложени

Related pages

Software Development for Google Glass ... - amazon.de

... Software Development for Google Glass: Software Development for Google Glass is chock full jetzt kaufen. ... Mein Amazon Angebote Gutscheine Verkaufen ...
Read more

Beginning Google Glass Development 1st ed ... - amazon.com

Use features like bookmarks, note taking and highlighting while reading Beginning Google Glass Development. ... Amazon Try Prime Kindle Store
Read more

Beginning Google Glass Development - amazon.com

Buy Beginning Google Glass Development on Amazon.com FREE SHIPPING on ... (GDK): • Glass User ... Amazon Web Services Scalable Cloud Computing ...
Read more

Buy Software Development for Google Glass ... - amazon.in

Amazon.in - Buy Software ... Volume 1 book online at best prices in India on Amazon.in. Read Software Development for Google Glass: ... GDK with five ...
Read more

Beginning Google Glass Development eBook: Jeff Tang ...

Beginning Google Glass Development eBook: Jeff Tang: Amazon.in: Kindle Store ... Your Amazon.in Today's Deals Gift Cards Sell Customer Service.
Read more

Google Glass Development: Pocket Primer ... - amazon.de

Oswald Campesato - Google Glass Development: Pocket Primer jetzt kaufen. ISBN: 9781937585389, ... Mein Amazon Angebote Gutscheine Verkaufen Hilfe.
Read more

Glass | Google Developers

Google Glass; list All ... Collaboratively design in our web-based tool to visualize your Glassware flow ... See all of the GDK features in ...
Read more

Google

Annoncér med Google Virksomhedsløsninger +Google Alt om Google Google.com © 2016 - Privatliv - Vilkår. Søgning; Billeder; Maps; Play; YouTube; Gmail ...
Read more

Software Development for Google Glass eBook ... - amazon.ca

Software Development for Google Glass eBook: Mark Scheel: Amazon.ca: Kindle Store Amazon.ca Try Prime Kindle Store. Go. Shop by ... Amazon.ca Try Prime
Read more