HW3: OpenStack Exercise¶
- Assignments must be completed individually.
- Discussion is allowed (e.g. via Slack) but the submission should be made by yourself. Acknowledge your helpers/collaborators name in the submission if you discussed or got help from anyone.
- Use an individual github repository. A repository in FutureSystems will be given later.
Create IU GitHub Account¶
- Simply login https://github.iu.edu with your IU Username and Password (It is a same IU Credential that you use on other IU sites e.g. one.iu.edu)
OpenStack Command Line Tool
OpenStack Kilo is ready to use (as of 02/04/2016) on FutureSystems and you will
have a virtual instance (server) using OpenStack Command Line Tool
you complete all the tasks in this assignment. The tasks you need to complete
- SSH into india.futuresystems.org and
- Register a SSH key on OpenStack
- with default key file names
- Start a single instance:
- with a
- the registered key above,
- Assign a Floating IP address
- Install required software on a virtual instance
Do not terminate your instance, even if you completed and submitted hw3.
hw3.py test file in your repository, checkout
Run this on india.futuresystems.org, if you completed all tasks above. All
available tests should be succeeded without errors. First, clone your
private repository from IU GitHub. See details here:
IU GitHub Guidelines.
You will use virtualenv to prepare packages.
bash setup.sh source $HOME/bdossp_sp16/bin/activate
Now, you can run the test program:
Completed all? You may see:
........... ---------------------------------------------------------------------- Ran 11 tests in 1.646s OK
hw3-results.txt file after you ran
hw3.py python program in your
current directory. Add this file in your IU GitHub repository.
Q. Where should I run the test program hw3.py? A. It is on india.futuresystems.org, not your VM instance.
bash setup.sh produces
command not found errors.
A. Make sure you can use
nova command to start a new VM like you did in the hw3 tasks. Otherwise, the test program can’t verify what you accomplished.
hw3.py test program was failed due to missing python package named
A. Run hw3.py in a main directory of the hw3 branch.
hw3.py itself won’t work. Helper functions are required.
Submission via IU GitHub (github.iu.edu)¶
From now on, you will use IU GitHub to submit assignments on a private repository. IU GitHub Guidelines
- Clone your private repository from the course organization. You IU Username is the name of your repository.
- Create a
git branch hw3 git checkout hw3
pullcommand to fetch and merge with the template repository:
git pull email@example.com:bdossp-sp16/assignments.git hw3
Sync with remote:
git push -u origin hw3
hw3-results.txtto your repository:
git add hw3-results.txt
Merge the template
git commit -am "initial merge with the template"
Sync your changes:
git push -u origin hw3
Challenging Tasks (Optional)¶
The following tasks are optional but strongly recommended to try. These are
related to Python packages and APIs (application program interface).
nova is also extended to get more experience.
‘Hello Big Data’ Flask Web Framework¶
flask sub-directory in
challange directory in your assignment
repository. We provide
hello.py python file and you can run the file in
your VM but there are a few requirements that we request:
* Use virtualenv named 'bdossp-sp16' in your home directory * Open a web port to the Flask application to allow access from outside
The two terms, VM or virtual instance, are exchangeable in this context.
- What command(s) do you run to create and enable the virtualenv?
python hello.pymay not work if you run only with standard python libraries. What command(s) do you run to resolve the issue? (hint. Flask is not a Python standard package)
- If you ran the application successfully, you can see ‘Hello Big Data’
message on your web browser with the
15000web port. However, it is not accessible from outside e.g. http://IP_ADDRESS:15000. It is because that there is no rule for the port in OpenStack Security Group. (We assume there is no firewall here). What
novacommand(s) do you need to create/add a security group for the port?
flaskrule is provided in fg491 project. What
novacommand(s) do you need to see current rule(s) in the security group and to apply it to your VM?
Write your solution in the name of
flask-sol.txt text file after completing
the tasks above. Add this file in the
Example view of your submission:
1. albert 2. ... 3. ... 9. http://...