reactive-app-maven-plugin

Helper plugin for building applications to run using Lightbend Orchestration

Лицензия

Лицензия

Категории

Категории

Maven Компиляция и сборка React Взаимодействие с пользователем Веб-фреймворки
Группа

Группа

com.lightbend.rp
Идентификатор

Идентификатор

reactive-app-maven-plugin
Последняя версия

Последняя версия

0.3.0
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

reactive-app-maven-plugin
Helper plugin for building applications to run using Lightbend Orchestration
Ссылка на сайт

Ссылка на сайт

https://github.com/lightbend/reactive-app-maven-plugin
Организация-разработчик

Организация-разработчик

Lightbend Inc.
Система контроля версий

Система контроля версий

https://github.com/lightbend/reactive-app-maven-plugin

Скачать reactive-app-maven-plugin

Как подключить последнюю версию

<plugin>
    <groupId>com.lightbend.rp</groupId>
    <artifactId>reactive-app-maven-plugin</artifactId>
    <version>0.3.0</version>
</plugin>

Зависимости

compile (9)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-plugin-api jar 3.3.1
org.apache.maven : maven-core jar 3.3.1
org.apache.maven : maven-model jar 3.3.1
org.apache.maven : maven-artifact jar 3.3.1
org.apache.maven : maven-compat jar 3.3.1
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.2
org.twdata.maven : mojo-executor jar 2.2.0
org.json : json jar 20180130
com.github.zafarkhaja : java-semver jar 0.9.0

Модули Проекта

Данный проект не имеет модулей.

reactive-app-maven-plugin

This project is a component of Lightbend Orchestration. Refer to its documentation for usage, examples, and reference information.

This plugin builds Docker images that can be used with CLI tool, 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:

<plugin>
    <groupId>com.lightbend.rp</groupId>
    <artifactId>reactive-app-maven-plugin</artifactId>
    <version>0.3.0</version>
    <configuration>
        <mainClass>com.lightbend.rp.test.akkacluster.SimpleClusterApp</mainClass>
    </configuration>
    <executions>
        <execution>
            <id>build-docker</id>
            <goals>
                <goal>build</goal>
            </goals>
        </execution>
    </executions>
</plugin>

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 <mainClass> element in the configuration.

Additionally, you can specify HTTP ingress paths and ports like this:

<httpIngressPorts>
    <port>9000</port>
</httpIngressPorts>
<httpIngressPaths>
    <path>/</path>
</httpIngressPaths>

We also support limiting cpu, disk and memory usage like this:

<cpu>0.5</cpu>
<memory>512Mi</memory>
<disk>1Gi</disk>

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:

<dependency>
    <groupId>com.lightbend.rp</groupId>
    <artifactId>reactive-lib-service-discovery-lagom14-java_2.12</artifactId>
    <version>0.8.1</version>
</dependency>
<dependency>
    <groupId>com.lightbend.rp</groupId>
    <artifactId>reactive-lib-akka-cluster-bootstrap_2.12</artifactId>
    <version>0.8.1</version>
</dependency>

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: https://developer.lightbend.com/docs/lightbend-orchestration/current/kubernetes-deployment.html

com.lightbend.rp

Lightbend

Версии библиотеки

Версия
0.3.0