Commit 9864e4a2 by Czémán Arnold

vmdriver, ceph: add ceph backend conguration and install

parent 15d544d2
ceph:
release: hammer
repo_url: http://de.ceph.com/
repo_keys_url: https://download.ceph.com/keys/release.asc
config_path:
keyfile_path:
timeout:
......@@ -11,4 +11,5 @@ base:
- firewall
- manager
- common
- ceph
- installer
vmdriver:
repo_name: https://git.ik.bme.hu/circle/vmdriver.git
repo_revision: master
hypervisor_type: kvm
dump_size_limit:
......@@ -4,6 +4,7 @@ include:
- manager
- graphite
- monitor-client
- ceph
- storagedriver
- vmdriver
- vncproxy
......
add_ceph_repokeys:
cmd.run:
{% if grains['os_family'] == 'RedHat' %}
- name: rpm --import "{{ pillar['ceph']['repo_keys_url'] }}"
{% else %}
- name: wget -q -O- "{{ pillar['ceph']['repo_keys_url'] }}" | apt-key add -
{% endif %}
add_ceph_repo:
{% if grains['os_family'] == 'RedHat' %}
file.managed:
- name: /etc/yum.repos.d/ceph.repo
- source: salt://ceph/files/repo_template
- template: jinja
- user: root
- group: root
- mode: 744
{% else %}
cmd.run:
- name: deb {{ pillar['ceph']['repo_url'] }}/debian-{{ pillar['ceph']['release'] }}/ $(lsb_release -sc) main > /etc/apt/sources.list.d/ceph.list
{% endif %}
- require:
- cmd: add_ceph_repokeys
[ceph]
name=Ceph packages for $basearch
baseurl={{ pillar["ceph"]["repo_url"] }}/rpm-{{ pillar["ceph"]["release"] }}/el7/$basearch
enabled=1
priority=2
gpgcheck=1
type=rpm-md
gpgkey={{ pillar["ceph"]["repo_keys_url"] }}
[ceph-noarch]
name=Ceph noarch packages
baseurl={{ pillar["ceph"]["repo_url"] }}/rpm-{{ pillar["ceph"]["release"] }}/el7/noarch
enabled=1
priority=2
gpgcheck=1
type=rpm-md
gpgkey={{ pillar["ceph"]["repo_keys_url"] }}
[ceph-source]
name=Ceph source packages
baseurl={{ pillar["ceph"]["repo_url"] }}/rpm-{{ pillar["ceph"]["release"] }}/el7/SRPMS
enabled=0
priority=2
gpgcheck=1
type=rpm-md
gpgkey={{ pillar["ceph"]["repo_keys_url"] }}
include:
- ceph.configuration
ceph:
pkg.installed:
- pkgs:
- ceph-common
- ceph
- require:
{% if grains['os_family'] == 'RedHat' %}
- file: add_ceph_repo
{% else %}
- cmd: add_ceph_repo
{% endif %}
......@@ -2,5 +2,6 @@ include:
- profile
- agentdriver
- monitor-client
- ceph
- vmdriver
- nfs-client
export AMQP_URI=amqp://{{ pillar['amqp']['user'] }}:{{ pillar['amqp']['password'] }}@{{ pillar['amqp']['host'] }}:{{ pillar['amqp']['port'] }}/{{ pillar['amqp']['vhost'] }}
export CACHE_URI={{ pillar['cache'] }}
{% if pillar['ceph']['config_path'] %}
export CEPH_CONFIG="{{ pillar['ceph']['config_path'] }}"
{% endif %}
{% if pillar['ceph']['keyfile_path'] %}
export CEPH_KEYRING="{{ pillar['ceph']['keyfile_path'] }}"
{% endif %}
{% if pillar['ceph']['timeout'] %}
export CEPH_TIMEOUT="{{ pillar['ceph']['timeout'] }}"
{% endif %}
export AMQP_URI=amqp://{{ pillar['amqp']['user'] }}:{{ pillar['amqp']['password'] }}@{{ pillar['amqp']['host'] }}:{{ pillar['amqp']['port'] }}/{{ pillar['amqp']['vhost'] }}
export CACHE_URI={{ pillar['cache'] }}
export LIBVIRT_URI=qemu:///system
export HYPERVISOR_TYPE=kvm
export HYPERVISOR_TYPE="{{ pillar['vmdriver']['hypervisor_type'] }}"
export NATIVE_OVS=True
{% if pillar['ceph']['config_path'] %}
export CEPH_CONFIG="{{ pillar['ceph']['config_path'] }}"
{% endif %}
{% if pillar['ceph']['keyfile_path'] %}
export CEPH_KEYRING="{{ pillar['ceph']['keyfile_path'] }}"
{% endif %}
{% if pillar['ceph']['timeout'] %}
export CEPH_TIMEOUT="{{ pillar['ceph']['timeout'] }}"
{% endif %}
{% if pillar['vmdriver']['dump_size_limit'] %}
export DUMP_SIZE_LIMIT="{{ pillar['vmdriver']['dump_size_limit'] }}"
{% endif %}
{{ pillar['user'] }} ALL = (ALL) NOPASSWD: /usr/bin/ovs-ofctl, /usr/bin/ovs-vsctl, /sbin/ip link set *
{{ pillar['user'] }} ALL = (ALL) NOPASSWD: /usr/bin/ovs-ofctl, /usr/bin/ovs-vsctl, /sbin/ip link set *, /bin/rbd map *, /bin/rbd unmap *
Defaults: {{ pillar['user'] }} !requiretty
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment