23 lines
872 B
Plaintext
23 lines
872 B
Plaintext
|
#!/bin/bash
|
||
|
set -eux
|
||
|
|
||
|
install-packages lvm2
|
||
|
os-svc-install -n cinder -u cinder -r https://github.com/openstack/cinder.git
|
||
|
|
||
|
os-svc-upstart cinder-api cinder /usr/local/bin/cinder-api "--config-dir /etc/cinder"
|
||
|
os-svc-upstart cinder-volume cinder /usr/local/bin/cinder-volume "--config-dir /etc/cinder"
|
||
|
os-svc-upstart cinder-scheduler cinder /usr/local/bin/cinder-scheduler "--config-dir /etc/cinder"
|
||
|
mkdir -p /etc/tgt/conf.d
|
||
|
echo 'include /etc/tgt/conf.d/cinder_tgt.conf' > /etc/tgt/targets.conf
|
||
|
echo 'include /var/run/cinder/volumes/*' > /etc/tgt/conf.d/cinder_tgt.conf
|
||
|
|
||
|
echo "cinder ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/cinder
|
||
|
chmod 0440 /etc/sudoers.d/cinder
|
||
|
visudo -c
|
||
|
|
||
|
os_refresh=$(os-refresh-config --print-base)
|
||
|
|
||
|
for stage in pre-configure migration post-configure; do
|
||
|
install -m 0755 -o root -g root $(dirname $0)/../$stage $os_refresh/$stage.d/72-cinder
|
||
|
done
|