diff options
| author | Sacheendra Talluri <sacheendra.t@gmail.com> | 2017-08-09 00:30:04 +0200 |
|---|---|---|
| committer | Sacheendra Talluri <sacheendra.t@gmail.com> | 2017-08-09 00:30:04 +0200 |
| commit | 5c24591feb5eb932ad692c54052dd298c6d8839e (patch) | |
| tree | f1fa8d9276b4d5d099b805840cdf7af5a49e7c3a | |
| parent | 777cb36dfb130af38fe095de6140b4a08883570d (diff) | |
Update readme to reflect migration to MariaDB
| -rw-r--r-- | README.md | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -49,6 +49,8 @@ Make sure you have Python 2.7 installed (if not, get it [here](https://www.pytho python setup.py install ``` +The web server also requires MariaDB >= 10.1. Instructions to install MariaDB can be found [here](https://mariadb.com/kb/en/mariadb/getting-installing-and-upgrading-mariadb/). The Docker image can be found [here](https://hub.docker.com/_/mariadb/). + #### Get the code Clone both this repository and the main OpenDC repository, from the same base directory. @@ -60,12 +62,7 @@ git clone https://github.com/atlarge-research/opendc.git #### Set up the database -Set up the database, replacing `PATH_TO_DATABASE` with where you'd like to create the SQLite database. (This will replace any file named `opendc.db` at the location `PATH_TO_DATABASE`.) - -```bash -cd opendc/database -python rebuild-database.py "PATH_TO_DATABASE" -``` +The database can be rebuilt by using the `schema.sql` file from main opendc repository. #### Configure OpenDC @@ -73,18 +70,22 @@ Create a file `config.json` in `opendc-web-server`, containing: ```json { - "ROOT_DIR": "BASE_DIRECTORY", - "OAUTH_CLIENT_ID": "OAUTH_CLIENT_ID", - "DATABASE_LOCATION": "PATH_TO_DATABASE\\opendc.db", - "FLASK_SECRET": "FLASK_SECRET" + "ROOT_DIR": "BASE_DIRECTORY", + "OAUTH_CLIENT_ID": "OAUTH_CLIENT_ID", + "FLASK_SECRET": "FLASK_SECRET", + "MYSQL_DATABASE": "opendc", + "MYSQL_USER": "opendc", + "MYSQL_PASSWORD": "opendcpassword", + "MYSQL_HOST": "127.0.0.1", + "MYSQL_PORT": 3306 } ``` Make the following replacements: * Replace `BASE_DIRECTORY` with the base directory in which you cloned `opendc` and `opendc-web-server`. * Replace `OAUTH_CLIENT_ID` with your OAuth client ID (see the [OpenDC README](https://github.com/atlarge-research/opendc#preamble)). -* Replace `PATH_TO_DATABASE` with where you created the database. * Replace `FLASK_SECRET`, come up with some string. +* Replace the `MYSQL_*` variables with the correct settings for accessing the MariaDB database that was just created. In `opendc-web-server/static/index.html`, add your own `OAUTH_CLIENT_ID` in `content=` on line `2`. |
