summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Overweel <l.overweel@gmail.com>2017-02-06 15:09:34 +0100
committerGitHub <noreply@github.com>2017-02-06 15:09:34 +0100
commit670b7718bd471828df38e1faff21bfbd19d42263 (patch)
tree294f4b38fca3017dc52780e1e60570498e666438
parentebbbb9ac91aab60587d7750992e40fcc41f98ad5 (diff)
Add OAuth setup instructions to README
-rw-r--r--README.md14
1 files changed, 9 insertions, 5 deletions
diff --git a/README.md b/README.md
index 67e36266..be0c4c80 100644
--- a/README.md
+++ b/README.md
@@ -8,15 +8,21 @@ On the frontend, users can construct a topology by specifying a datacenter's roo
The (Swagger/ OpenAPI compliant) API specification 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 these API requests and processes them. When the frontend requests to run a new experiment, the web server adds a row to the `queued_experiments` table in the SQLite database.
+The web server receives these API requests and processes them in the SQLite database. When the frontend requests to run a new experiment, the web server adds a row to the `queued_experiments` table in the database.
The simulator monitors this `queued_experiments` table, and simulates experiments 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
-The official way to run OpenDC is using Docker.
+### Preamble
-To build and run the full OpenDC stack locally:
+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. 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.
+
+### Running OpenDC locally
+
+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`.
```bash
# Clone the repo and its submodules
@@ -33,5 +39,3 @@ docker run -d --name opendc -p 8081:8081 -e 'SERVER_URL=http://localhost:8081' -
# Wait a few seconds and open http://localhost:8081 in your browser
```
-
-