Skip to content
Snippets Groups Projects
Unverified Commit 9622add9 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

MAINT: new structure in conf with core/ext

parent 4411237e
No related branches found
No related tags found
No related merge requests found
# configuration files
/conf/*
!/conf/*.template
/conf/ext/*
!/conf/core/*.template
# dot files but not .gitignore
.*
......
......@@ -81,7 +81,7 @@ test:server:
dependencies:
- build:server
script:
- echo "defaultRealm = CaosDB" > conf/usersources.ini
- echo "defaultRealm = CaosDB" > conf/ext/usersources.ini
- mvn test
###########
......
......@@ -27,7 +27,7 @@ On Debian, the required packages can be installed with:
After a fresh clone of the repository, this is what you need to setup the server:
1. It is recommended to run the unit tests with `make test`
2. Copy `conf/server.conf.template` to `conf/server.conf` and change it
2. Copy `conf/core/server.conf.template` to `conf/ext/server.conf` and change it
appropriately:
* Setup for MySQL back-end: Assuming that the mysql back-end is installed,
specify the fields `MYSQL_USER_NAME`, `MYSQL_USER_PASSWORD`,
......@@ -38,7 +38,7 @@ After a fresh clone of the repository, this is what you need to setup the server
* Select a path for the file system and set the fields `FILE_SYSTEM_ROOT`,
`DROP_OFF_BOX`, and `TMP_FILES`.
* Maybe set another `SESSION_TIMEOUT_MS`.
3. Copy `conf/usersources.ini.template` to `conf/usersources.ini`.
3. Copy `conf/core/usersources.ini.template` to `conf/ext/usersources.ini`.
* Define the users/groups who you want to include/exclude.
* Assign at least one user the `administration` role.
* It is important, that the file complies with the ini file specification.
......
caosdb-webui @ 4952d4b1
Subproject commit 7a0afa2ed82197d11c0787e749371381ff119df8
Subproject commit 4952d4b1b2645341d5e225857484a260304e0ee5
File moved
File moved
File moved
File moved
......@@ -30,20 +30,20 @@ run: compile
mvn exec:exec
run-debug: compile
mvn exec:exec -Dexec.args="-classpath %classpath -Djava.util.logging.config.file=./conf/logging.conf caosdb.server.CaosDBServer silent debug"
mvn exec:exec -Dexec.args="-classpath %classpath -Djava.util.logging.config.file=./conf/core/logging.conf caosdb.server.CaosDBServer silent debug"
compile: easy-units
mvn compile
run-nobackend:
mvn exec:exec -Dexec.args="-classpath %classpath -Djava.util.logging.config.file=./conf/logging.conf caosdb.server.CaosDBServer silent debug nobackend insecure"
mvn exec:exec -Dexec.args="-classpath %classpath -Djava.util.logging.config.file=./conf/core/logging.conf caosdb.server.CaosDBServer silent debug nobackend insecure"
start-portforwarding:
sudo iptables -t nat -N CAOSDB
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -g CAOSDB
sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -g CAOSDB
sudo iptables -t nat -A CAOSDB -p tcp --dport 80 -j REDIRECT --to-port $$(grep "SERVER_PORT_HTTP[^S]" conf/server.conf | grep -o -e "[0-9]*")
sudo iptables -t nat -A CAOSDB -p tcp --dport 443 -j REDIRECT --to-port $$(grep "SERVER_PORT_HTTPS" conf/server.conf | grep -o -e "[0-9]*")
sudo iptables -t nat -A CAOSDB -p tcp --dport 80 -j REDIRECT --to-port $$(grep "SERVER_PORT_HTTP[^S]" conf/ext/server.conf | grep -o -e "[0-9]*")
sudo iptables -t nat -A CAOSDB -p tcp --dport 443 -j REDIRECT --to-port $$(grep "SERVER_PORT_HTTPS" conf/ext/server.conf | grep -o -e "[0-9]*")
stop-portforwarding:
sudo iptables -t nat -D PREROUTING -p tcp --dport 80 -g CAOSDB
......
......@@ -22,7 +22,7 @@
# ** end header
#
LOC_DROPOFFBOX=$(awk < ./conf/server.conf '{ if ($1 == "DROP_OFF_BOX") print $3 }')
LOC_DROPOFFBOX=$(awk < ./conf/ext/server.conf '{ if ($1 == "DROP_OFF_BOX") print $3 }')
DB_USER=__DB_USER__
DB_GROUP=__DB_GROUP__
CMD_CHOWN=__CMD_CHOWN__
......
......@@ -224,7 +224,7 @@
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>-Djava.util.logging.config.file=./conf/logging.conf</argument>
<argument>-Djava.util.logging.config.file=./conf/core/logging.conf</argument>
<argument>caosdb.server.CaosDBServer</argument>
<argument>silent</argument>
</arguments>
......
......@@ -138,7 +138,7 @@ public class ServerProperties extends Properties {
serverProperties.setProperty(KEY_DROP_OFF_BOX, "CaosDBFileSystem/DropOffBox/");
serverProperties.setProperty(KEY_TMP_FILES, "CaosDBFileSystem/TMP/");
serverProperties.setProperty(KEY_CHOWN_SCRIPT, "misc/chown_script/caosdb_chown_dropoffbox");
serverProperties.setProperty(KEY_USER_SOURCES_INI_FILE, basepath + "/conf/usersources.ini");
serverProperties.setProperty(KEY_USER_SOURCES_INI_FILE, basepath + "/conf/ext/usersources.ini");
serverProperties.setProperty(KEY_USER_FOLDERS, "FALSE");
serverProperties.setProperty(KEY_NEW_USER_DEFAULT_ACTIVITY, "INACTIVE");
serverProperties.setProperty(KEY_AUTH_OPTIONAL, "FALSE");
......@@ -186,7 +186,7 @@ public class ServerProperties extends Properties {
serverProperties.setProperty(KEY_UNITS_FILE, basepath + "/src/main/java/caosdb/unit/si.units");
serverProperties.setProperty(KEY_TRANSACTION_BENCHMARK_ENABLED, "true");
serverProperties.setProperty(KEY_CACHE_CONF_LOC, "conf/cache.ccf");
serverProperties.setProperty(KEY_CACHE_CONF_LOC, "conf/core/cache.ccf");
serverProperties.setProperty(KEY_RULES_CACHE_CAPACITY, "100");
serverProperties.setProperty(KEY_SPARSE_ENTITY_CACHE_CAPACITY, "1000");
......@@ -201,7 +201,7 @@ public class ServerProperties extends Properties {
serverProperties.setProperty(KEY_QUERY_FILTER_ENTITIES_WITHOUT_RETRIEVE_PERMISSIONS, "TRUE");
try {
final File confFile = new File(basepath + "/conf/server.conf");
final File confFile = new File(basepath + "/conf/ext/server.conf");
if (confFile.exists()) {
final BufferedInputStream sp_in = new BufferedInputStream(new FileInputStream(confFile));
serverProperties.load(sp_in);
......
......@@ -29,7 +29,7 @@ public class FileSystemResourceTest {
@Test(expected = NullPointerException.class)
public void testGetFileElementNullDir() throws Exception {
new FileSystemResource().getFileElement(null, new File("conf/server.conf"));
new FileSystemResource().getFileElement(null, new File("conf/ext/server.conf"));
}
@Test(expected = NullPointerException.class)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment