Dev Environment Setup Instructions
Developer Setup
Install and Update Ubuntu Desktop (cur ver 20.04)
- Boot to a live version of Ubuntu Desktop on a cd or a usb key
- Install Ubuntu on the target hard drive
- Update ubuntu once it is finished installing
sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt autoremove
Install Java (cur ver11)
Detailed instructions found here
sudo apt install default-jdk
java -version
javac -version
Install Docker
Detailed instructions found here
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker
Setup Docker (Optional)
Detailed instructions found here. This will enable you to call docker without calling sudo.
sudo usermod -aG docker ${USER}
su - ${USER}
id -nG
Install Docker-Compose
Detailed instructions found here
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
Install Chrome
- Download Chrome
- Run Chrome installer
- Make chrome your default browser
Download OpenELIS-Global-2
- Fork the repo at https://github.com/I-TECH-UW/OpenELIS-Global-2
cd /path/to/eclipse/workspace
git clone [git@github.com](mailto:git@github.com):{Your_Github_Account}/OpenELIS-Global-2.git --recurse-submodules
Test If OpenELIS-Global-2 Deploys
- Open terminal to the OpenELIS-Global-2 directory
docker-compose up -d --build
- Access the application at https://localhost:8443/OpenELIS-Global
- Might need to dismiss a security warning
Developing in Eclipse
Install Maven
Detailed instructions here
sudo apt install maven
mvn -version
Install Eclipse
- Navigate to Eclipse download website (https://www.eclipse.org/downloads/)
- Download the installer
- Run the installer, choosing the Java ee version of eclipse
Optionally Install Eclipse Plugins
- Jaspersoft Reports
- eGit
Install Lombok in Eclipse
Instructions are here https://projectlombok.org/setup/eclipse
Setup Project in Eclipse
- File > Import > Projects from Folder or Archive
- ensure OpenELIS-Global-2 is selected (and dataexport-core and dataexport-api which are under eclipse)
- ensure detect and configure project natures is selected
- finish
- right click OpenELIS-Global-2 project > properties > Java Build Path > Projects > classpath > add
- add dataexport-core and dataexport-api
Setup Tomcat Server
- Download tomcat as tar.gz (cur ver 9)
- Extract into to your eclipse workspace directory (or wherever you want, but remember the location)
- Select servers tab in eclipse
- Right click in the servers tab, and select new > server
- Find tomcat 9 in the list, click it, and select next
- Select your tomcat installation directory (wherever you extracted it in step 2)
- Click next
- Add Open-Elis-Global-2 to the server and click finish
Configure Tomcat server
- Double click on the tomcat 9.0 server in the servers tab
- Click ‘Open launch configuration’
- Navigate to the Arguments tab
- Add the following 3 arguments to the VM arguments section, substituting whatever your local arguments are for your database
- -Ddatasource.password=clinlims -Ddatasource.username=clinlims -Ddatasource.url=jdbc:postgresql://localhost:15432/clinlims?currentSchema=clinlims
- click OK to finish
- optionally, extend the server timeout to 200 seconds
Configure Tomcat to Support ssl
- Expand the Servers folder in the projects tab
- Expand the server that runs OE
- Copy the contents of OpenELIS-Global-2/dev/tomcat/oe_server.xml into Tomcat v9.0 Server at localhost-config/server.xml
- Edit Tomcat v9.0 Server at localhost-config/server.xml, substituting your paths
- replace <Server port="-1" shutdown="SHUTDOWN"> with <Server port="8005" shutdown="SHUTDOWN">
- replace keystoreFile=”/run/secrets/keystore” with keystoreFile=”/path/to/openelis_global_2/dev/https/oe_selfsigned.keystore”
- replace truststoreFile="/run/secrets/truststore" with truststoreFile="/path/to/openelis_global_2/dev/https/oe_selfsigned.truststore"
- save
Point to your dev common.properties
sudo mkdir /run/secrets
sudo ln -s /path/to/project/dev/eclipse_common.properties /run/secrets/common.properties
- this is the file that will allow you to configure OE while running in eclipse. Ensure values filled out work for your dev environment. do not commit changes made for your deve environement.
create directory for logs
sudo mkdir /var/lib/openelis-global/logs/
sudo chmod 777 /var/lib/openelis-global/logs/
Run Everything but OE in docker
- Comment out the oe.openelisci.org service in docker-compose.yml
docker-compose up -d
- if oe is already running in docker, kill the container
Start Tomcat in Eclipse
- Make sure your project builds (project clean will normally trigger this)
- Click start server in normal, or debug mode