Here is a script that I put together that will setup a single node Ceph cluster (1 mon, 1 osd). It’s meant as a reference for setting up Ceph on CloudLab.
There aren’t any official Ceph ARM builds. I created the arm64 build packages and stuck them up at
ceph.com/noah/. Note that these are **NOT** QA’d at all (beyond my own sanity checks), so YMMV. I’ve tested this on the `arm64 ubuntu 14.04` image.
After running the script below, `ceph status` should show a live Ceph cluster with good health:
```
nwatkins@node:~$ ceph status
cluster 9cf5b56e-fb67-48cb-a2c1-2b2eb36c3f61
health HEALTH_OK
monmap e1: 1 mons at {node=
128.110.152.35:6789/0}
election epoch 2, quorum 0 node
osdmap e5: 1 osds: 1 up, 1 in
pgmap v10: 64 pgs, 1 pools, 0 bytes data, 0 objects
12705 MB used, 94100 MB / 109 GB avail
64 active+clean
```
ceph-setup-cloudlab.sh
```
#!/bin/bash
set -e
set -x
sudo apt-get update
# grab ceph packages
mkdir ceph-build
cd ceph-build
wget -r --no-parent
http://ceph.com/noah/build-master/cd
ceph.com/noah/build-master/set +e # will fail with unmet dependencies
sudo dpkg -i *.deb
set -e
sudo apt-get -f -y install
cd ~
# setup ssh keys
HOSTNAME=`hostname`
ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa -q
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh-keyscan -H $HOSTNAME >> ~/.ssh/known_hosts
cd ~
# setup ceph
sudo apt-get install ceph-deploy
mkdir cluster
cd cluster/
ceph-deploy new $HOSTNAME
echo "osd crush chooseleaf type = 0" >> ceph.conf
echo "osd pool default size = 1" >> ceph.conf
ceph-deploy mon create-initial $HOSTNAME
sudo mkdir /mnt/ceph
sudo mkdir /mnt/ceph/osd
sudo dd if=/dev/zero of=/mnt/ceph/journal bs=1024K count=1024
ceph-deploy osd prepare $HOSTNAME:/mnt/ceph/osd:/mnt/ceph/journal
ceph-deploy osd activate $HOSTNAME:/mnt/ceph/osd:/mnt/ceph/journal
# test
sudo chmod a+r /etc/ceph/ceph.client.admin.keyring
```