-
Notifications
You must be signed in to change notification settings - Fork 80
Installing Ceph Nano
Guy Margalit edited this page Feb 13, 2019
·
8 revisions
- CEPH nano: https://github.com/ceph/cn
- CEPH dashboard: http://docs.ceph.com/docs/mimic/mgr/dashboard/
You should have docker
installed.
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:
- Start a temporary CEPH nano cluster
- 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.
- Delete the temp cluster
./cn cluster start temp -d /tmp
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
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 http://127.0.0.1:8080 and login with user 'nano' password 'nano'.
But note that the Object Gateway in the dashboard is not enabled yet, so continue to next section.
docker exec ceph-nano ceph dashboard set-rgw-api-host 127.0.0.1
docker exec ceph-nano ceph dashboard set-rgw-api-port 8000
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=0.0.0.0:8080/' /etc/ceph/ceph.conf
docker stop ceph-nano
docker start ceph-nano
You should see something like this:
[root@8048f9dee4d9 /]# ceph config dump
WHO MASK LEVEL OPTION VALUE RO
mgr unknown mgr/dashboard/RGW_API_ACCESS_KEY ****** *
mgr unknown mgr/dashboard/RGW_API_HOST 127.0.0.1 *
mgr unknown mgr/dashboard/RGW_API_PORT 8000 *
mgr unknown mgr/dashboard/RGW_API_SCHEME http *
mgr unknown mgr/dashboard/RGW_API_SECRET_KEY ****** *
mgr unknown mgr/dashboard/RGW_API_USER_ID noobaa *
mgr unknown mgr/dashboard/password ****** *
mgr unknown mgr/dashboard/server_addr 0.0.0.0 *
mgr unknown mgr/dashboard/server_port 8080 *
mgr unknown mgr/dashboard/ssl false *
mgr unknown mgr/dashboard/username noobaa *