summaryrefslogtreecommitdiff
path: root/openstack/usr/lib
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-04-13 17:19:04 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-04-16 12:13:45 +0000
commit1a09fe5755f0f7f69ecbf44615fdd01f6a01c7be (patch)
tree21b005d099d12aec7ad953c344b3a1018fb6f08f /openstack/usr/lib
parentdb8bb9caf5adf5f9c0d5f1cdc32bbe194b685663 (diff)
downloaddefinitions-1a09fe5755f0f7f69ecbf44615fdd01f6a01c7be.tar.gz
Openstack: Make Keystone configurable
Change-Id: Ic29d7c367622e0ab35486466e5e32ca432539c39 Signed-off-by: Pedro Alvarez <pedro.alvarez@codethink.co.uk> Signed-off-by: Francisco Redondo Marchena <francisco.marchena@codethink.co.uk>
Diffstat (limited to 'openstack/usr/lib')
-rw-r--r--openstack/usr/lib/systemd/system/openstack-keystone-setup.service12
-rw-r--r--openstack/usr/lib/systemd/system/openstack-keystone.service13
-rw-r--r--openstack/usr/lib/systemd/system/postgres-server.service25
-rw-r--r--openstack/usr/lib/systemd/system/rabbitmq-server.service16
4 files changed, 66 insertions, 0 deletions
diff --git a/openstack/usr/lib/systemd/system/openstack-keystone-setup.service b/openstack/usr/lib/systemd/system/openstack-keystone-setup.service
new file mode 100644
index 00000000..9ea04c1d
--- /dev/null
+++ b/openstack/usr/lib/systemd/system/openstack-keystone-setup.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Run keystone-setup Ansible scripts
+After=local-fs.target postgres-server.service
+ConditionPathExists=/etc/openstack/keystone.conf
+
+[Service]
+# Oneshot, since others setup have to wait until this service finishes
+Type=oneshot
+ExecStart=/usr/bin/ansible-playbook -v -M /usr/share/ansible/ansible-openstack-modules -i /usr/share/openstack/hosts /usr/share/openstack/keystone.yml
+
+[Install]
+WantedBy=multi-user.target
diff --git a/openstack/usr/lib/systemd/system/openstack-keystone.service b/openstack/usr/lib/systemd/system/openstack-keystone.service
new file mode 100644
index 00000000..0aa9e1ef
--- /dev/null
+++ b/openstack/usr/lib/systemd/system/openstack-keystone.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=OpenStack Identity Service (code-named Keystone)
+After=syslog.target network-online.target
+Wants=network-online.target
+
+[Service]
+Type=notify
+Restart=always
+User=keystone
+ExecStart=/usr/bin/keystone-all --config-file /etc/keystone/keystone.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/openstack/usr/lib/systemd/system/postgres-server.service b/openstack/usr/lib/systemd/system/postgres-server.service
new file mode 100644
index 00000000..70b2fd09
--- /dev/null
+++ b/openstack/usr/lib/systemd/system/postgres-server.service
@@ -0,0 +1,25 @@
+[Unit]
+Description=PostgreSQL database server
+After=network.target
+
+[Service]
+Type=forking
+TimeoutSec=120
+User=postgres
+Group=postgres
+
+Environment=PGROOT=/var/lib/pgsql
+
+SyslogIdentifier=postgres
+PIDFile=/var/lib/pgsql/data/postmaster.pid
+
+ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120
+ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT}/data reload
+ExecStop= /usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast
+
+# Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in
+# killing Postgres, so adjust it downward
+OOMScoreAdjust=-200
+
+[Install]
+WantedBy=multi-user.target
diff --git a/openstack/usr/lib/systemd/system/rabbitmq-server.service b/openstack/usr/lib/systemd/system/rabbitmq-server.service
new file mode 100644
index 00000000..f161b9d0
--- /dev/null
+++ b/openstack/usr/lib/systemd/system/rabbitmq-server.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RabbitMQ broker
+After=syslog.target network-online.target
+Wants=network-online.target
+
+[Service]
+Type=notify
+User=rabbitmq
+Group=rabbitmq
+Environment=HOME=/var/lib/rabbitmq
+WorkingDirectory=/var/lib/rabbitmq
+ExecStart=/usr/sbin/rabbitmq-server
+ExecStop=/usr/sbin/rabbitmqctl stop
+
+[Install]
+WantedBy=multi-user.target