fuse

boxfuse:fuse

Fuses a Payload together with the Components it requires into an Image.

Usage: mvn boxfuse:fuse -Dboxfuse.payload=payload

When run as part of a build, the project artifact will automatically be used as a payload.

> mvn boxfuse:fuse -Dboxfuse.payload=hello-1.0.war

Fusing Image for hello-1.0.war ...
Image fused in 00:07.351s (48147 K) -> axelfontaine/hello:1.0

Supported Payload formats:

  • Executable jar file
  • War file
  • Play dist zip
  • Node.js tgz
  • ELF64 binary
  • Revel tar.gz

Properties

Plugin Parameter Maven/System property Default Description
user boxfuse.user Required - Your Boxfuse Client user. Also configurable via the BOXFUSE_USER environment variable or the Maven settings.xml
secret boxfuse.secret Required - Your Boxfuse Client secret. Also configurable via the BOXFUSE_SECRET environment variable or the Maven settings.xml
serverid boxfuse.serverid boxfuse The id of the server in the Maven settings.xml file to load the credentials from.

This is an alternative to passing the credentials in directly through properties.
payload.port boxfuse.payload.port autodetected The name of the port on which the payload starts (usually http or https)
payload.path boxfuse.payload.path / The path where the payload starts
cmd boxfuse.cmd first executable file in image

Generic Linux x64 apps only

The command to start the app including relative path and all necessary arguments
components boxfuse.components.NAME latest version Pins the component with this name onto this version.
Example: -components.tomcat=8.0.9
debug boxfuse.debug false Start the Payload in debug mode when an Instance launches
debug.wait boxfuse.debug.wait false

JVM apps only

Whether the JVM should wait for the remote debugger to connect (Only applicable when debug mode is active)
envvars boxfuse.envvars.NAME Fuses this environment variable into the image and make it available at runtime
Example: boxfuse.envvars.JDBC_URL=jdbc:mydburl
healthcheck boxfuse.healthcheck true Check whether to payload started correctly
healthcheck.port boxfuse.healthcheck.port autodetected The name of the port to check whether the payload started correctly (must be an https or http port, not tcp or udp). Example: admin-https
healthcheck.path boxfuse.healthcheck.path / The path to check whether to payload started correctly
healthcheck.timeout boxfuse.healthcheck.timeout 300 The number of seconds to wait for the Payload to come up
image boxfuse.image autodetected The image app name and version. By default this is autodetected based on the payload name. For example myapp-1.2.jar would trigger the creation of the image myapp:1.2. You can override this by explicitly setting this property to say my-other-app:333.
jvm.args boxfuse.jvm.args

JVM apps only

Extra arguments to pass to the JVM
jvm.jmx boxfuse.jvm.jmx false

JVM apps only

Enable the JMX remote management and profiling interface for the JVM
jvm.main.class boxfuse.jvm.main.class autodetected

JVM apps only

Main class to invoke on JVM startup
jvm.main.args boxfuse.jvm.main.args

JVM apps only

Arguments to pass to the main class
linux.args boxfuse.linux.args quiet

Experts only

The arguments to pass from the bootloader to the Linux kernel
live boxfuse.live false Enable live reloading of changes in dev for super fast round-trips. Note that images with live reloading cannot be pushed to the Boxfuse Vault.
newrelic.licensekey boxfuse.newrelic.licensekey Installs and configures the New Relic agents to monitor your instance.
payload boxfuse.payload build artifact The payload to use when fusing an image. This is useful when running the Boxfuse Maven plugin from the command-line or when multiple artifacts are produced and you want to use an artifact which is not the main one (an artifact using a classifier for example).
ports boxfuse.ports.NAME http=80

Exposes the port of the app with this name using this definition. Example: boxfuse.ports.jmx=8001

Supported formats:

80HTTP port 80, universally accessible
443HTTPS port 443, universally accessible
5555TCP port 5555, universally accessible
5555/httpsHTTPS port 5555, universally accessible
5555/httpHTTP port 5555, universally accessible
5555/tcpTCP port 5555, universally accessible
5555/udpUDP port 5555, universally accessible
5555/tcp:@TCP port 5555 only accessible from your own IP
5555/udp:@/20UDP port 5555 only accessible from the IPs in the CIDR /20 block of your own IP
5555/udp:1.2.3.4UDP port 5555 only accessible from 1.2.3.4
5555/http:1.2.3.4/31HTTP port 5555 only accessible from the IPs in the CIDR /31 block of 1.2.3.4
tmp boxfuse.tmp 1 The amount of temp space to allocate to /tmp in GB
vault boxfuse.vault false Immediately upload the new Image to the Boxfuse Vault

Sample Configuration

<configuration>
    <user>1234567890abcdef1234567890abcdef12345678</user>
    <secret>ABCDEFGHIJKL1234567abcdefghijklmnopqrstu</secret>
    <payload>hello-1.0.war</payload>
    <payload.port>https</payload.port>
    <payload.path>/app</payload.path>
    <cmd>-cmd=bin/myapp -with -my args</cmd>
    <components>
        <openjdk>8.25.40</openjdk>
        <tomcat>8.0.20</tomcat>
    </components>
    <debug>true</debug>
    <debug.wait>false</debug.wait>
    <envvars>
        <JDBC_URL>jdbc:mydburl</JDBC_URL>
        <MY_OTHER_VAR>abc</MY_OTHER_VAR>
    </envvars>
    <healthcheck>true</healthcheck>
    <healthcheck.port>https</healthcheck.port>
    <healthcheck.path>/health</healthcheck.path>
    <healthcheck.timeout>120</healthcheck.timeout>
    <image>my-other-app:333</image>
    <jvm.args>-DmycustomProp=abc</jvm.args>
    <jvm.jmx>true</jvm.jmx>
    <jvm.main.class>com.mycorp.MyApp</jvm.main.class>
    <jvm.main.args>-abc -def</jvm.main.args>
    <linux.args>quiet</linux.args>
    <live>true</live>
    <newrelic.licensekey>0123456789abcdef0123456789abcdef012345</newrelic.licensekey>
    <payload>my-app-1.2.jar</payload>
    <ports>
        <https>443</https>
        <http>80</http>
    </ports>
    <tmp>16</tmp>
    <vault>false</vault>
</configuration>

Dynamically defined properties

After you execute run, Boxfuse will automatically define the following Maven properties

Maven property Description
boxfuse.image The image that was used to launch the instances

ls