|
1 | 1 | # Getting started with RSpace source code
|
2 | 2 |
|
3 |
| -These instructions are for anyone wanting to run RSpace from source code |
4 |
| -on their local machine. |
| 3 | +These instructions are for anyone wanting to run RSpace from source code, on their local machine. |
5 | 4 |
|
6 | 5 | ## Initial Setup
|
7 | 6 |
|
| 7 | +### Recommended hardware |
| 8 | + |
| 9 | +For production setup we recommend a Linux-based server with at least 8Gb RAM. More details: |
| 10 | +https://documentation.researchspace.com/article/q5dl9e6oz6-system-requirements-for-research-space |
| 11 | + |
| 12 | +For development you should be able to run all the code and tests fine with Linux/MacOS. |
| 13 | + |
8 | 14 | ### Install required software
|
9 | 15 | - Install Java JDK17, use OpenJDK rather than Oracle.
|
10 | 16 | - Install MariaDB 10.3.39, or later (MariaDB 11.3 is used fine on dockerized RSpace version)
|
@@ -116,14 +122,14 @@ mvn clean package -DskipTests=true -DgenerateReactDist=clean -DrenameResourcesMD
|
116 | 122 | You can also check top-level Jenkinsfile file to see how internal tests builds are created by
|
117 | 123 | ResearchSpace dev team (check 'Build prodRelease-like package' stage script).
|
118 | 124 |
|
119 |
| -### Set up MySQL database |
| 125 | +### Set up MariaDB/MySQL database |
120 | 126 |
|
121 |
| -#### MySQL initialisation |
| 127 | +#### MariaDB/MySQL initialisation |
122 | 128 |
|
123 |
| -Take these steps if you do not have MySQL or have a fresh installation of MySQL. |
| 129 | +Take these steps if you do not have MariaDB/MySQL or have a fresh installation of MariaDB/MySQL. |
124 | 130 |
|
125 | 131 | ```bash
|
126 |
| -# These steps are specific to Linux, adapt as needed |
| 132 | +# These steps are specific to Linux and MySQL5.7, adapt as needed |
127 | 133 |
|
128 | 134 | # 1. Install the database package (your package manager might be apt, dnf, yum, ...)
|
129 | 135 | nix-env --install mysql57
|
@@ -170,25 +176,29 @@ After adding/updating the file and restarting mysql confirm that `SELECT @@sql_m
|
170 | 176 | #### RSpace table setup
|
171 | 177 |
|
172 | 178 | 1. Make sure MariaDB/MySQL is installed and running on your machine.
|
173 |
| -2. Set up an rspacedbuser user and rspace database on your MySQL using this command: |
| 179 | +2. Set up an 'rspacedbuser' user and 'rspace' database on your MariaDB/MySQL using this command: |
174 | 180 |
|
175 | 181 | ```bash
|
176 | 182 | mysql -u "root" -p"password" -e "
|
177 |
| - CREATE USER 'rspacedbuser'@'localhost' IDENTIFIED BY 'rspacedbpwd'; |
| 183 | + CREATE USER 'rspacedbuser'@'127.0.0.1' IDENTIFIED BY 'rspacedbpwd'; |
178 | 184 | CREATE DATABASE rspace collate 'utf8mb4_unicode_ci';
|
179 |
| - GRANT ALL ON rspace.* TO 'rspacedbuser'@'localhost'; |
| 185 | + GRANT ALL ON rspace.* TO 'rspacedbuser'@'127.0.0.1'; |
180 | 186 | "
|
181 | 187 | ```
|
182 |
| -**NOTE:** on FIRST startup of Rspace with an empty rspace, dont skip the tests else liquibase fails (for unknown reasons), |
183 |
| -i.e. do not have -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true |
| 188 | +**NOTE:** on FIRST startup of Rspace with an empty rspace, don't skip the tests else liquibase fails for unknown reasons; |
| 189 | +i.e. do not have `-Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true` |
184 | 190 | in your launch config
|
185 | 191 |
|
| 192 | +**NOTE:** depending on OS and DB used, your may need to change the username in creation/grant commands |
| 193 | +from `'rspacedbuser'@'127.0.0.1'` to `'rspacedbuser'@'localhost'`. |
| 194 | +You will know if running the tests/app gets you db authentication error for user `'rspacedbuser'@'localhost'` |
| 195 | + |
186 | 196 | **NOTE:** if you subsequently drop the rspace DB, the rspacedbuser user will stay; do not try to recreate the user.
|
187 | 197 |
|
188 | 198 | At the end of this, you should be able to connect to the rspace database from
|
189 | 199 | your command line. with `bash mysql -urspacedbuser -prspacedbpwd rspace`.
|
190 | 200 |
|
191 |
| -rspace is used for running acceptance tests and the application on localhost. |
| 201 | +'rspace' database is used for running acceptance tests and the application on localhost. |
192 | 202 |
|
193 | 203 | ### Set up RSpace FileStore location
|
194 | 204 |
|
|
0 commit comments