在Ceph上配置Alluxio

    该指南介绍如何配置Alluxio以使用Ceph作为底层文件系统。Alluxio使用Rados Gateway 支持两种不同的客户端API连接:

    首先,在你的机器上必须安装Alluxio二进制包。你可以自己,或者下载二进制包

    为了配置Alluxio以使用底层文件系统,需要修改文件。如果该文件不存在,根据模板创建配置文件。

    conf/alluxio-env.sh文件添加以下代码:

    1. alluxio.master.mount.table.root.ufs=s3://<bucket>/<folder>
    2. aws.accessKeyId=<access-key>
    3. aws.secretKey=<secret-key>
    4. alluxio.underfs.s3.endpoint=http://<rgw-hostname>:<rgw-port>
    5. alluxio.underfs.s3.disable.dns.buckets=true

    方法2: Swift接口

    conf/alluxio-env.sh文件添加以下代码:

    其中,<swift-container>是一个已经存在的Swift容器。

    以下的配置需要配置在conf/alluxio-site.properties

    1. fs.swift.user=<swift-user>
    2. fs.swift.tenant=<swift-tenant>
    3. fs.swift.password=<swift-user-password>
    4. fs.swift.auth.url=<swift-auth-url>
    5. fs.swift.auth.method=<swift-auth-model>

    可能的值为truefalse。如果使用本地的Ceph RGW认证,指定<swift-auth-model>swiftauth。指定 <swift-auth-url>http://<rgw-hostname>:8090/auth/1.0

    该命令应当会启动一个Alluxio master和一个Alluxio worker,可以在浏览器中访问http://localhost:19999查看master Web UI。

    接着,你可以运行一个简单的示例程序:

    1. ./bin/alluxio runTests

    运行成功后,访问你的bucket/container目录,确认其中包含了由Alluxio创建的文件和目录。

    如果使用S3连接器,创建的文件名称应像下面这样:

      如果Alluxio安全认证被启用,Alluxio将会遵循底层Ceph对象存储的访问权限控制,根据使用的接口,参考 或者Swift Access Control获得更多信息。