Skip to content

Commit

Permalink
Merge pull request #391 from kbase/dev-gradle
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
MrCreosote authored Apr 23, 2024
2 parents 7cbc1d0 + 45f065d commit 83f6901
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 17 deletions.
46 changes: 31 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Service for creating and managing groups of KBase users and associated Narratives.

Build status (master):
[![Build Status](https://travis-ci.org/kbase/groups.svg?branch=master)](https://travis-ci.org/kbase/groups)
[![codecov](https://codecov.io/gh/kbase/groups/branch/master/graph/badge.svg)](https://codecov.io/gh/kbase/groups)

## API Data structures
Expand Down Expand Up @@ -983,24 +982,41 @@ that the fields be kept few and small in size.
## Requirements
Java 8 (OpenJDK OK)
Apache Ant (http://ant.apache.org/)
MongoDB 2.6+ (https://www.mongodb.com/)
Jetty 9.3+ (http://www.eclipse.org/jetty/download.html)
(see jetty-config.md for version used for testing)
This repo (git clone https://github.com/kbase/groups)
The jars repo (git clone https://github.com/kbase/jars)
The two repos above need to be in the same parent folder.
## To start server
## Starting the server
start mongodb
if using mongo auth, create a mongo user
cd into the groups repo
`ant build`
copy `deploy.cfg.example` to `deploy.cfg` and fill in appropriately
`export KB_DEPLOYMENT_CONFIG=<path to deploy.cfg>`
`cd jettybase`
`./jettybase$ java -jar -Djetty.http.port=<port> <path to jetty install>/start.jar`
### Docker
The provided `Dockerfile` can be used to build and run an image. See the deployment template
in `deployment/conf/.templates` for the environment variables available to configure the
service - the `deploy.cfg.example` file provides documentation for these variables.
`docker-compose --build -d` can be used to start a MongoDB instance and groups
service pointed at the KBase environment of your choice.
### Manually
* Start mongodb
* If using mongo auth, create a mongo user
* `cd` into the groups repo
```shell
./gradlew war
mkdir -p jettybase/webapps
cp build/libs/groups.war jettybase/webapps/ROOT.war
```

* copy `deploy.cfg.example` to `deploy.cfg` and fill in appropriately

```shell
export KB_DEPLOYMENT_CONFIG=<path to deploy.cfg>
cd jettybase
./jettybase$ java -jar -Djetty.port=<port> <path to jetty install>/start.jar
```

## Developer notes

Expand All @@ -1016,14 +1032,14 @@ copy `deploy.cfg.example` to `deploy.cfg` and fill in appropriately
* Releases
* The master branch is the stable branch. Releases are made from the develop branch to the master
branch.
* Update the version as per the semantic version rules in `src/us/kbase/groups/api/Root.java`.
* Update the version as per the semantic version rules in `src/main/java/us/kbase/groups/api/Root.java`.
* Tag the version in git and github.

### Running tests

* Copy `test.cfg.example` to `test.cfg` and fill in the values appropriately.
* If it works as is start buying lottery tickets immediately.
* `ant test`
* `./gradlew test`

### UI

Expand Down
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ plugins {
id 'org.ajoberstar.grgit' version '4.1.1'
}

// TODO NOW update any ant refs in docs to gradle

repositories {
mavenCentral()
}
Expand Down

0 comments on commit 83f6901

Please sign in to comment.