diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-06-29 16:06:35 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 16:04:00 +0200 |
| commit | 4a79cefdf5d71715b6c575d5c8bb4fea418c2ba6 (patch) | |
| tree | fc68847d1e010e2962dac8345a0fd0cc9a2f0681 | |
| parent | ad31b66503ec65e611ab96c2a540180ed25f5a6f (diff) | |
Prepare opendc repository for monorepo
This change prepares the opendc repository for a monorepo setup by
moving all files to the core/ directory. After all repositories have
been merged into this repository, we will move the correct files back.
| -rw-r--r-- | core/.dockerignore (renamed from .dockerignore) | 0 | ||||
| -rw-r--r-- | core/.gitattributes (renamed from .gitattributes) | 0 | ||||
| -rw-r--r-- | core/.gitignore (renamed from .gitignore) | 0 | ||||
| -rw-r--r-- | core/CONTRIBUTING.md (renamed from CONTRIBUTING.md) | 0 | ||||
| -rw-r--r-- | core/Dockerfile (renamed from Dockerfile) | 0 | ||||
| -rw-r--r-- | core/LICENSE.md (renamed from LICENSE.md) | 0 | ||||
| -rw-r--r-- | core/README.md (renamed from README.md) | 194 | ||||
| -rwxr-xr-x | core/build/configure.sh (renamed from build/configure.sh) | 0 | ||||
| -rw-r--r-- | core/build/supervisord.conf (renamed from build/supervisord.conf) | 18 | ||||
| -rw-r--r-- | core/database/Dockerfile (renamed from database/Dockerfile) | 0 | ||||
| -rw-r--r-- | core/database/README.md (renamed from database/README.md) | 0 | ||||
| -rw-r--r-- | core/database/gwf_converter/gwf_converter.py (renamed from database/gwf_converter/gwf_converter.py) | 0 | ||||
| -rw-r--r-- | core/database/gwf_converter/requirements.txt (renamed from database/gwf_converter/requirements.txt) | 0 | ||||
| -rw-r--r-- | core/database/gwf_converter/traces/default.gwf (renamed from database/gwf_converter/traces/default.gwf) | 0 | ||||
| -rw-r--r-- | core/database/rebuild-database.py (renamed from database/rebuild-database.py) | 0 | ||||
| -rw-r--r-- | core/database/rebuild.bat (renamed from database/rebuild.bat) | 0 | ||||
| -rw-r--r-- | core/database/schema.sql (renamed from database/schema.sql) | 0 | ||||
| -rw-r--r-- | core/database/test.sql (renamed from database/test.sql) | 0 | ||||
| -rw-r--r-- | core/database/view-table.py (renamed from database/view-table.py) | 0 | ||||
| -rw-r--r-- | core/docker-compose.yml (renamed from docker-compose.yml) | 0 | ||||
| -rw-r--r-- | core/images/logo.png (renamed from images/logo.png) | bin | 2825 -> 2825 bytes | |||
| -rw-r--r-- | core/images/opendc-component-diagram.png (renamed from images/opendc-component-diagram.png) | bin | 11875 -> 11875 bytes | |||
| -rw-r--r-- | core/images/opendc-frontend-construction.PNG (renamed from images/opendc-frontend-construction.PNG) | bin | 76461 -> 76461 bytes | |||
| -rw-r--r-- | core/images/opendc-frontend-simulation-zoom.PNG (renamed from images/opendc-frontend-simulation-zoom.PNG) | bin | 100583 -> 100583 bytes | |||
| -rw-r--r-- | core/images/opendc-frontend-simulation.PNG (renamed from images/opendc-frontend-simulation.PNG) | bin | 96351 -> 96351 bytes | |||
| -rw-r--r-- | core/mongodb/Dockerfile (renamed from mongodb/Dockerfile) | 0 | ||||
| -rw-r--r-- | core/mongodb/docker-compose.yml (renamed from mongodb/docker-compose.yml) | 0 | ||||
| -rw-r--r-- | core/mongodb/mongo-init-opendc-db.sh (renamed from mongodb/mongo-init-opendc-db.sh) | 0 | ||||
| -rwxr-xr-x | core/mongodb/prefab.py (renamed from mongodb/prefab.py) | 0 | ||||
| -rwxr-xr-x | core/mongodb/prefabs.py (renamed from mongodb/prefabs.py) | 0 | ||||
| -rw-r--r-- | core/opendc-api-spec.yml (renamed from opendc-api-spec.yml) | 0 |
31 files changed, 106 insertions, 106 deletions
diff --git a/.dockerignore b/core/.dockerignore index e69de29b..e69de29b 100644 --- a/.dockerignore +++ b/core/.dockerignore diff --git a/.gitattributes b/core/.gitattributes index 526c8a38..526c8a38 100644 --- a/.gitattributes +++ b/core/.gitattributes diff --git a/.gitignore b/core/.gitignore index e31adcb6..e31adcb6 100644 --- a/.gitignore +++ b/core/.gitignore diff --git a/CONTRIBUTING.md b/core/CONTRIBUTING.md index a90c1fb5..a90c1fb5 100644 --- a/CONTRIBUTING.md +++ b/core/CONTRIBUTING.md diff --git a/Dockerfile b/core/Dockerfile index f7f36d87..f7f36d87 100644 --- a/Dockerfile +++ b/core/Dockerfile diff --git a/LICENSE.md b/core/LICENSE.md index 57288ae2..57288ae2 100644 --- a/LICENSE.md +++ b/core/LICENSE.md diff --git a/README.md b/core/README.md index fee04a5b..2bb734e8 100644 --- a/README.md +++ b/core/README.md @@ -1,97 +1,97 @@ -<h1 align="center">
- <img src="images/logo.png" width="100" alt="OpenDC">
- <br>
- OpenDC
-</h1>
-<p align="center">
- Collaborative Datacenter Simulation and Exploration for Everybody
-</p>
-
-<br>
-
-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 Kotlin simulator, a MariaDB database, a Python Flask web server, and a React.js frontend.
-
-<p align="center">
- <img src="https://raw.githubusercontent.com/tudelft-atlarge/opendc/master/images/opendc-component-diagram.png" alt="OpenDC Component Diagram">
-</p>
-
-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.
+<h1 align="center"> + <img src="images/logo.png" width="100" alt="OpenDC"> + <br> + OpenDC +</h1> +<p align="center"> + Collaborative Datacenter Simulation and Exploration for Everybody +</p> + +<br> + +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 Kotlin simulator, a MariaDB database, a Python Flask web server, and a React.js frontend. + +<p align="center"> + <img src="https://raw.githubusercontent.com/tudelft-atlarge/opendc/master/images/opendc-component-diagram.png" alt="OpenDC Component Diagram"> +</p> + +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/build/configure.sh b/core/build/configure.sh index ceb1e616..ceb1e616 100755 --- a/build/configure.sh +++ b/core/build/configure.sh diff --git a/build/supervisord.conf b/core/build/supervisord.conf index cfb671d6..37b5cc16 100644 --- a/build/supervisord.conf +++ b/core/build/supervisord.conf @@ -1,9 +1,9 @@ -[supervisord]
-nodaemon=true
-
-[program:web-server]
-command=/usr/bin/python2.7 /opendc/opendc-web-server/main.py /opendc/keys.json
-stdout_logfile=/dev/stdout
-stdout_logfile_maxbytes=0
-stderr_logfile=/dev/stderr
-stderr_logfile_maxbytes=0
+[supervisord] +nodaemon=true + +[program:web-server] +command=/usr/bin/python2.7 /opendc/opendc-web-server/main.py /opendc/keys.json +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 diff --git a/database/Dockerfile b/core/database/Dockerfile index e30aed51..e30aed51 100644 --- a/database/Dockerfile +++ b/core/database/Dockerfile diff --git a/database/README.md b/core/database/README.md index 9fba2d5c..9fba2d5c 100644 --- a/database/README.md +++ b/core/database/README.md diff --git a/database/gwf_converter/gwf_converter.py b/core/database/gwf_converter/gwf_converter.py index 902bd93f..902bd93f 100644 --- a/database/gwf_converter/gwf_converter.py +++ b/core/database/gwf_converter/gwf_converter.py diff --git a/database/gwf_converter/requirements.txt b/core/database/gwf_converter/requirements.txt index 0eaebf12..0eaebf12 100644 --- a/database/gwf_converter/requirements.txt +++ b/core/database/gwf_converter/requirements.txt diff --git a/database/gwf_converter/traces/default.gwf b/core/database/gwf_converter/traces/default.gwf index b1c55a17..b1c55a17 100644 --- a/database/gwf_converter/traces/default.gwf +++ b/core/database/gwf_converter/traces/default.gwf diff --git a/database/rebuild-database.py b/core/database/rebuild-database.py index 0cbeb27a..0cbeb27a 100644 --- a/database/rebuild-database.py +++ b/core/database/rebuild-database.py diff --git a/database/rebuild.bat b/core/database/rebuild.bat index c0f38da1..c0f38da1 100644 --- a/database/rebuild.bat +++ b/core/database/rebuild.bat diff --git a/database/schema.sql b/core/database/schema.sql index f6286260..f6286260 100644 --- a/database/schema.sql +++ b/core/database/schema.sql diff --git a/database/test.sql b/core/database/test.sql index 55801b76..55801b76 100644 --- a/database/test.sql +++ b/core/database/test.sql diff --git a/database/view-table.py b/core/database/view-table.py index 615b4081..615b4081 100644 --- a/database/view-table.py +++ b/core/database/view-table.py diff --git a/docker-compose.yml b/core/docker-compose.yml index 3f4ad20a..3f4ad20a 100644 --- a/docker-compose.yml +++ b/core/docker-compose.yml diff --git a/images/logo.png b/core/images/logo.png Binary files differindex d743038b..d743038b 100644 --- a/images/logo.png +++ b/core/images/logo.png diff --git a/images/opendc-component-diagram.png b/core/images/opendc-component-diagram.png Binary files differindex 4aa535b9..4aa535b9 100644 --- a/images/opendc-component-diagram.png +++ b/core/images/opendc-component-diagram.png diff --git a/images/opendc-frontend-construction.PNG b/core/images/opendc-frontend-construction.PNG Binary files differindex 223e8d48..223e8d48 100644 --- a/images/opendc-frontend-construction.PNG +++ b/core/images/opendc-frontend-construction.PNG diff --git a/images/opendc-frontend-simulation-zoom.PNG b/core/images/opendc-frontend-simulation-zoom.PNG Binary files differindex d7744926..d7744926 100644 --- a/images/opendc-frontend-simulation-zoom.PNG +++ b/core/images/opendc-frontend-simulation-zoom.PNG diff --git a/images/opendc-frontend-simulation.PNG b/core/images/opendc-frontend-simulation.PNG Binary files differindex bbf4cbd6..bbf4cbd6 100644 --- a/images/opendc-frontend-simulation.PNG +++ b/core/images/opendc-frontend-simulation.PNG diff --git a/mongodb/Dockerfile b/core/mongodb/Dockerfile index b4eb9dd1..b4eb9dd1 100644 --- a/mongodb/Dockerfile +++ b/core/mongodb/Dockerfile diff --git a/mongodb/docker-compose.yml b/core/mongodb/docker-compose.yml index aa54a74c..aa54a74c 100644 --- a/mongodb/docker-compose.yml +++ b/core/mongodb/docker-compose.yml diff --git a/mongodb/mongo-init-opendc-db.sh b/core/mongodb/mongo-init-opendc-db.sh index e7a787fe..e7a787fe 100644 --- a/mongodb/mongo-init-opendc-db.sh +++ b/core/mongodb/mongo-init-opendc-db.sh diff --git a/mongodb/prefab.py b/core/mongodb/prefab.py index 124f45e3..124f45e3 100755 --- a/mongodb/prefab.py +++ b/core/mongodb/prefab.py diff --git a/mongodb/prefabs.py b/core/mongodb/prefabs.py index f6f46cbc..f6f46cbc 100755 --- a/mongodb/prefabs.py +++ b/core/mongodb/prefabs.py diff --git a/opendc-api-spec.yml b/core/opendc-api-spec.yml index 56f1d529..56f1d529 100644 --- a/opendc-api-spec.yml +++ b/core/opendc-api-spec.yml |
