This project is no longer maintained. Visit OptaPlanner Employee Rostering Quickstart to see how to integrate OptaPlanner in your application.
An end-to-end OptaPlanner web application ready to deploy on OpenShift 4.
Build the project with maven in the project’s root directory:
mvn clean install -DskipTests -DskipITs
Run the application with the runLocally.sh
script:
./runLocally.sh
Then open http://localhost:8080/ to see the web application.
Alternatively, run npm start
in optaweb-employee-rostering-frontend
to start the frontend in one terminal,
and run mvn quarkus:dev
in optaweb-employee-rostering-backend
to start the backend in another terminal.
After building the project above, run the benchmark application with:
java -jar optaweb-employee-rostering-benchmark/target/quarkus-app/quarkus-run.jar
Note: make sure to run the project application and benchmark application on different ports if they are run simultaneously.
After benchmarking is complete, a benchmark report will be generated in the local/benchmarkReport
directory.
Open the index.html
file in your browser to view the benchmark results.
To configure the benchmarker, modify the employeeRosteringBenchmarkConfig.xml
file found in the
optaweb-employee-rostering-benchmark/src/main/resources
directory. Make sure to rebuild the project after modifying the
config file for the benchmarker changes to be applied.
Refer to the OptaPlanner Docs for more information on benchmark tweaking.
Use Red Hat CodeReady Containers to easily set up a single-node OpenShift 4 cluster on your local computer.
You have successfully built the project with Maven.
-
To install CRC, follow the Getting Started Guide.
-
When the cluster has started,
-
add oc command-line interface to your
$PATH
:eval $(crc oc-env)
-
log in as "developer".
-
-
Create a new project
oc new-project project_name
-
Run the script:
./runOnOpenShift.sh
Change the source code and build the backend module with Maven. Then start OpenShift build:
cd optaweb-employee-rostering-backend
oc start-build backend --from-dir=. --follow
IntelliJ, Eclipse and VS Code formatters IDE setup instructions.
Configure your IDE to run the main class, which is in
org.optaweb.employeerostering.OptaWebEmployeeRosteringApplication
in optaweb-employee-rostering-backend
repository.