4.3. Cockpit Ceph Installer のインストールおよび設定
Cockpit Ceph Installer を使用して Red Hat Ceph Storage クラスターをインストールする前に、Cockpit Ceph Installer を Ansible 管理ノードにインストールする必要があります。
前提条件
- Ansible 管理ノードへのルートレベルのアクセス。
-
Ansible アプリケーションで使用する
ansible
ユーザーアカウント。
手順
Cockpit がインストールされていることを確認します。
$ rpm -q cockpit
以下に例を示します。
[admin@jb-ceph4-admin ~]$ rpm -q cockpit cockpit-196.3-1.el8.x86_64
上記の例と同様の出力が表示された場合は、確認用 Cockpit が実行している ステップに進みます。出力が
package cockpit is not installed
されていない場合は、Install Cockpit のステップに進みます。必要に応じて Cockpit をインストールします。
Red Hat Enterprise Linux 8 の場合:
# dnf install cockpit
Red Hat Enterprise Linux 7 の場合:
# yum install cockpit
Cockpit が実行中であることを確認します。
# systemctl status cockpit.socket
出力に
Active: active (listening)
が表示されている場合は、Red Hat Ceph Storage 用の Cockpit プラグインのインストール 手順に進みます。代わりにActive: inactive(dead)
と表示される場合には、Cockpit の有効化 手順に進んでください。必要に応じて、Cockpit を有効にします。
systemctl
コマンドを使用して、Cockpit を有効にします。# systemctl enable --now cockpit.socket
以下のような行が表示されます。
Created symlink /etc/systemd/system/sockets.target.wants/cockpit.socket
/usr/lib/systemd/system/cockpit.socket. Cockpit が実行中であることを確認します。
# systemctl status cockpit.socket
以下のような行が表示されます。
Active: active (listening) since Tue 2020-01-07 18:49:07 EST; 7min ago
Red Hat Ceph Storage 用の Cockpit Ceph Installer をインストールします。
Red Hat Enterprise Linux 8 の場合:
# dnf install cockpit-ceph-installer
Red Hat Enterprise Linux 7 の場合:
# yum install cockpit-ceph-installer
Ansible ユーザーとして、sudo を使用してコンテナーカタログにログインします。
注記デフォルトでは、Cockpit Ceph Installer は
root
ユーザーを使用して Ceph をインストールします。Ceph をインストールするための前提条件の一部として作成した Ansible ユーザーを使用するには、この手順の残りのコマンドを実行し、sudo
を Ansible ユーザーとして実行します。Red Hat Enterprise Linux 7
$ sudo docker login -u CUSTOMER_PORTAL_USERNAME https://registry.redhat.io
例
[admin@jb-ceph4-admin ~]$ sudo docker login -u myusername https://registry.redhat.io Password: Login Succeeded!
Red Hat Enterprise Linux 8
$ sudo podman login -u CUSTOMER_PORTAL_USERNAME https://registry.redhat.io
例
[admin@jb-ceph4-admin ~]$ sudo podman login -u myusername https://registry.redhat.io Password: Login Succeeded!
registry.redhat.io
がコンテナーレジストリーの検索パスにあることを確認します。編集するために、
/etc/containers/registries.conf
ファイルを開きます。[registries.search] registries = [ 'registry.access.redhat.com', 'registry.fedoraproject.org', 'registry.centos.org', 'docker.io']
registry.redhat.io
がファイルに含まれていない場合は、これを追加します。[registries.search] registries = ['registry.redhat.io', 'registry.access.redhat.com', 'registry.fedoraproject.org', 'registry.centos.org', 'docker.io']
Ansible ユーザーとして、sudo を使用して
ansible-runner-service
を起動します。$ sudo ansible-runner-service.sh -s
例
[admin@jb-ceph4-admin ~]$ sudo ansible-runner-service.sh -s Checking environment is ready Checking/creating directories Checking SSL certificate configuration Generating RSA private key, 4096 bit long modulus (2 primes) ..................................................................................................................................................................................................................................++++ ......................................................++++ e is 65537 (0x010001) Generating RSA private key, 4096 bit long modulus (2 primes) ........................................++++ ..............................................................................................................................................................................++++ e is 65537 (0x010001) writing RSA key Signature ok subject=C = US, ST = North Carolina, L = Raleigh, O = Red Hat, OU = RunnerServer, CN = jb-ceph4-admin Getting CA Private Key Generating RSA private key, 4096 bit long modulus (2 primes) .....................................................................................................++++ ..++++ e is 65537 (0x010001) writing RSA key Signature ok subject=C = US, ST = North Carolina, L = Raleigh, O = Red Hat, OU = RunnerClient, CN = jb-ceph4-admin Getting CA Private Key Setting ownership of the certs to your user account(admin) Setting target user for ansible connections to admin Applying SELINUX container_file_t context to '/etc/ansible-runner-service' Applying SELINUX container_file_t context to '/usr/share/ceph-ansible' Ansible API (runner-service) container set to rhceph/ansible-runner-rhel8:latest Fetching Ansible API container (runner-service). Please wait... Trying to pull registry.redhat.io/rhceph/ansible-runner-rhel8:latest...Getting image source signatures Copying blob c585fd5093c6 done Copying blob 217d30c36265 done Copying blob e61d8721e62e done Copying config b96067ea93 done Writing manifest to image destination Storing signatures b96067ea93c8d6769eaea86854617c63c61ea10c4ff01ecf71d488d5727cb577 Starting Ansible API container (runner-service) Started runner-service container Waiting for Ansible API container (runner-service) to respond The Ansible API container (runner-service) is available and responding to requests Login to the cockpit UI at https://jb-ceph4-admin:9090/cockpit-ceph-installer to start the install
出力の最後の行には、Cockpit Ceph Installer の URL が含まれます。上記の例では、URL は
https://jb-ceph4-admin:9090/cockpit-ceph-installer
です。お使いの環境で出力される URL を書き留めておきます。