Arquillian Cube Extension 1.0.0.Alpha3 Released

Since we wrote this post we didn't laze around. Check our latest announcement.

The Arquillian team is proud to announce the 1.0.0.Alpha3 release of the Arquillian Cube Extension component!

What’s included in the Alpha3 release?

New Containerless DeployableContainer

When we’ve previously been talking about Containers we have been referring to Containers where the application is deployed inside a container. For example in the case of a Tomcat application, resources are deployed inside a Servlet container or in case of Apache TomEE you can deploy EJBs inside an EJB container.

But nowadays there are applications that contains the container (if they have one) embedded inside them. Typically these applications uses an embedded server and they are run directly from the commandline. Some examples can be Spring Boot, Netty, SparkJava or Undertow.

Arquillian Cube now has a ContainerLess DeployableContainer that combined with Docker can ‘deploy’ any application. This is not restricted to only Java applications, but can just as well be a Node or Ruby on Rails app.
For more information and examples see the documentation

Infer exposedPorts from portBindings

To simplify the configuration, Arquillian Cube will now auto export all ports
defined in the portBindings option. No need to specify them twice. In the case where
you want to remap the ports or only expose some of them, you can still define that
using the exposedPorts option.

For more information see the documentation

Allow connecting to a running container

With the configuration option shouldAllowToConnectToRunningContainers you can bypass
the Create/Start Cube commands if the a Docker Container with the same name is already
running on the target system. If so, Cube will reuse that Container moving forward.

This allow you to prestart the containers manually during development and just
connect to them to avoid the extra cost of starting the Docker Containers for each test
run. This assumes you are not changing the actual definition of the Docker Container itself.

What is Arquillian Cube Extension?

With Arquillian Cube you can control the lifecycle of Docker images as part of the test lifecyle, either automatically or manually. This gives you the chance to scale up from a integration/functional test level all the way up to the system test level.

Release details

Component Arquillian Cube Extension
Version 1.0.0.Alpha3 view tag
Release date 2015-01-15
Released by Aslak Knutsen
Compiled against

Published artifacts org.arquillian.cube

Release notes and resolved issues 6

Bug
Enhancement

Thanks to the following list of contributors: Alex Soto, Aslak Knutsen, Karel Piwko

Arquillian Cube Extension 1.0.0.Alpha2 Released

Since we wrote this post we didn't laze around. Check our latest announcement.

The Arquillian team is proud to announce the 1.0.0.Alpha2 release of the Arquillian Cube Extension component!

What’s included in the Alpha2 release?

Configurable Polling sleep time

You can now configure the timeout for Cube to wait for a Docker container to start when using the polling await strategy using the following configuration:

await:
  strategy: polling
  sleepPollingTime: 200 s
  iterations: 3

See the documentation for more information

New port binding configuration parameters

In Alpha1 we used the following portBinding syntax:

portBindings:
  - exposedPort: 8089/tcp
    port: 8089
  - exposedPort: 8080/tcp
    port: 8080

We felt this was a bit verbose, so in Alpha2 we updated the syntax to:

portBindings: [8089->8089/tcp, 8080->8080/tcp]

If you have any questions, problems or request: please drop us a note on the community forums.

What is Arquillian Cube Extension?

With Arquillian Cube you can control the lifecycle of Docker images as part of the test lifecyle, either automatically or manually. This gives you the chance to scale up from a integration/functional test level all the way up to the system test level.

Release details

Component Arquillian Cube Extension
Version 1.0.0.Alpha2 view tag
Release date 2014-12-10
Released by Aslak Knutsen
Compiled against

Published artifacts org.arquillian.cube

Release notes and resolved issues 4

Enhancement
Bug

Thanks to the following list of contributors: Alex Soto, Aslak Knutsen

Arquillian Cube Extension 1.0.0.Alpha1 Released

Since we wrote this post we didn't laze around. Check our latest announcement.

The Arquillian team is proud to announce the 1.0.0.Alpha1 release of the Arquillian Cube Extension component!

Have a little control freak inside? Need to control it all?

Resistance is futile, all bugs will be assimilated!

What is Arquillian Cube?

With Arquillian Cube you can control the lifecycle of Docker images as part of the test lifecyle, either automatically or manually.

This gives you the chance to scale up from a integration/functional test level all the way up to the system test level.

It’s was named Cube simply because:

  • Docker is like a cube
  • The Borg starship is named a cube and because we are moving tests close to production we can say that “resistance is futile, all bugs will be assimilated”.

How does it work?

Arquillian Cube communicates with the Docker server via its remote REST API. You can build/create/start/stop/remove Docker instances with all the normal Docker features you’re used to.

Arquillian Cube Docker currently require the Docker server to run with TCP communication enabled. Read the preliminaries for detail information on how to set it up. Unix Socket support will be added in a later version.

What’s included in the Alpha1 release?

Pulling images from custom repository
Extendable configuration
Building images as part of test lifecycle
Integration with Arquillian Container

Details

Pulling images

By default, when you refer to a Docker image by it’s id, Cube will use the official registry.hub.docker.com registry to look for images.

If you’re running your own Docker registry, either locally or remote, you can reconfigure Cube to use that one instead via the dockerRegistry configuration option.

<extension qualifier="docker">
    <property name="dockerRegistry">http://my-internal-registry.company.com</property>
</extension>

Cube Configuration

You can configure the individual Cubes in two different ways.

Either you can include a yaml snippet in the arquillian.xml configuration element dockerContainers;

<extension qualifier="docker">
    <property name="dockerContainers">
       tomcat:
         image: tutum/tomcat:7.0
         exposedPorts: [8089/tcp]
       portBindings:
         - exposedPort: 8089/tcp
           port: 8089
    </property>
</extension>

Or you can refer to an external file via dockerContainersFile.

<extension qualifier="docker">
    <property name="dockerContainersFile">src/test/resources/cubes.yaml</property>
</extension>
tomcat:
   image: tutum/tomcat:7.0
   exposedPorts: [8089/tcp]
portBindings:
   - exposedPort: 8089/tcp
     port: 8089

For a more complete overview of the configuration options please refer to the documentation.

Building images

If you would like to build an Docker image as part of the test as oppose to just consume a preexisting one you can refer to a directory with a DockerFile directly in the Cube configuration.

tomcat:
   buildImage:
     dockerfileLocation: src/test/resources/tomcat
     noCache: true
     remove: true
   exposedPorts: [8089/tcp]
portBindings:
   - exposedPort: 8089/tcp
     port: 8089

For more information on building please refer to the documentation.

Arquillian Container

Not only can you control the Docker images, Cube also integrates nicely with the normal Arquillian Remote Containers.

When a Arquillian Container has the same qualifier as a Docker image, Cube will assume that the Docker image contains the Container and control the Image in the same lifecycle as the Container it self. Starting it before BeforeStart and stopping it after AfterStop.

There are two potential problem areas when using Arquillian Remote Containers with Docker images;

Docker by default boot up images on ‘random’ IP addresses and the Container it self might be bound to 127.0.0.1 inside the Docker container and skew any management API responses that will effect it’s ability to do deployments, in-container testing and URL injection.

Arquillian Cube address these issues by automatically remapping and updating the Container configuration and the metadata returned by the Container. In the end, all you need to do is define the Docker image and the Arquillian Container with the same name and place the Remote adapter on classpath.

<extension qualifier="docker">
    <property name="dockerContainers">
       tomcat:
         image: tutum/tomcat:7.0
         exposedPorts: [8089/tcp]
       portBindings:
         - exposedPort: 8089/tcp
           port: 8089
    </property>
</extension>

<container qualifier="tomcat">
</container>

Documentation

For more information on how this all work, what you can configure etc please see the complete documentation

What’s coming next?

Next up for Cube is OpenShift 3/Kubernetes support. This should allow you to control images deployed on OpenShift Origin and not just via the normal Docker Server. Using the same implementation we hope to support Google Cloud Engine as well.

If you have any questions, problems or request: please drop us a note on the community forums.

What is Arquillian Cube Extension?

With Arquillian Cube you can control the lifecycle of Docker images as part of the test lifecyle, either automatically or manually. This gives you the chance to scale up from a integration/functional test level all the way up to the system test level.

Release details

Component Arquillian Cube Extension
Version 1.0.0.Alpha1 view tag
Release date 2014-11-15
Released by Aslak Knutsen
Compiled against

Published artifacts org.arquillian.cube

Release notes and resolved issues 21

Enhancement
Bug

Thanks to the following list of contributors: Alex Soto, Aslak Knutsen, Stefan Miklosovic