zoukankan      html  css  js  c++  java
  • 利用docker快速搭建ceph radosgw环境

    安装docker

    # step 1: 安装必要的一些系统工具
    sudo yum install -y yum-utils device-mapper-persistent-data lvm2
    # Step 2: 添加软件源信息
    sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
    # Step 3: 更新并安装 Docker-CE
    sudo yum makecache fast
    sudo yum -y install docker-ce
    # Step 4: 开启Docker服务
    sudo service docker start

    配置阿里云的镜像加速器

    sudo mkdir -p /etc/docker
    sudo tee /etc/docker/daemon.json <<-'EOF'
    {
      "registry-mirrors": ["56px195b.mirror.aliyuncs.com"]
    }
    EOF
    sudo systemctl daemon-reload
    sudo systemctl restart docker

    利用docker启动服务

    The environment variables MON_NAME and MON_IP are required:

    • MON_NAME is the name of the monitor (DEFAULT: hostname)
    • MON_IP is the IP address of the monitor (public)
    • RGW_NAME is the name of rados gateway instance (DEFAULT: hostname)
    • RGW_CIVETWEB_PORT is the port of the rados gateway (DEFAULT: 80)
    • CLUSTER is the name of the cluster (DEFAULT: ceph)
    • CEPH_PUBLIC_NETWORK is the network where the OSD should communicate
    • CEPH_DEMO_UIDCEPH_DEMO_ACCESS_KEYCEPH_DEMO_SECRET_KEY, and CEPH_DEMO_BUCKET can be used to auto-provision an account.
    docker run -d --name demo -e MON_IP=$IP -e CEPH_PUBLIC_NETWORK=$NETWORK --net=host -v /var/lib/ceph:/var/lib/ceph -v /etc/ceph:/etc/ceph ceph/demo demo

    检查状态

    # ceph -s
        cluster 6b05686e-7851-4619-8130-32ed5fb4e5fc
         health HEALTH_OK
         monmap e2: 1 mons at {10e131e69e15=172.28.8.15:6789/0}
                election epoch 4, quorum 0 10e131e69e15
          fsmap e5: 1/1/1 up {0=0=up:active}
            mgr active: 10e131e69e15 
         osdmap e13: 1 osds: 1 up, 1 in
                flags sortbitwise,require_jewel_osds,require_kraken_osds
          pgmap v16: 112 pgs, 7 pools, 3829 bytes data, 32 objects
                2398 MB used, 505 GB / 507 GB avail
                      96 active+clean
                      16 creating
  • 相关阅读:
    Grunt中批量无损压缩图片插件--Grunt-contrib-imagemin
    移动端前端题
    前端面试题,不解释...
    HTMLFormElement获取表单里面所有的值然后以json形式返回
    关于 CommonJS AMD CMD UMD 规范的差异总结
    mysql库安装
    安装mysql到ubuntu
    一个致命的操作
    vim编辑器常规配置
    samba的安装与配置
  • 原文地址:https://www.cnblogs.com/gushiren/p/9584895.html
Copyright © 2011-2022 走看看