This is the master repository for all Senate Employee Self Service (ESS) applications.
- Java JDK 17
- Git
- IntelliJ IDEA
- Tomcat 9
- Postgresql
- also libs (
postgresql-contribon ubuntu)
- also libs (
- Maven
- Node.js 20.12.0
- Use nvm or Volta for versioning
- Bower + Grunt
sudo npm install -g bower grunt
Enter the postgres terminal:
sudo su postgres -c psqlIn the postgres terminal:
CREATE USER essuser WITH LOGIN PASSWORD 'anything_but_this_password';
CREATE DATABASE ess;
GRANT CONNECT, CREATE ON DATABASE ess TO essuser;
Create a data directory for ess and ensure it has proper ownership. Set ownership to the user that will run the application (likely your personal user but maybe tomcat).
sudo mkdir -p /data/ess
sudo chown {youruser}:{yourusergroup} /data/essCreate config files from all the example files:
for f in src/{main,test}/resources/*.example; do cp -- "$f" "${f%.example}"; done
touch src/test/resources/test.app.properties
cp src/main/resources/log4j2.xml src/test/resources/test.log4j2.xml
cp src/main/webapp/grunt.properties.example.json src/main/webapp/grunt.properties.jsonPortions marked with 🧑💻 will require help from a dev or database admin.
There may be additional property config required for certain features. This just covers essential properties required to run the app + tests.
- If you used something other than
/data/essfor the data dir, record that path indata.dir - If you are setting up for dev use, set
auth.enabled = falseto login as any user. Also setauth.master.passto your desired master password. - 🧑💻 Obtain ldap url, base, as well as the user dn and password for the developer account.
Use this to fill out the
ldapfields in the ldap config section - Fill out the
db.localuser/pass based on the postgres config from earlier. - 🧑💻 Fill out the
db.remoteuser/pass fields with your SFMS credentials. Ask the db admin if not known. - 🧑💻 Fill out
master,ts, andbase.sfmsschema values. Get these from a dev. - 🧑💻 Fill out
mail.smtpfields, obtain from a dev - Set
mail.test.addressto your personal email address
Fill out flyway.user and flyway.password properties with values from the postgres config
🧑💻 Fill out the ldap test fields. You can use the same credentials from app.properties.
For the dn field, just use the cn portion of ldap.user.dn from app.properties.
This command does the following:
- builds the Java backend
- builds the frontend
- packages the whole application
- runs unit tests
- runs integration tests
mvn verifyCreate a run configuration in IntelliJ that can be used launch ESS on Tomcat with debugging capability. Recommended for development.
- In the IntelliJ top menu, go to Run -> Edit Configurations.
- Above the list of configurations on the left, click "+" to create a new config.
- Scroll down until you find Tomcat Server. Select the Local option.
- In the Server tab, check the Application Server setting to ensure it's referencing your tomcat install.
- If not, click "Configure" and enter your install dir as Tomcat Home, quite possibly
/usr/share/tomcat9.
- If not, click "Configure" and enter your install dir as Tomcat Home, quite possibly
- Ensure that the JRE is set to Java 17.
- In the Deployment tab, click "+" to add a new deployment artifact. Select
ess:war exploded - Scroll down to Application Context and make sure that is set to "/"
- Click "OK" to save the configuration
- Open the Services tab. (Alt + 8 or look for a "play" symbol in a hexagon)
- Select ESS under Tomcat Server and click the Run button (play symbol icon).
- This should start the ESS server on localhost:8080.
- Rerun using the Debug button for debug capability.