WebFund 2016W: Tutorial 8: Difference between revisions
Created page with "In this tutorial you will be playing with the SCS OpenStack install and making progress on Assignment 5. ==OpenStack== ===Creating your instance=== * Visit [https://opensta..." |
No edit summary |
||
Line 50: | Line 50: | ||
'''IMPORTANT:''' Make sure to backup any files you change on your openstack instance. The data there is NOT backed up and it is possible for an instance to be destroyed at any time. Use rsync, WinSCP (Windows), Cyberduck (MacOS X), or any other utility supporting sftp to copy files to and from your instance. | '''IMPORTANT:''' Make sure to backup any files you change on your openstack instance. The data there is NOT backed up and it is possible for an instance to be destroyed at any time. Use rsync, WinSCP (Windows), Cyberduck (MacOS X), or any other utility supporting sftp to copy files to and from your instance. | ||
==Progress on Assignment 5== | |||
Once you have your OpenStack instance running, work on Assignment 5. | |||
==Completing the tutorial== | |||
To complete this tutorial, show a TA that you have a web app running on your OpenStack instance and that you have implemented at least one of the requirements from [[WebFund 2016W: Assignment 5]]. You may also get credit if it is clear you have been working diligently on these tasks throughout the tutorial. |
Revision as of 02:23, 16 March 2016
In this tutorial you will be playing with the SCS OpenStack install and making progress on Assignment 5.
OpenStack
Creating your instance
- Visit the SCS OpenStack web portal. Note that you can only access the SCS Openstack machines when on the Carleton network. If you are elsewhere, you'll need to VPN into Carleton. You can log in to OpenStack using your MyCarletonOne username. The temporary password is your MyCarletonOne username (all lowercase) and your student number (no spaces).
- After you've logged in, change your password in Settings (see the menu in the top-right corner, the drop-down menu under your username.)
- Create an instance as follows:
- Make sure you are in the COMP2406 project (you can change at the top of the page, to the right of the openstack logo).
- Go to Project=>Compute=>Instances
- Click the Launch Instance button, you'll get a dialog box.
- Under Details:
- set instance name to be "<your username>-comp2406-1". For example, if your username was janedoe, set the instance name to "janedoe-comp2406-1".
- Select the Instance Boot Source to be "Boot from snapshot"
- Select the "COMP2406-W16" Instance Snapshot"
- Under Access & Security:
- select the "ping, ssh, https" and "default" options
- (ignore the key pair option)
- Under Networking:
- Add the "comp2406-net-26" available network to Selected Networks (click the + sign)
- click Launch to create the instance!
- As the instance is launching, select "Associate Floating IP" under Actions.
- Select any IP address that is available. If no IP addresses are available, talk to a TA!
- Select the "Port to be associated" to be the name of your instance.
- Click associate.
- Reload the page
Configuring your instance
Your instance should now have 2 IP addresses, a private one (starting with 192.168) and a public one (starting with 134.117). You can now connect to your instance by the public IP address. Your username is "student", the password is "tneduts!".
- Log in to your running instance using ssh on the command line (Linux, MacOS X) or putty (Windows).
- Change the student account password by running the command "passwd". (Otherwise anyone can log in to your instance.)
- Install zip and unzip using the command
sudo apt-get install zip unzip
- Make node able to bind privileged ports by running the command
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/nodejs
Run a web app
- Transfer code to the instance either by using sftp (e.g., WinSCP) or by grabbing a zip file at the command line, e.g.
wget http://homeostasis.scs.carleton.ca/~soma/webfund-2016w/code/analyzeLogs-template.zip
- If necessary, unzip it:
unzip analyzeLogs-template.zip
- Run it normally except set the port to 443. (Do you remember how to do this?)
- Now connect to it by visiting your instance on port 443 in a local web browser, e.g., http://134.117.1.1:443
Now you can edit the files locally and re-run the web app. emacs, vi, and nano are all available.
IMPORTANT: Make sure to backup any files you change on your openstack instance. The data there is NOT backed up and it is possible for an instance to be destroyed at any time. Use rsync, WinSCP (Windows), Cyberduck (MacOS X), or any other utility supporting sftp to copy files to and from your instance.
Progress on Assignment 5
Once you have your OpenStack instance running, work on Assignment 5.
Completing the tutorial
To complete this tutorial, show a TA that you have a web app running on your OpenStack instance and that you have implemented at least one of the requirements from WebFund 2016W: Assignment 5. You may also get credit if it is clear you have been working diligently on these tasks throughout the tutorial.