https://github.com/lightbend/reactive-app-maven-plugin
https://github.com/lightbend/reactive-app-maven-plugin
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lightbend/reactive-app-maven-plugin
- Owner: lightbend
- Archived: true
- Created: 2017-12-18T14:38:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-05-25T03:20:46.000Z (about 3 years ago)
- Last Synced: 2025-07-19T08:04:42.572Z (12 months ago)
- Language: Java
- Homepage: https://developer.lightbend.com/docs/lightbend-orchestration/current/
- Size: 144 KB
- Stars: 2
- Watchers: 8
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# reactive-app-maven-plugin
This project is a component of [Lightbend Orchestration](https://developer.lightbend.com/docs/lightbend-orchestration/current/). Refer to its documentation for usage, examples, and reference information.
This plugin builds Docker images that can be used with CLI tool, [reactive-cli](https://github.com/lightbend/reactive-cli), to automatically create resources for deployment on Kubernetes and DC/OS.
## Installation
If you want to check out source code and build a local snapshot build, you can do it like this:
```
git clone git@github.com:lightbend/reactive-app-maven-plugin.git
cd reactive-app-maven-plugin
mvn install
```
Otherwise, plugin should be available from public maven repositories.
## Project setup
Add build plugin dependency in your pom.xml:
```
com.lightbend.rp
reactive-app-maven-plugin
0.3.0
com.lightbend.rp.test.akkacluster.SimpleClusterApp
build-docker
build
```
### Configuration
If your project isn't built using Lagom or Play, for orchestration to know what to run, you need to specify main class of your project with `` element in the configuration.
Additionally, you can specify HTTP ingress paths and ports like this:
```
9000
/
```
We also support limiting cpu, disk and memory usage like this:
```
0.5
512Mi
1Gi
```
### reactive-lib dependencies
To run your application in Lightbend Orchestration environment, helper libraries must be added as dependencies. They do service discovery and cluster bootstrapping, two
important steps in starting up your application successfully. You can add these libraries in your pom.xml dependency section:
```
com.lightbend.rp
reactive-lib-service-discovery-lagom14-java_2.12
0.8.1
com.lightbend.rp
reactive-lib-akka-cluster-bootstrap_2.12
0.8.1
```
Plugin will do its best to complain if you should depend on something and forgot to add it. Rule of thumb is: if you use Akka Cluster features, you
need `reactive-lib-akka-cluster-bootstrap`; if you use Lagom, you also need `reactive-lib-service-discovery` and
`api-tools`.
## Building a docker image
Once project setup is done, you can build a docker image & install it to your docker environment:
```
mvn install
```
You can use `rp` tool with this docker image to generate deployment resources:
```
rp generate-kubernetes-resources "akka-quickstart:1.0" \
--generate-pod-controllers \
--generate-services \
--pod-controller-replicas 2
```
To read more about `rp` go here: