Giter VIP home page Giter VIP logo

cnv's Introduction

CNV - 2018/2019

Cloud Computing & Virtualization project - HillClimbing@Cloud

Requirements

Install the following tools:

  • Maven 3.x.x
  • Java Development Kit 7 (JDK 7)

Structure and organization

The project is organized in 3 modules:

  • databaselib, a library that contains code to interact with DynamoDB.
  • loadbalancer, which contains the code to run in the Load Balancer server.
  • web-server, which contains the code to run in the Web server.

The first two modules use maven, and the last already has all the files compiled.

How to compile

Execute the following command:

./create_archives.sh

How to run

WebServer

Place the .dat and .png files from the dataset in web-server/datasets.

Run create_archives.sh script.

Create an AWS ec2 server instance, with port 8000 open for TCP, and java 7 installed. Download the AWS Java SDK , and unzip it in the home directory.

Copy the web-server.zip archive to the instance, and unzip it:

scp -i CNV-AWS.pem ./web-server.zip ec2-user@<IP_ADDRESS>:~

Append the following, to etc/rc.d/rc.local (change the aws package version, if needed):

export CLASSPATH="$CLASSPATH:/home/ec2-user/web-server/pt/ulisboa/tecnico/cnv/server:/home/ec2-user/web-server:/home/ec2-user/db-lib:/home/ec2-user/aws-java-sdk-1.11.546/lib/aws-java-sdk-1.11.546.jar:/home/ec2-user/aws-java-sdk-1.11.546/third-party/lib/*:."
export _JAVA_OPTIONS="-XX:-UseSplitVerifier "$_JAVA_OPTIONS
cd /home/ec2-user/web-server
java WebServer

Create the ~/.aws folder and put the following files in it:

  • webserver.properties (example)
    server-region=us-east-1
    
  • credentials (example)
    [default]
    
    aws_access_key_id=<ACCESS_KEY>
    
    aws_secret_access_key=<SECRET_ACCESS_KEY>
    

Create an image of this instance.

LoadBalancer

Run create_archives.sh script (if you haven't already).

Create an AWS ec2 server instance, with port 8080 open for TCP, and java 7 installed. Download the AWS Java SDK , and unzip it in the home directory.

Copy the lb-bin.zip archive to the instance, and unzip it:

scp -i CNV-AWS.pem ./lb-bin.zip ec2-user@<IP_ADDRESS>:~

Run the following (change the aws package version, if needed):

export CLASSPATH=$CLASSPATH:/home/ec2-user/db-lib:/home/ec2-user/aws-java-sdk-1.11.538/lib/aws-java-sdk-1.11.538.jar:/home/ec2-user/aws-java-sdk-1.11.538/third-party/lib/*:.

Create the ~/.aws folder and put the following files in it:

  • webserver.properties (example)
    server-region=us-east-1
    image-id=ami-0e38c8854738d9646
    key-name=CNV-lab-AWS
    sec-group=CNV-ssh+http
    instace-type=t2.micro
    subnet-id=subnet-ac760882
    
  • credentials (example)
    [default]
    
    aws_access_key_id=<ACCESS_KEY>
    
    aws_secret_access_key=<SECRET_ACCESS_KEY>
    

To startup the LoadBalancer run the following command inside lb-bin/:

java pt.ulisboa.tecnico.cnv.loadbalancer.LoadBalancerApplication

cnv's People

Contributors

leo-epi avatar darkmacheken avatar

Watchers

 avatar Mafalda Ferreira avatar  avatar  avatar

cnv's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.