Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Developer doc updates and small qol changes #1415

Merged
merged 3 commits into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ src/main/webapp/node_modules
### MISC ###
/.theia/launch.json
*.swp
/src/main/resources/application-local.properties
/src/main/resources/application-local.properties
ericenns marked this conversation as resolved.
Show resolved Hide resolved
java_pid*.hprof
gradle.properties
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

## [Unreleased]
* [UI/Developer]: Updated `react-router` to the version 6.4.3. See[PR 1405](https://github.com/phac-nml/irida/pull/1405)
* [Developer] Updated developer setup documentation, ignore java_pid*.hprof files, and added quality of life file `gradle.properties`

## [22.09.4] - 2022/11/14
* [REST]: Fixed issue with project/samples api response missing samples when a sample has a default sequencing object. See [PR 1413](https://github.com/phac-nml/irida/pull/1413)
Expand Down
58 changes: 53 additions & 5 deletions doc/developer/setup/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,47 @@ IRIDA is configured to use the following credentials by default:

You'll need to permit those user credentials to create the tables in the database. A quick one-liner for that is:

echo "grant all privileges on irida_test.* to 'test'@'localhost' identified by 'test';" | mysql -u root -p
```
# Create the 'test' user:
echo "CREATE USER 'test'@'localhost' IDENTIFIED BY 'test';" | mysql -u root -p

Also create the database if it doesn't exist:
# Create the database if it doesn't exist:
echo "create database irida_test;" | mysql -u root -p

echo "create database irida_test;" | mysql -u root -p
# Grand 'test' user permissions to database:
echo "grant all privileges on irida_test.* to 'test'@'localhost';" | mysql -u root -p
```

In order to run local integration tests, the database `irida_integration_test` is used instead. This database requires permissions from user `'test'@'localhost'`. To grant such permissions a quick one-liner is:
In order to run local integration tests, the same steps need to be performed for the database name `irida_integration_test`
```
# Create the database if it doesn't exist:
echo "create database irida_integration_test;" | mysql -u root -p

# Grand 'test' user permissions to database:
echo "grant all privileges on irida_integration_test.* to 'test'@'localhost';" | mysql -u root -p
```

### Configure Docker

IRIDA uses Docker to create galaxy instances when running integration tests.

https://docs.docker.com/engine/install/ubuntu/

You will also need to ensure your user has permissions to run docker commands. Please note that doing this effectively gives your user root access, so this should only be done in development environments.

```
# Create the docker group if it does not exist
sudo groupadd docker
# Add your user to the docker group.
sudo usermod -aG docker $USER
# login to docker group so you don't have to sign in/out
newgrp docker
# restart docker
sudo systemctl restart docker
# test that you can create docker instances
docker run hello-world
```

echo "grant all privileges on irida_integration_test.* to 'test'@'localhost';" | mysql -u root -p

### Configure Filesystem Locations

Expand Down Expand Up @@ -143,6 +175,22 @@ To run the full integration test suite for IRIDA please run the following:

This will run all the integration test profiles using Gradle, and print out reports for each profile.

#### Memory requirements

Your environment may throw java heap size errors when running tests.

You can increase the heap size by editing the `gradle.properties` file in the project directory and adding the following line:

`org.gradle.jvmargs=-Xmx4096m`
ericenns marked this conversation as resolved.
Show resolved Hide resolved

Another method is to set the environment variable

`env GRADLE_OPTS='-Xmx4096m'`

And then running the following to kill active daemons to apply the change

`./gradlew --stop`

Setting up Galaxy
-----------------

Expand Down
8 changes: 8 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Project-wide Gradle settings.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# org.gradle.jvmargs=-Xmx4096m