A microservice that orbits around CMS exposing the Task and Contest core entities (alongside some embeded ones, like statements, datasets and testcases) as REST resources.
CMS Galatea can be deployed and run as a Docker container or a standalone java application (a fat jar); either way is recommend to run this application as the former one.
CMS Galatea relies on CMS database, so in order to have this application up and running you need:
- CMS 1.3.x or greater DB schema (the current Galatea version was designed against the last CMS revision in Jan 2018)
- CMS PostreSQL DB schema access (it could be the same crendentials that CMS uses but is not recommended)
- Docker engine 17.x or greater
As long the prerequisites are met CMS Galatea can be run as easy as prompting
docker run -p 8080:8080 jossemargt/cmsgalatea
Have in mind that the application will run with the default configurations, which may not suit for your environment and because of that you should take a look into the Configuration section.
All the intrinsic configurations can be overriden as Spring externalized
configurations
which in the Docker container context boild down to environment variables. As
for example in order to override the spring.datasource.url
value, you could
start the Docker container with the following syntax:
docker run -p 8080:8080 -e 'SPRING_DATASOURCE_URL=jdbc:postgresql://10.10.37.10:5432/cmsdb' jossemargt/cmsgalatea
Some of the properties of interest could be:
Property name | Default value | Description |
---|---|---|
spring.datasource.username | cmsuser | JDBC + PostgreSQL datasource username |
spring.datasource.password | notsecure | JDBC + PostgreSQL datasource password |
spring.datasource.url | jdbc:postgresql://localhost:5432 | JDBC + PostgreSQL datasource URL |
logging.file | Logging file | |
logging.level.com.jossemargt.cmsgalatea | ERROR | Application logging level |
logging.level.com.querydsl.jpa.impl.JPAQuery | ERROR | JPA query logging level |
logging.level.org.hibernate.stat | ERROR | Hibernate stats logging level |
In order to start hacking with this project you need:
Then it is only matter of cloning the repository
git clone https://github.com/jossemarGT/cms-galatea.git galatea
cd galetea
Open the source code with your preferred text editor, hack and test/build the results with maven:
mvn clean package
All the git (remote) branches and pull requests on this repository are being tracked by Travis CI, each commit source code is test and built, but only the git tags from master branch will be released as a Java artifact (jar) and Docker image.
If you need to reproduce the tagging and release cycle, you could manually use the following maven goals:
mvn versions:set -DnewVersion=$(git describe --abbrev=0 --tags)
mvn package dockerfile:build dockerfile:push
This project use SemVer for versioning. For the versions available, see the tags on this repository.
The first CMS Galatea release was completely generated with spring-roo,
if for some reason you need to recreate the whole codebase from scratch, you
could use the gen/init.roo
roo script.
This project is licensed under the MIT License - see the LICENSE file for details.