diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-28 21:36:31 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-28 21:36:31 +0200 |
| commit | f18b1806596603378738651743d504307dcf6b85 (patch) | |
| tree | e6a95a8a3b0ae5ddd9d81a9c250c87c10808a0e0 | |
| parent | 4c5f91eea6ce76599ef76ee645744b9547a0958d (diff) | |
Add CRLF-config notice to README
| -rw-r--r-- | README.md | 166 | ||||
| m--------- | opendc-frontend | 10 | ||||
| m--------- | opendc-web-server | 10 |
3 files changed, 96 insertions, 90 deletions
@@ -1,80 +1,86 @@ -# OpenDC - -OpenDC is an open-source simulator for datacenters aimed at both research and education. - - - -Users can construct datacenters (see above) and define experiments to see how these datacenters perform under different workloads and schedulers (see below). - - - -The simulator is accessible both as a ready-to-use website hosted by Delft University of Technology at [opendc.org](http://opendc.org), and as source code that users can run locally on their own machine. - -OpenDC is a project by the [@Large Research Group](http://atlarge-research.com). - -## Architecture - -OpenDC consists of four components: a C++ simulator, a SQLite database, a Python Flask web server, and a TypeScript frontend. - - - -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](http://petstore.swagger.io/) and "Explore" [opendc-api-spec.json](https://raw.githubusercontent.com/tudelft-atlarge/opendc/master/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](https://developers.google.com/identity/sign-in/web/devconsole-project) 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`, 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](https://www.docker.com/products/docker). - -Users of Windows 10 Home and previous editions of Windows can use [Docker Toolbox](https://www.docker.com/products/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, you first need to clone the project: - -```bash -# Clone the repo and its submodules -git clone --recursive https://github.com/atlarge-research/opendc.git - -# Enter the directory -cd opendc/ -``` - -In the directory you just entered, you need to set up a small configuration file. To do this, create a file called `keys.json` in the `opendc` folder. In this file, simply replace `your-google-oauth-client-id` with your `client_id` from the OAuth client ID you created. For a standard setup, you can leave the other settings as-is. - -```json -{ - "FLASK_SECRET": "This is a super duper secret flask key", - "OAUTH_CLIENT_ID": "your-google-oauth-client-id", - "ROOT_DIR": "/opendc", - "SERVER_BASE_URL": "http://localhost:8081" -} -``` - -Now, start the server: - -```bash -# Build the Docker image -docker-compose build - -# Start the OpenDC container and the database container -docker-compose up -``` - -Wait a few seconds and open `http://localhost:8081` in your browser to use OpenDC. +# OpenDC
+
+OpenDC is an open-source simulator for datacenters aimed at both research and education.
+
+
+
+Users can construct datacenters (see above) and define experiments to see how these datacenters perform under different workloads and schedulers (see below).
+
+
+
+The simulator is accessible both as a ready-to-use website hosted by Delft University of Technology at [opendc.org](http://opendc.org), and as source code that users can run locally on their own machine.
+
+OpenDC is a project by the [@Large Research Group](http://atlarge-research.com).
+
+## Architecture
+
+OpenDC consists of four components: a C++ simulator, a SQLite database, a Python Flask web server, and a TypeScript frontend.
+
+
+
+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](http://petstore.swagger.io/) and "Explore" [opendc-api-spec.json](https://raw.githubusercontent.com/tudelft-atlarge/opendc/master/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](https://developers.google.com/identity/sign-in/web/devconsole-project) 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`, 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](https://www.docker.com/products/docker).
+
+Users of Windows 10 Home and previous editions of Windows can use [Docker Toolbox](https://www.docker.com/products/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, you first need to clone the project:
+
+```bash
+# Clone the repo and its submodules
+git clone --recursive https://github.com/atlarge-research/opendc.git
+
+# Enter the directory
+cd opendc/
+
+# If you're on Windows:
+# Turn off automatic line-ending conversion in the simulator sub-repository
+cd opendc-simulator/
+git config core.autocrlf false
+cd ..
+```
+
+In the directory you just entered, you need to set up a small configuration file. To do this, create a file called `keys.json` in the `opendc` folder. In this file, simply replace `your-google-oauth-client-id` with your `client_id` from the OAuth client ID you created. For a standard setup, you can leave the other settings as-is.
+
+```json
+{
+ "FLASK_SECRET": "This is a super duper secret flask key",
+ "OAUTH_CLIENT_ID": "your-google-oauth-client-id",
+ "ROOT_DIR": "/opendc",
+ "SERVER_BASE_URL": "http://localhost:8081"
+}
+```
+
+Now, start the server:
+
+```bash
+# Build the Docker image
+docker-compose build
+
+# Start the OpenDC container and the database container
+docker-compose up
+```
+
+Wait a few seconds and open `http://localhost:8081` in your browser to use OpenDC.
diff --git a/opendc-frontend b/opendc-frontend -Subproject 6eda14819b8c8a67b66eab9e04e82e141093f7d +Subproject 532aa9c9241de0b658499ea4bb04e1b3b703508 diff --git a/opendc-web-server b/opendc-web-server -Subproject 44f0bd378763f4c481fb8a87847ca84469b35a6 +Subproject 4c6d68dd2e460095e20ba32007a35da4c5e6dae |
