ceph-deploy: add calamari minion installation option
John created a bootstrap script (http://pastebin.com/HTkciENa) which when run on each Ceph node, adds the calamari repo, installs the salt minion package and adds some configuration changes. Currently, this is a manual action by the administrator on each node.
Instead of requiring the user to run this on each machine, we want to add a command to ceph-deploy to do this step on all available machines in the cluster.
While this does mean we are adding some Inktank-specific functionality to ceph-deploy, this is less involved than forking ceph-deploy. Later on we can abstract out the logic to a separate loadable module but that is outside of MVP for now.
- As an administrator, I install the ICE package to create my local repo mirror.
- As an administrator, I run 'ceph-deploy install calamari-salt-minion' which installs the packages from the local repo and configures them.
- As an administrator, I go to the Calamari UI to authorize each host running a minion.
#2 Updated by John Spray over 7 years ago
For the benefit of the history, pastebin was for convenience, the canonical location of this script is https://github.com/inktankstorage/calamari/blob/master/calamari-web/calamari_web/views.py#L51
#3 Updated by John Spray over 7 years ago
BTW, when adding the calamari repo it would be a good idea to explicitly disable any proxies for that repo:
#5 Updated by John Spray over 7 years ago
Addition: please can you ping Yan when this gets committed, to clarify exactly what the command is called (since  it appears as string in UI, currently placeholder 'calamari-setup').
#11 Updated by Alfredo Deza over 7 years ago
- Target version deleted (
Here I am using the `--master example.com` but that is optional, and will get read from the config file (when that feature gets completed).
I also check that the minion config is there and that the repo was set correctly.
Do not pick on the repo values since those are like that for testing. Ceph deploy will obey whatever is present.
ceph-deploy calamari --master example.com connect node2 [ceph_deploy.cli][INFO ] Invoked (1.4.0): /Users/alfredo/.virtualenvs/ceph-deploy/bin/ceph-deploy calamari --master example.com connect node2 firstname.lastname@example.org's password: [node2][DEBUG ] connected to host: node2 [node2][DEBUG ] detect platform information from remote host [node2][DEBUG ] detect machine type [ceph_deploy.calamari][INFO ] Distro info: CentOS 6.4 Final [node2][INFO ] installing calamari-minion package on node2 [node2][INFO ] adding custom repository file [node2][INFO ] Running command: sudo rpm --import https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc [node2][DEBUG ] set the contents of repo file to /etc/yum.repos.d/ [node2][DEBUG ] creating config dir: /etc/salt/minion.d [node2][DEBUG ] creating the calamari salt config: /etc/salt/minion.d/calamari.conf [node2][INFO ] Running command: sudo yum -y -q install salt-minion [node2][INFO ] Running command: sudo chkconfig salt-minion on [node2][INFO ] Running command: sudo service salt-minion start [node2][DEBUG ] Starting salt-minion daemon: [ OK ] (ceph-deploy)papaya ~/tmp/foo ? ssh node2 email@example.com's password: [vagrant@vagrant-centos64 ~]$ cat /etc/yum.repos.d/calamari-minion.repo [calamari-minion] name=ceph repo noarch packages baseurl=http://ceph.com/rpm-emperor/fc19/x86_64 enabled=1 gpgcheck=1 type=repo-md gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc [vagrant@vagrant-centos64 ~]$ cat /etc/salt/minion.d/calamari.conf master: example.com