Title: Aries Containers # Aries Containers Aries Containers is an Apache Aries subproject to manage container deployments, such as docker-based microservices, from a Java API. Many technologies exist to manage container deployments. Examples include Kubernetes, Marathon/Mesos, Docker Swarm, Amazon ECS and others. While each technology provides specific features, many of these management technologies share common behaviour. Aries Containers provides an abstraction that allows users to easily switch between these technologies. Benefits: - Requirements change - container deployers may find that they need to change target platforms at short notice. Using an abstraction API helps making such changes without too much additional work. - Testing - many container management systems require cluster of machines or otherwise large setup which may make testing during development difficult. Aries Containers also contains a `docker.local` binding which makes it possible to run the same code with using a local docker installation on the developer's machine. Current Aries Containers modules: - `containers-api` - the API implemented by the various bindings. - `containers-docker-local` - Binding that uses the local docker installation. - `containers-marathon` - Marathon binding. - `containers-parent` - Parent pom. - `containers-examples` - Examples. - ... This project could influence the design process of the [OSGi RFP 179][1]. # Source The Aries RSA source is in a separate [git repository aries-containers][2] there is also a [mirror on github][3]. To build the source, just run: `mvn install` Java 1.8 or higher is required. Maven 3.3.9+ is recommended. # Quick Start The easiest way to get started is with the examples and the local docker binding. Aries Containers work well in an OSGi environment where bindings are provided as OSGi services. As an alternative, Aries Containers can also be used in a plain Java environment. Instead of obtaining the bindings from the service registry, they need to be instantiated directly in this case. ## OSGi example The OSGi example uses the Felix SCR implementation to get the currently active ServiceManager injected into a simple servlet. The servlet provides a simple UI to perform some of the management operations. The servlet is written using OSGi Declarative Service annotations and OSGi Http Whiteboard annotations and can be found here: [ServiceManagerServlet.java][4] Main functionality of the servlet can be summarized as follows: @Component(service = Servlet.class, property = {HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN + "=/manager"}) public class ServiceManagerServlet extends HttpServlet { @Reference ServiceManager serviceManager; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { PrintWriter pw = resp.getWriter(); pw.println("

Service Deployments

"); pw.println("