이 콘텐츠는 선택한 언어로 제공되지 않습니다.

4.2. SSH Containers


Abstract

Fabric allows you to install containers in a local network using SSH. Fabric installs the container from scratch and configures the container to join the Fabric cluster automatically.

Overview

An SSH container is just a Fabric container that is running on a remote host on your local network, where that host is accessible through the SSH protocol. This section describes some basic administration tasks for these SSH containers.

Prerequisites

The requirements for creating an SSH container on a remote host are:
  • Linux or UNIX operating system,
  • SSHD running on the target host and:
    • A valid account credentials, or
    • Configured public key authentication
  • Java 1.6 installed.
  • Curl installed.
  • GNU tar installed.
  • Telnet installed.

Creating an SSH container

Fabric provides the fabric:container-create-ssh console command, for creating SSH containers.
Given the host, myhost (accessible from the local network) with the SSH user account, myuser, and the password, mypassword, your could create an SSH container on myhost, using the following console command:
fabric:container-create-ssh --host myhost --user myuser --password mypassword myremotecontainername
Copy to Clipboard Toggle word wrap
If the myuser user on myhost has configured public key authentication for SSH, you can skip the password option:
fabric:container-create-ssh --host myhost --user myuser myremotecontainername
Copy to Clipboard Toggle word wrap
Where the preceding command uses the key located in ~/.ssh/id_rsa for authentication. If you need to use a different key, you can specify the key location explicitly with the --private-key option:
fabric:container-create-ssh --host myhost --user myuser --private-key ~/.ssh/fabric_pk myremotecontainername
Copy to Clipboard Toggle word wrap
The last command also supports the --pass-phrase option, in case your key requires a pass phrase.

Creating a Fabric server using SSH

Sometimes you do not have an existing fabric and you want to create one on a remote host. The starting point for any fabric is a Fabric server instance, which can act as a seed for the rest of the fabric. So, to enable you to create a new fabric on a remote host, the fabric:container-create-ssh supports the --ensemble-server option, which can be invoked to create a container which is a Fabric server. For example, the following container-create-ssh command creates a new fabric consisting of one Fabric server on the myhost host:
fabric:container-create-ssh --host myhost --user myuser --ensemble-server myremotecontainername
fabric:join myhost:2181
Copy to Clipboard Toggle word wrap
The fabric:join command joins the current container to the new fabric. This has the advantage that it is much easier to administer the new fabric using a container that is joined to the fabric, because the local container then gains access to the connection data stored in the Fabric registry.
Note
The argument to fabric:join is the ZooKeeper server port, Host:Port. The port number in this example, 2181, is the standard ZooKeeper port number in Fabric.
Note
After you enter the fabric:join command, you will be prompted to enter the ZooKeeper password for the fabric.

Managing remote SSH containers

Using JBoss Fuse console commands, you can stop, restart or delete (that is, uninstall) a remote container, as follows:
To stop an SSH container:
fabric:container-stop myremotecontainername
Copy to Clipboard Toggle word wrap
To restart an SSH container:
fabric:container-start myremotecontainername
Copy to Clipboard Toggle word wrap
To uninstall an SSH container:
fabric:container-delete myremotecontainername
Copy to Clipboard Toggle word wrap
Note that these commands are available only for containers created directly using the current fabric. They are not available for containers that were joined to the cluster manually.

References

For more details about the SSH container console commands, see the JBoss Fuse Console Reference.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat