Chapter 3. Creating a Container


Abstract

There are several ways to create a new container. The way in which you create the container depends on where the container will be located and the features you want the container to do.
When you add a container to a fabric, you are given the option to create one of the following container types:
  • child container—a container that is collocated with a parent container
    Note
    Child containers require less application code to be downloaded to the host machine. The child container uses the same container binary as its parent container.
  • remote root container—a container located on a remote host that is capable of spawning child containers
    Important
    Creating a root container requires that the host machine have ssh enabled.
  • cloud-managed Fuse container—a root container that is hosted on a cloud infrastructure
    Note
    The management console uses the jCloud library to access the cloud infrastructure.
You must also decide if the new container is going to be a registry server for the fabric.
Important
Registry servers should not be placed in child containers and should not host any other services such as a message broker or business application.

3.1. Creating a Child Container

Abstract

A child container is created using the infrastructure put in place by a root container and is collocated with its parent container.

Overview

If you have a Fuse container deployed onto a remote host you can use that container to create more containers on the host. This saves you from needing to use ssh. It also minimizes the amount of code needed to be downloaded over the network.
The child container uses the same binaries and root folder as the parent container. The child's data is stored in a separate data folder from the root container and the other child containers spawned by the root container. While the child container uses the same underlying binary files as the root container, it runs in its own JVM.
The only limitations on a child container are:
  • it cannot be used to spawn other child containers
  • it is deleted along with its parent container

Procedure

To create a child container:
  1. Select Containers from the main menu.
    The Containers page opens.
  2. Click Create Fuse Container.
    The Create Fuse Container page opens.
  3. In the Name field, enter a name for the new container.
  4. If you want to make the new container a registry server check Make container a distributed registry server.
    Important
    It is not advisable to make a child container a registry server. Registry servers should be run on separate hosts from other containers to maintain the integrity of the fabric.
  5. If you want to pass any special flags to the container's JVM:
    1. Check JVM Options.
    2. Enter the options to pass to the JVM in the field next to the check box.
  6. If you need to use a Maven proxy to access the repository containing your Fuse artifacts, check the Maven Proxy URL field and enter the URL for your Maven proxy.
  7. If you want to create multiple instances of the container, enter a number greater than one in the Count field.
    When you create multiple containers the container's number is appended to the value specified in the Name field.
  8. Select how the container will report its IP address to other containers from the options in the Resolver drop-down list.
    The options are:
    Local Hostname
    When a requests for the container's location are made, the container's local hostname is returned.
    Local IP
    When a requests for the container's location are made, the container's local IP address is returned.
    Public Hostname
    When a requests for the container's location are made, the container's public hostname address is returned.
    Public IP
    When a requests for the container's location are made, the container's public IP address is returned.
  9. Click Next.
    The Select profiles to install on the container page opens.
  10. Select the version of profiles you want to use for provisioning the container.
    The value of this drop down defaults to the value set on the Profiles page.
  11. Select one or more profiles to deploy to the container.
  12. Click Next.
    The Select the type of container page opens.
  13. Select Child container.
  14. Click Next.
    The Select a parent for the child container page opens.
  15. Select the root container that will be the parent for the new container.
  16. Click Finish.
    The wizard closes and the new container will appear in the list of containers. Initially the Active indicator may be red, but should turn green shortly after adding it. The Provisioned indicator may also show gray bars, but should turn green when the specified profiles are fully provisioned.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.