## Configure package origin
#
-#ceph_origin: 'upstream' # or 'distro'
+#ceph_origin: 'upstream' #'distro' or 'local'
# 'distro' means that no separate repo file will be added
# you will get whatever version of Ceph is included in your Linux distro.
+# 'local' means that the ceph binaries will be copied over from the local machine
+
+# LOCAL CEPH INSTALLATION (ceph_origin==local)
#
-#ceph_use_distro_backports: false # DEBIAN ONLY
+# Path to DESTDIR of the ceph install
+#ceph_installation_dir: "/path/to/ceph_installation/"
+# Whether or not to use installer script rundep_installer.sh
+# This script takes in rundep and installs the packages line by line onto the machine
+# If this is set to false then it is assumed that the machine ceph is being copied onto will already have
+# all runtime dependencies installed
+#use_installer: false
+# Root directory for ceph-ansible
+#ansible_dir: "/path/to/ceph-ansible"
+#ceph_use_distro_backports: false # DEBIAN ONLY
# STABLE
########
## Configure package origin
#
-ceph_origin: 'upstream' # or 'distro'
+ceph_origin: 'upstream' # or 'distro' or 'local'
# 'distro' means that no separate repo file will be added
# you will get whatever version of Ceph is included in your Linux distro.
+# 'local' means that the ceph binaries will be copied over from the local machine
+
+# LOCAL CEPH INSTALLATION (ceph_origin==local)
#
-ceph_use_distro_backports: false # DEBIAN ONLY
+# Path to DESTDIR of the ceph install
+#ceph_installation_dir: "/path/to/ceph_installation/"
+# Whether or not to use installer script rundep_installer.sh
+# This script takes in rundep and installs the packages line by line onto the machine
+# If this is set to false then it is assumed that the machine ceph is being copied onto will already have
+# all runtime dependencies installed
+#use_installer: false
+# Root directory for ceph-ansible
+#ansible_dir: "/path/to/ceph-ansible"
+ceph_use_distro_backports: false # DEBIAN ONLY
# STABLE
########
when:
- ceph_origin != 'upstream'
- ceph_origin != 'distro'
+ - ceph_origin != 'local'
tags:
- package-install
include: redhat_ceph_repository.yml
when: ceph_origin == 'upstream'
+- name: make sure /tmp exists
+ file:
+ path: /tmp
+ state: directory
+ when:
+ - ceph_origin == 'local'
+ - use_installer
+
+- name: use mktemp to create name for rundep
+ command: "mktemp /tmp/rundep.XXXXXXXX"
+ register: rundep_location
+ when:
+ - ceph_origin == 'local'
+ - use_installer
+
+- name: copy rundep
+ copy:
+ src: "{{ansible_dir}}/rundep"
+ dest: "{{ item }}"
+ with_items: rundep_location.stdout_lines
+ when:
+ - ceph_origin == 'local'
+ - use_installer
+
+- name: install ceph dependencies
+ script: "{{ ansible_dir }}/rundep_installer.sh {{ item }}"
+ become: true
+ with_items: rundep_location.stdout_lines
+ when:
+ - ceph_origin == 'local'
+ - use_installer
+
- name: install ceph
yum:
name: ceph
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
- when: not use_server_package_split
+ when:
+ - not use_server_package_split
+ - ansible_pkg_mgr == "yum"
+ - ceph_origin != 'local'
+
+- name: synchronize ceph install
+ synchronize:
+ src: "{{ceph_installation_dir}}/"
+ dest: "/"
+ when:
+ - ceph_origin == 'local'
+
+- name: create user group ceph
+ group:
+ name: 'ceph'
+ when:
+ - ceph_origin == 'local'
+
+- name: create user ceph
+ user:
+ name: 'ceph'
+ when:
+ - ceph_origin == 'local'
-- name: install distro or red hat storage ceph mon
+- name: install distro or red hat storage ceph mon via yum
yum:
name: "ceph-mon"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
or ceph_origin == "distro"
or ceph_custom
-- name: install distro or red hat storage ceph mon
+- name: install distro or red hat storage ceph mon via dnf
dnf:
name: "ceph-mon"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
or ceph_dev
or ceph_custom
-- name: install distro or red hat storage ceph osd
+- name: install distro or red hat storage ceph osd via yum
yum:
name: "ceph-osd"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
or ceph_dev
or ceph_custom
-- name: install distro or red hat storage ceph osd
+- name: install distro or red hat storage ceph osd via dnf
dnf:
name: "ceph-osd"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
or ceph_dev
or ceph_custom
-- name: install distro or red hat storage ceph mds
+- name: install distro or red hat storage ceph mds via yum
yum:
name: "ceph-mds"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
or ceph_dev
or ceph_custom
-- name: install distro or red hat storage ceph mds
+- name: install distro or red hat storage ceph mds via dnf
dnf:
name: "ceph-mds"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
or ceph_dev
or ceph_custom
-- name: install distro or red hat storage ceph base
+- name: install distro or red hat storage ceph base via yum
yum:
name: "ceph-base"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
or ceph_dev
or ceph_custom
-- name: install distro or red hat storage ceph base
+- name: install distro or red hat storage ceph base via dnf
dnf:
name: "ceph-base"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
- is_after_hammer
- name: ceph monitor mkfs without keyring (for or after infernalis release)
- command: ceph-mon --setuser ceph --setgroup ceph --mkfs -i {{ monitor_name }} --fsid {{ fsid }}
+ command: ceph-mon --cluster {{ cluster }} --setuser ceph --setgroup ceph --mkfs -i {{ monitor_name }} --fsid {{ fsid }}
args:
creates: /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/store.db
when:
with_items:
- done
- upstart
- when: not use_systemd
+ when:
+ - not use_systemd
- name: start and add that the monitor service to the init sequence (ubuntu)
command: initctl emit ceph-mon cluster={{ cluster }} id={{ monitor_name }}
changed_when: false
failed_when: false
- when: not use_systemd
+ when:
+ - not use_systemd
# NOTE (leseb): somehow the service ansible module is messing things up
# as a safety measure we run the raw command
--- /dev/null
+#Package lines can be commented out with '#'
+#
+#boost-atomic
+#boost-chrono
+#boost-date-time
+#boost-iostreams
+#boost-program
+#boost-random
+#boost-regex
+#boost-system
+#boost-thread
+#bzip2-libs
+#cyrus-sasl-lib
+#expat
+#fcgi
+#fuse-libs
+#glibc
+#hdparm
+#keyutils-libs
+#leveldb
+#libaio
+#libatomic_ops
+#libattr
+#libblkid
+#libcap
+#libcom_err
+#libcurl
+#libgcc
+#libicu
+#libidn
+#libnghttp2
+#libpsl
+#libselinux
+#libssh2
+#libstdc++
+#libunistring
+#nss-softokn-freebl
+#openldap
+#openssl-libs
+#pcre
+#python-nose
+#python-sphinx
+#snappy
+#systemd-libs
+#zlib
--- /dev/null
+#!/bin/bash -e
+#
+# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>
+#
+# Author: Daniel Lin <danielin@umich.edu>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+
+if test -f /etc/redhat-release ; then
+ PACKAGE_INSTALLER=yum
+elif type apt-get > /dev/null 2>&1 ; then
+ PACKAGE_INSTALLER=apt-get
+else
+ echo "ERROR: Package Installer could not be determined"
+ exit 1
+fi
+
+while read p; do
+ if [[ $p =~ ^#.* ]] ; then
+ continue
+ fi
+ $PACKAGE_INSTALLER install $p -y
+done < $1