ubuntu 上安装ceph object radosgw.docx_第1页
ubuntu 上安装ceph object radosgw.docx_第2页
ubuntu 上安装ceph object radosgw.docx_第3页
ubuntu 上安装ceph object radosgw.docx_第4页
ubuntu 上安装ceph object radosgw.docx_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

ubuntu 上安装ceph object radosgw1、首先ubuntu服务器需要能够上网否则系统yum源不可用。步骤如下:安装apache2 fastcgi radosgw sudo apt-get -y install apache2 libapache2-mod-fastcgi radosgw openssl ssl-cert1、修改apache2配置文件 #vi /etc/apache2/apache2.conf 在最后一行上添加对象存储服务器的名称:ServerName hostname2、加载模块#sudo a2enmod proxy_fcgi#sudo a2enmodrewrite#sudo a2enmond ssl3、启动apache服务#sudo service apache2 start如果提示错误:Could not reliably determine the servers fully qualified domain name 是因为/etc/apache2/apache2.conf 下的ServerName没有配置4、创建ssl密钥#sudo mkdir /etc/apache2/ssl#sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt重启 apche:sudo service apache2 restartConfigure The Gateway 配置网关Create a User and Keyring1.Create a keyring for the gateway:sudo ceph-authtool -create-keyring /etc/ceph/ceph.client.radosgw.keyringsudo chmod +r /etc/ceph/ceph.client.radosgw.keyring2.Generate a Ceph Object Gateway user name and key for each instance. For exemplary purposes, we will use the name gateway after client.radosgw:sudo ceph-authtool /etc/ceph/ceph.client.radosgw.keyring -n client.radosgw.gateway -gen-key3.Add capabilities to the key. See Configuration Reference - Pools for details on the effect of write permissions for the monitor and creating pools.sudo ceph-authtool -n client.radosgw.gateway -cap osd allow rwx -cap mon allow rwx /etc/ceph/ceph.client.radosgw.keyring4.Once you have created a keyring and key to enable the Ceph Object Gateway with access to the Ceph Storage Cluster, add the key to your Ceph Storage Cluster. For example:sudo ceph -k /etc/ceph/ceph.client.admin.keyring auth add client.radosgw.gateway -i /etc/ceph/ceph.client.radosgw.keyring5.Distribute the keyring to the node with the gateway instance.sudo scp /etc/ceph/ceph.client.radosgw.keyring cephhostname:/etc/ceph/Create PoolsCeph Object Gateways require Ceph Storage Cluster pools to store specific gateway data. If the user you created has permissions, the gateway will create the pools automatically. However, you should ensure that you have set an appropriate default number of placement groups per pool into your Ceph configuration file.NoteCeph Object Gateways have multiple pools, so dont make the number of PGs too high considering all of the pools assigned to the same CRUSH hierarchy, or performance may suffer.When configuring a gateway with the default region and zone, the naming convention for pools typically omits region and zone naming, but you can use any naming convention you prefer. For example: .rgw.rgw.root.rgw.control.rgw.gc.rgw.buckets.rgw.buckets.index.users.log.users.email.users.swift.users.uidceph osd pool create .rgw 32 32ceph osd pool create .rgw.root 32 32ceph osd pool create .rgw.control 32 32ceph osd pool create .rgw.gc 32 32ceph osd pool create .rgw.buckets 32 32ceph osd pool create .rgw.buckets.index 32 32 ceph osd pool create .users 32 32ceph osd pool create .log 32 32ceph osd pool create .users.email 32 32ceph osd pool create .users.swift 32 32 ceph osd pool create .users.uid 32 32Add a Gateway Configuration to CephFor distros with Apache 2.2 and early versions of Apache 2.4 (RHEL 6, Ubuntu 12.04, 14.04 etc), append the following configuration to /etc/ceph/ceph.conf in your admin node:client.radosgw.gatewayhost = hostnamekeyring = /etc/ceph/ceph.client.radosgw.keyringrgw socket path = log file = /var/log/radosgw/client.radosgw.gateway.logrgw frontends = fastcgi socket_port=9000 socket_host=rgw print continue = falsePush the updated ceph.conf file from the admin node to all other nodes in the cluster including the gateway host:ceph-deploy -overwrite-conf config push HOST HOST.Copy ceph.client.admin.keyring from admin node to gateway hostAs the gateway host can be a different node that is not part of the cluster, the ceph.client.admin.keyring needs to be copied from the admin node to the gateway host. To do so, execute the following on admin node:sudo scp /etc/ceph/ceph.client.admin.keyring roothostname:/etc/ceph/Create Data DirectoryDeployment scripts may not create the default Ceph Object Gateway data directory. Create data directories for each instance of a radosgw daemon (if you havent done so already). The host variables in the Ceph configuration file determine which host runs each instance of a radosgw daemon. The typical form specifies the radosgw daemon, the cluster name and the daemon ID.To create the directory on the gateway host, execute the following:sudo mkdir -p /var/lib/ceph/radosgw/ceph-radosgw.gatewaysudo touch /var/log/radosgw/client.radosgw.gateway.logStart radosgw serviceThe Ceph Object gateway daemon needs to be started. To do so, execute the following on the gateway host:On Debian-based distros:radosgw -c /etc/ceph/ceph.conf -n client.radosgw.gateway Create a Gateway Configuration fileOn the host where you installed the Ceph Object Gateway i.e, gateway host, create an rgw.conf file. Place the file in /etc/apache2/site-available directory for Debian-based distros and in /etc/httpd/conf.d directory for RPM-based distros. It is a Apache configuration file which is needed for the radosgw service. This file must be readable by the web server.Execute the following steps:1. Create the file:For Debian-based distros, execute:sudo vi /etc/apache2/site-available/rgw.confServerName localhostDocumentRoot /var/www/htmlErrorLog /var/log/apache2/rgw_error.logCustomLog /var/log/apache2/rgw_access.log combined# LogLevel debugRewriteEngine OnRewriteRule .* - E=HTTP_AUTHORIZATION:%HTTP:Authorization,LSetEnv proxy-nokeepalive 1ProxyPass / fcgi:/localhost:9000/禁用默认站点启用rgw站点sudo a2dissite 000-default.confSudo a2ensite rgw.conf重启apache2服务service apache2 restartCreate a radosgw user for S3 accessA radosgw user needs to be created and granted access. The command man radosgw-admin will provide information on additional command options.To create the user, execute the following on the gateway host:sudo radosgw-admin user create -uid=testuser -display-name=First UserTest S3 accessYou need to write and run a Python test script for verifying S3 access. The S3 access test script will connect to the radosgw, create a new bucket and list all buckets. The values for aws_access_key_id and aws_secret_access_key are taken from the values of access_key and secret_key returned by the radosgw_admin command.Execute the following steps:1. You will

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论