> 文章列表 > Ceph入门到精通-cephadm bootstrap命令大全

Ceph入门到精通-cephadm bootstrap命令大全

Ceph入门到精通-cephadm bootstrap命令大全

  • 默认情况下,Ceph 守护进程将其日志输出发送到 stdout/stderr,后者被选中 由容器运行时(Docker或Podman)启动,并(在大多数系统上)发送到 日记。如果您希望 Ceph 将传统日志文件写入 , 在引导期间使用该选项/var/log/ceph/$fsid--log-to-file

  • 较大的 Ceph 集群在以下情况下性能更好(Ceph 集群外部) 公有网络流量与(Ceph 集群内部)分离 群集流量。内部群集流量处理复制、恢复、 以及 OSD 守护程序之间的检测信号。您可以定义集群 网络,通过向子命令提供选项。此参数必须以 CIDR 表示法定义子网(例如或 )。--cluster-networkbootstrap10.90.90.0/24fe80::/64

  • cephadm bootstrap写入访问所需的文件 新群集。这个中心位置使 Ceph 成为可能 主机上安装的软件包(例如,允许访问 cephadm 命令行界面)来查找这些文件。/etc/ceph

    但是,使用 cephadm 部署的守护程序容器根本不需要。使用选项 将它们放在其他目录中(例如,)。这可能会有所帮助 避免与现有 Ceph 配置(cephadm 或 否则)在同一主机上。/etc/ceph--output-dir *<directory>*.

  • 您可以将任何初始 Ceph 配置选项传递给新的 通过将它们放在标准的 ini 样式配置文件中进行群集 并使用该选项。例如:--config *<config-file>*

    $ cat <<EOF > initial-ceph.conf
    [global]
    osd crush chooseleaf type = 0
    EOF
    $ ./cephadm bootstrap --config initial-ceph.conf ...
    

  • 该选项可以选择哪个SSH 用户 Cephadm 将用于连接到主机。关联的 SSH 密钥将是 添加到 。您的用户 使用此选项指定必须具有无密码 sudo 访问权限。--ssh-user *<user>*/home/*<user>*/.ssh/authorized_keys

  • 如果在经过身份验证的注册表上使用容器,则需要 登录时,您可以添加参数:

    • --registry-json <path to json file>

    包含登录信息的 JSON 文件的示例内容:

    {"url":"REGISTRY_URL", "username":"REGISTRY_USERNAME", "password":"REGISTRY_PASSWORD"}
    

    Cephadm 将尝试登录到此注册表,以便它可以拉取您的容器 ,然后将登录信息存储在其配置数据库中。其他主机已添加到 然后,群集还将能够使用经过身份验证的注册表。

`

[root@ceph01 ~]# cephadm bootstrap -h                                                                                                       
usage: cephadm bootstrap [-h] [--config CONFIG] [--mon-id MON_ID]                                                                           [--mon-addrv MON_ADDRV | --mon-ip MON_IP]                                                                          [--mgr-id MGR_ID] [--fsid FSID]                                                                                    [--output-dir OUTPUT_DIR]                                                                                          [--output-keyring OUTPUT_KEYRING]                                                                                  [--output-config OUTPUT_CONFIG]                                                                                    [--output-pub-ssh-key OUTPUT_PUB_SSH_KEY]                                                                          [--skip-admin-label] [--skip-ssh]                                                                                  [--initial-dashboard-user INITIAL_DASHBOARD_USER]                                                                  [--initial-dashboard-password INITIAL_DASHBOARD_PASSWORD]                                                          [--ssl-dashboard-port SSL_DASHBOARD_PORT]                                                                          [--dashboard-key DASHBOARD_KEY]                                                                                    [--dashboard-crt DASHBOARD_CRT]                                                                                    [--ssh-config SSH_CONFIG]                                                                                          [--ssh-private-key SSH_PRIVATE_KEY]                                                                                [--ssh-public-key SSH_PUBLIC_KEY]                                                                                  [--ssh-user SSH_USER] [--skip-mon-network]                                                                         [--skip-dashboard] [--dashboard-password-noupdate]                                                                 [--no-minimize-config] [--skip-ping-check]                                                                         [--skip-pull] [--skip-firewalld] [--allow-overwrite]                                                               [--allow-fqdn-hostname] [--allow-mismatched-release]                                                               [--skip-prepare-host] [--orphan-initial-daemons]                                                                   [--skip-monitoring-stack]                                                                                          [--with-centralized-logging]                                                                                       [--apply-spec APPLY_SPEC]                                                                                          [--shared_ceph_folder CEPH_SOURCE_FOLDER]                                                                          [--registry-url REGISTRY_URL]                                                                                      [--registry-username REGISTRY_USERNAME]                                                                            [--registry-password REGISTRY_PASSWORD]                                                                            [--registry-json REGISTRY_JSON]                                                                                    [--cluster-network CLUSTER_NETWORK]                                                                                [--single-host-defaults] [--log-to-file]                                                                           optional arguments:                                                                                                                         -h, --help            show this help message and exit                                                                                     --config CONFIG, -c CONFIG                                                                                                                ceph conf file to incorporate                                                                                       --mon-id MON_ID       mon id (default: local hostname)                                                                                    --mon-addrv MON_ADDRV                                                                                                                     mon IPs (e.g.,                                                                                                      [v2:localipaddr:3300,v1:localipaddr:6789])                                                                          --mon-ip MON_IP       mon IP                                                                                                              --mgr-id MGR_ID       mgr id (default: randomly generated)                                                                                --fsid FSID           cluster FSID                                                                                                        --output-dir OUTPUT_DIR                                                                                                                   directory to write config, keyring, and pub key files                                                               --output-keyring OUTPUT_KEYRING                                                                                                           location to write keyring file with new cluster admin                                                               and mon keys                                                                                                        --output-config OUTPUT_CONFIG                                                                                                             location to write conf file to connect to new cluster                                                               --output-pub-ssh-key OUTPUT_PUB_SSH_KEY                                                                                                   location to write the cluster's public SSH key                                                                      --skip-admin-label    do not create admin label for ceph.conf and                                                                         client.admin keyring distribution                                                                                   --skip-ssh            skip setup of ssh key on local host                                                                                 --initial-dashboard-user INITIAL_DASHBOARD_USER                                                                                           Initial user for the dashboard                                                                                      --initial-dashboard-password INITIAL_DASHBOARD_PASSWORD                                                                                   Initial password for the initial dashboard user                                                                     --ssl-dashboard-port SSL_DASHBOARD_PORT                                                                                                   Port number used to connect with dashboard using SSL                                                                --dashboard-key DASHBOARD_KEY                                                                                                             Dashboard key                                                                                                       --dashboard-crt DASHBOARD_CRT                                                                                                             Dashboard certificate                                                                                               --ssh-config SSH_CONFIG                                                                                                                   SSH config                                                                                                          --ssh-private-key SSH_PRIVATE_KEY                                                                                                         SSH private key                                                                                                     --ssh-public-key SSH_PUBLIC_KEY                                                                                                           SSH public key                                                                                                      --ssh-user SSH_USER   set user for SSHing to cluster hosts, passwordless                                                                  sudo will be needed for non-root users                                                                              --skip-mon-network    set mon public_network based on bootstrap mon ip                                                                    --skip-dashboard      do not enable the Ceph Dashboard                                                                                    --dashboard-password-noupdate                                                                                                             stop forced dashboard password change                                                                               --no-minimize-config  do not assimilate and minimize the config file                                                                      --skip-ping-check     do not verify that mon IP is pingable                                                                               --skip-pull           do not pull the default image before bootstrapping                                                                  --skip-firewalld      Do not configure firewalld                                                                                          --allow-overwrite     allow overwrite of existing --output-*                                                                              config/keyring/ssh files                                                                                            --allow-fqdn-hostname                                                                                                                     allow hostname that is fully-qualified (contains ".")                                                               --allow-mismatched-release                                                                                                                allow bootstrap of ceph that doesn't match this                                                                     version of cephadm                                                                                                  --skip-prepare-host   Do not prepare host                                                                                                 --orphan-initial-daemons                                                                                                                  Set mon and mgr service to `unmanaged`, Do not create                                                               the crash service                                                                                                   --skip-monitoring-stack                                                                                                                   Do not automatically provision monitoring stack                                                                     (prometheus, grafana, alertmanager, node-exporter)                                                                  --with-centralized-logging                                                                                                                Automatically provision centralized logging (promtail,                                                              loki)                                                                                                               --apply-spec APPLY_SPEC                                                                                                                   Apply cluster spec after bootstrap (copy ssh key, add                                                               hosts and apply services)                                                                                           --shared_ceph_folder CEPH_SOURCE_FOLDER                                                                                                   Development mode. Several folders in containers are                                                                 volumes mapped to different sub-folders in the ceph                                                                 source folder                                                                                                       --registry-url REGISTRY_URL                                                                                                               url for custom registry                                                                                             --registry-username REGISTRY_USERNAME                                                                                                     username for custom registry                                                                                        --registry-password REGISTRY_PASSWORD                                                                                                     password for custom registry                                                                                        --registry-json REGISTRY_JSON                                                                                                             json file with custom registry login info (URL,                                                                     Username, Password)                                                                                                 --cluster-network CLUSTER_NETWORK                                                                                                         subnet to use for cluster replication, recovery and                                                                 heartbeats (in CIDR notation network/mask)                                                                          --single-host-defaults                                                                                                                    adjust configuration defaults to suit a single-host                                                                 cluster                                                                                                             --log-to-file         configure cluster to log to traditional log files in                                                                /var/log/ceph/$fsid