Project

General

Profile

Feature #7851

ceph-deploy: add calamari minion installation option

Added by Neil Levine over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
Backend (packaging/deployment)
Target version:
% Done:

0%

Source:
other
Tags:
Backport:
Reviewed:
Affected Versions:

Description

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.

User Story:

  • 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.

History

#1 Updated by Ian Colle over 7 years ago

  • Priority changed from Normal to Urgent
  • Target version set to v1.2-dev6

#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

#4 Updated by Alfredo Deza over 7 years ago

  • Description updated (diff)

#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 [1] it appears as string in UI, currently placeholder 'calamari-setup').

1. https://github.com/inktankstorage/clients/commit/574c6f396c4a4d76e18ce63046d789eb1505bc83

#6 Updated by Alfredo Deza over 7 years ago

Do we care about automation systems calling this? Because if we are introducing prompts of any nature but want
to play nice with automation/scripts calling this to install, then we should allow passing a flag or an environment variable

#7 Updated by John Spray over 7 years ago

Do you mean the prompt for the URL that defaults to fqdn? I expected that to happen during ice-setup rather than here.

Yes -- this should be runnable without requiring prompts, if only for our own automated testing.

#8 Updated by Alfredo Deza over 7 years ago

  • Status changed from New to In Progress

#9 Updated by Alfredo Deza over 7 years ago

  • Status changed from In Progress to Fix Under Review

#10 Updated by Ian Colle over 7 years ago

  • Status changed from Fix Under Review to In Progress
  • Target version changed from v1.2-dev6 to v1.2-dev7

PR apparently was closed

#11 Updated by Alfredo Deza over 7 years ago

  • Target version deleted (v1.2-dev7)

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
vagrant@192.168.111.101'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
vagrant@192.168.111.101'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

#12 Updated by Alfredo Deza over 7 years ago

  • Target version set to v1.2-dev7

#13 Updated by John Spray over 7 years ago

  • Category set to Backend (packaging/deployment)

#14 Updated by Alfredo Deza over 7 years ago

  • Status changed from In Progress to Resolved

Pull request opened https://github.com/ceph/ceph-deploy/pull/175

And merged into ceph-deploy with hash 45b71cf

Also available in: Atom PDF