Skip to content

Installing Ceph Nano

Guy Margalit edited this page Feb 13, 2019 · 8 revisions

Installing CEPH Nano

Refer to

Prerequisites

You should have docker installed.

Install CEPH nano in a docker (current version is v13.2.4 mimic)

Install cn:

Mac:

curl -L https://github.com/ceph/cn/releases/download/v2.2.0/cn-v2.2.0-darwin-amd64 -o cn && chmod +x cn

Linux:

curl -L https://github.com/ceph/cn/releases/download/v2.2.0/cn-v2.2.0-linux-amd64 -o cn && chmod +x cn

Perform the following script:

  1. Start a temporary CEPH nano cluster
  2. We need to expose the mgr dashboard port so we need to run a new container. 2.1. Save the temp cluster container to a new image. 2.2. Run a new container from that image with exposed port for the dashboard.
  3. Delete the temp cluster
./cn cluster start temp -d /tmp/ceph-nano-work-dir
docker commit ceph-nano-temp ceph-nano
./cn cluster purge temp --yes-i-am-sure
docker run -dt -p 8080:8080 --name ceph-nano ceph-nano

Enable the CEPH manager dashboard

Note: The 'enable dashboard' command will cause the container to stop, so need to start it after.

docker exec ceph-nano ceph mgr module enable dashboard
docker start ceph-nano
sleep 8 # let it start the services
docker exec ceph-nano ceph config set mgr mgr/dashboard/ssl false
docker exec ceph-nano ceph config set mgr mgr/dashboard/server_addr 0.0.0.0
docker exec ceph-nano ceph config set mgr mgr/dashboard/server_port 8080
docker exec ceph-nano ceph dashboard set-login-credentials nano nano

That's it, the dashboard is ready, open it and login with user 'nano' password 'nano'.

open "http://$(docker exec ceph-nano bash -c 'echo $EXPOSED_IP'):8080"

But note that the Object Gateway in the dashboard is not enabled yet, so continue to next section.

Enable RGW dashboard

docker exec ceph-nano ceph dashboard set-rgw-api-host 127.0.0.1
docker exec ceph-nano ceph dashboard set-rgw-api-port 8080
docker exec ceph-nano ceph dashboard set-rgw-api-scheme http
docker exec ceph-nano ceph dashboard set-rgw-api-user-id nano
docker exec ceph-nano radosgw-admin user create --uid=nano --display-name=nano --system
docker exec ceph-nano ceph dashboard set-rgw-api-access-key [[[from user create output]]]
docker exec ceph-nano ceph dashboard set-rgw-api-secret-key [[[from user create output]]]

docker exec ceph-nano sed -i 's/rgw frontends = civetweb .*/rgw frontends = civetweb  port=127.0.0.1:8080/' /etc/ceph/ceph.conf
docker stop ceph-nano
docker start ceph-nano
Clone this wiki locally