Skip to content

Commit

Permalink
Updated README and added initial admin username/password
Browse files Browse the repository at this point in the history
  • Loading branch information
cicchr committed Apr 13, 2018
1 parent 0b74a03 commit 481187d
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 15 deletions.
58 changes: 45 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,65 @@ TODO

1. Download and install the server package for your system from the [Releases](https://github.com/cicchr/ARIS-Java/releases) section
2. Obtain signed SSL certificates from a valid certificate authority and save the ca certificate and private key using the x509 encoded pem format
3. Modify the file located in /etc/aris.cfg and set the ca and key options to the location where the certificate and key are stored
3. Create a configuration file in /etc/aris.d/ (You can add a 2 digit suffix to set the file's priority) and set the ca and key options to the location where the certificate and key are stored
```
#/etc/aris.cfg
# /etc/aris.d/<filename>
# The CA certificate to use for connections. If this is not specified here or on the command line the server will run in self signing mode
ca <certificate-file-path>
# The private key for the above certificate. If this is not specified here of on the command line the server will run in self signing mode
key <key-file-path>
```
4. Setup the database and start the server.
4. Setup the database.
Note: The aris-configdb command exists to simplify this process. Otherwise follow the steps listed below.
1.
2.
5. Run the aris-adduser command and follow the prompts to create an instructor on the server for access through the standard interface
1. Create the database for aris in postgres.
```
# Open the postgres interactive terminal
sudo -u postgres psql
# The following commands should be run in postgres
CREATE DATABASE <aris-database-name>;
CREATE USER <aris-username>;
ALTER USER <aris-username> WITH ENCRYPTED PASSWORD '<aris-password>';
GRANT ALL PRIVILEGES ON DATABASE <aris-database-name> TO <aris-username>;
# To exit the interface type \q
```
2. Either create a new configuration file in /etc/aris.d/ or use the same as in step 3 and add the following settings
```
# /etc/aris.d/<filename>
# The name of the postgres database for Aris to use
db-name <aris-database-name>
# The postgres database user for Aris to login as
db-user <aris-username>
# The postgres database password
db-pass <aris-password>
# The domain name of the server
# Note this is only required when the server is running in self signing mode
domain <example.com>
```
5. Start and enable the service
```
sudo systemctl start aris
sudo systemctl enable aris
```
sudo aris-adduser
```
6. Ensure the port (default: 9001) is open on the server's firewall
7. Once the server has started you can use the client to login using the default login:
```
User: admin
Password: ArisAdmin1
```
Note: To run the server in self signing mode skip steps 2 and 3 (not recommended) and set the domain setting in /etc/aris.cfg
```
domain <example.com>
```
Note: To run the server in self signing mode skip steps 2 and 3 (not recommended)
## Authors
Expand Down
2 changes: 1 addition & 1 deletion libaris/res/edu/rpi/aris/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.43
0.0.44
3 changes: 2 additions & 1 deletion server/src/edu/rpi/aris/net/server/DatabaseManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private void verifyDatabase(Connection connection) throws SQLException, IOExcept
}
}

private void createTables(Connection connection) throws SQLException {
private void createTables(Connection connection) throws SQLException, IOException {
logger.warn("Creating non existent tables");
logger.warn("If this is not the first run of the program this may have unexpected results");
boolean autoCommit = connection.getAutoCommit();
Expand Down Expand Up @@ -137,6 +137,7 @@ private void createTables(Connection connection) throws SQLException {
"constraint s_ufk foreign key (user_id) references users(id) on delete cascade," +
"constraint s_pfk foreign key (proof_id) references proof(id) on delete cascade);");
connection.commit();
createUser("admin", "ArisAdmin1", NetUtil.USER_INSTRUCTOR);
} catch (Throwable e) {
connection.rollback();
logger.error("An error occurred while creating the tables and the changes were rolled back");
Expand Down

0 comments on commit 481187d

Please sign in to comment.