Skip to content

Commit 4ec2a21

Browse files
authored
documentation updates and 2.0.0 release preparation (rspace-os#31)
* update Changelog-OS.md * update GettingStarted.md: add paragraph on hardware requirements * update GettingStarted.md: note command variants when creating database/user * clear obsolete slack webhook from test code
1 parent 5bb0ed7 commit 4ec2a21

File tree

4 files changed

+38
-18
lines changed

4 files changed

+38
-18
lines changed

DevDocs/DeveloperNotes/GettingStarted/GettingStarted.md

+22-12
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# Getting started with RSpace source code
22

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.
54

65
## Initial Setup
76

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+
814
### Install required software
915
- Install Java JDK17, use OpenJDK rather than Oracle.
1016
- 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
116122
You can also check top-level Jenkinsfile file to see how internal tests builds are created by
117123
ResearchSpace dev team (check 'Build prodRelease-like package' stage script).
118124

119-
### Set up MySQL database
125+
### Set up MariaDB/MySQL database
120126

121-
#### MySQL initialisation
127+
#### MariaDB/MySQL initialisation
122128

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.
124130

125131
```bash
126-
# These steps are specific to Linux, adapt as needed
132+
# These steps are specific to Linux and MySQL5.7, adapt as needed
127133

128134
# 1. Install the database package (your package manager might be apt, dnf, yum, ...)
129135
nix-env --install mysql57
@@ -170,25 +176,29 @@ After adding/updating the file and restarting mysql confirm that `SELECT @@sql_m
170176
#### RSpace table setup
171177

172178
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:
174180

175181
```bash
176182
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';
178184
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';
180186
"
181187
```
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`
184190
in your launch config
185191

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+
186196
**NOTE:** if you subsequently drop the rspace DB, the rspacedbuser user will stay; do not try to recreate the user.
187197

188198
At the end of this, you should be able to connect to the rspace database from
189199
your command line. with `bash mysql -urspacedbuser -prspacedbpwd rspace`.
190200

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.
192202

193203
### Set up RSpace FileStore location
194204

DevDocs/public/Changelog-OS.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ This document records significant changes to RSpace.
22
It includes a summary of new features, bugfixes and server-side configuration changes.
33
The intended audience is on-prem RSpace technical administrators who maintain RSpace.
44

5+
# 2.0.0 2024-06-26
6+
7+
- first public release of open-source RSpace
8+
9+
# 2.0.0-RC2 2024-06-25
10+
11+
- all project dependencies updated to versions available at https://github.com/rspace-os/ repos
12+
513
# 2.0.0-RC1 2024-06-04
614

7-
- pre-release of open-source RSpace version
15+
- private pre-release of open-source codebase of rspace-web project

src/test/java/com/researchspace/service/ExternalMessageHandlerImplTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ private Map<String, String> getSlackDevDfg() {
142142
Map<String, String> map = new HashMap<>();
143143
map.put("SLACK_CHANNEL_NAME", "general");
144144
map.put("SLACK_TEAM_NAME", "rspacedev");
145-
map.put("SLACK_WEBHOOK_URL", SlackPosterTest.RSPACEDEV_GENERAL_WEBHOOK);
145+
map.put("SLACK_WEBHOOK_URL", SlackPosterTest.SLACK_WEBHOOK);
146146
map.put("SLACK_CHANNEL_LABEL", "general");
147147
map.put("SLACK_USER_ID", "U123");
148148
map.put("SLACK_TEAM_ID", "T456");

src/test/java/com/researchspace/slack/SlackPosterTest.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@
88
import java.net.URISyntaxException;
99
import org.junit.After;
1010
import org.junit.Before;
11+
import org.junit.Ignore;
1112
import org.junit.Test;
1213
import org.junit.runner.RunWith;
1314
import org.springframework.http.HttpEntity;
1415
import org.springframework.http.HttpStatus;
1516
import org.springframework.http.ResponseEntity;
1617
import org.springframework.web.client.RestTemplate;
1718

19+
@Ignore("requires correct real secret webhook")
1820
@RunWith(ConditionalTestRunnerNotSpring.class)
1921
public class SlackPosterTest {
2022

21-
public static final String RSPACEDEV_GENERAL_WEBHOOK =
22-
"https://hooks.slack.com/services/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";
23+
public static final String SLACK_WEBHOOK =
24+
"https://hooks.slack.com/services/<secret_webhook>";
2325

2426
@Before
2527
public void setUp() throws Exception {}
@@ -35,8 +37,8 @@ public void test() throws URISyntaxException {
3537
String jsonMessage = SlackMessageTest.createAnySlackMessage(converted).toJSON();
3638

3739
URI uri;
38-
uri = new URI(RSPACEDEV_GENERAL_WEBHOOK);
39-
HttpEntity<String> requestEntity = new HttpEntity<String>(jsonMessage);
40+
uri = new URI(SLACK_WEBHOOK);
41+
HttpEntity<String> requestEntity = new HttpEntity<>(jsonMessage);
4042
ResponseEntity<String> resp = template.postForEntity(uri, requestEntity, String.class);
4143
assertTrue(HttpStatus.OK.equals(resp.getStatusCode()));
4244
}

0 commit comments

Comments
 (0)