nomad-maven-plugin

Maven plugin to deploy jar artifact (like microservice) to HashiCorp Nomad (https://www.nomadproject.io/)

Лицензия

Лицензия

Категории

Категории

Maven Компиляция и сборка Ant
Группа

Группа

com.github.vantonov1
Идентификатор

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

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

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

1.0
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

nomad-maven-plugin
Maven plugin to deploy jar artifact (like microservice) to HashiCorp Nomad (https://www.nomadproject.io/)
Ссылка на сайт

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

https://github.com/vantonov1/nomad-maven-plugin
Система контроля версий

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

https://github.com/vantonov1/nomad-maven-plugin

Скачать nomad-maven-plugin

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

<plugin>
    <groupId>com.github.vantonov1</groupId>
    <artifactId>nomad-maven-plugin</artifactId>
    <version>1.0</version>
</plugin>

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.hashicorp.nomad : nomad-sdk jar 0.8.6.1
javax.xml.bind : jaxb-api jar 2.3.1

provided (4)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-plugin-api jar 3.3.9
org.apache.maven : maven-core jar 3.3.9
org.apache.maven : maven-artifact jar 3.3.9
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.6.0

runtime (1)

Идентификатор библиотеки Тип Версия
org.glassfish.jaxb : jaxb-runtime jar 2.3.1

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

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

Usage: nomad:deploy. Plugin is not bound to any lifecycle phase by default (rather it is expected to be used as a part of release process), but it could be bound as usual, using <execution> block

Nomad needs artifact to be downloaded from some repository, it could not be deployed right from the target folder. Therefore, artifact is expected to be deployed to the repository first, and project distributionManagement.downloadUrl have to be set. Plugin constructs download URL using distributionManagement.downloadUrl, groupId, artifactId, version and classifier from the project POM. For SNAPSHOT artifacts, it downloads and parses maven-metadata.xml to get the latest uploaded version

Task name and task group name will be set to artifactId. These Nomad environment variables will be used:

Variable Default value Description
NOMAD_ADDR http://127.0.0.1:4646 URL of the HTTP API
NOMAD_REGION Region
NOMAD_NAMESPACE default Job namespace
NOMAD_CA_CERT Path to TLS Authority certificate file
NOMAD_CLIENT_CERT Path to client certificate file
NOMAD_CLIENT_KEY Path to client key file
NOMAD_TOKEN ACL token

Additionally, you can set these parameters in the configuration block:

Variable Default value Description
addr from NOMAD_ADDR Overrides API address
options Java options, passed to nomad java driver to start the job
datacenters dc1 List of data centers, divided by comma
port http Label for the dynamic port allocation
env <env><key1>value1</key1>...</env> passed as a set of environment variables
meta <meta><key1>value1</key1>...</meta> passed as meta information

Configuration example:

            <plugin>
                <groupId>com.github.vantonov1</groupId>
                <artifactId>nomad-maven-plugin</artifactId>
                <version>1.0</version>
                <configuration>
                    <addr>http://nomad.local:4646</addr>
                    <datacenters>west,east</datacenters>
                    <options>-Xmx1G</options>
                    <port>web</port>
                    <meta>
                        <k1>v1</k1>
                    </meta>
                </configuration>
            </plugin>

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

Версия
1.0