Git Product home page Git Product logo

opendc's Introduction

OpenDC

OpenDC is an open-source simulator for datacenters aimed at both research and education.

opendc-frontend-construction

Users can construct datacenters (see above) and define experiments to see how these datacenters perform under different workloads and schedulers (see below).

opendc-frontend-simulation

The simulator is accessible both as a ready-to-use website hosted by Delft University of Technology at opendc.org, and as source code that users can run locally on their own machine.

OpenDC is a project by the @Large Research Group.

Architecture

OpenDC consists of four components: a C++ simulator, a SQLite database, a Python Flask web server, and a TypeScript frontend.

opendc-component-diagram

On the frontend, users can construct a topology by specifying a datacenter's rooms, racks and machines, and create experiments to see how a workload trace runs on that topology. The frontend communicates with the web server over SocketIO, through a custom REST request/response layer. For example, the frontend might make a GET request to /api/v1/users/{userId}, but this request is completed via SocketIO, not plain HTTP requests.

The (Swagger/ OpenAPI compliant) API spec specifies what requests the frontend can make to the web server. To view this specification, go to the Swagger UI and "Explore" opendc-api-spec.json.

The web server receives API requests and processes them in the SQLite database. When the frontend requests to run a new experiment, the web server adds it to the experiments table in the database and sets is state as QUEUED.

The simulator monitors the database for QUEUED experiments, and simulates them as they are submitted. It writes the resulting machine_states and task_states to the database, which the frontend can then again retrieve via the web server.

Setup

Preamble

The official way to run OpenDC is using Docker. Other options include building and running locally, and building and running to deploy on a server.

For all of these options, you have to create a Google API Console project and client ID, which the OpenDC frontend and web server will use to authenticate users and requests. Follow these steps to make such a project. In the 'Authorized JavaScript origins' field, be sure to add http://localhost:8081 as origin. Download the JSON of the OAuth 2.0 client ID you created from the Credentials tab, and specifically note the client_id and the client_secret, which you'll need to build OpenDC.

Installing Docker

GNU/Linux, Mac OS X and Windows 10 Professional users can install Docker by following the instructions here.

Users of Windows 10 Home and previous editions of Windows can use Docker Toolbox. If you're using the toolbox, don't forget to setup port forwarding (see the following subsection if you haven't done that, yet).

Port Forwarding

Open VirtualBox, navigate to the settings of your default docker VM, and go to the 'Network' tab. There, hidden in the 'Advanced' panel, is the 'Port forwarding' feature, where you can set a rule for exposing a port of the VM to the host OS. Add one from guest IP 10.0.2.15 to host IP 127.0.0.1, both on port 8081. This enables you to open a browser on your host OS and navigate to http://localhost:8081, once the server is running.

Running OpenDC

To build and run the full OpenDC stack locally on Linux or Mac, run the commands bellow. Replace your-google-oauth-client-id with your client_id from the OAuth 2.0 client ID you created, and replace your-google-oauth-secret with your client_secret.

# Clone the repo and its submodules
git clone --recursive https://github.com/atlarge-research/opendc.git

# Enter the directory
cd opendc/

# Build the Docker image
docker build -t="opendc" .

# Start a container with the image
docker run -d --name opendc -p 8081:8081 -e 'SERVER_URL=http://localhost:8081' -e 'OAUTH_CLIENT_ID=your-google-oauth-client-id' -e 'OAUTH_CLIENT_SECRET=your-google-oauth-secret' opendc

Wait a few seconds and open http://localhost:8081 in your browser to use OpenDC.

opendc's People

Contributors

leonoverweel avatar sacheendra avatar mdbijman avatar

Watchers

James Cloos avatar Shenjun Ma avatar

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.