From 8d76e18a6debb4b421c5d443bc673f88abc7a8e6 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Mon, 13 Apr 2015 17:19:04 +0000 Subject: Openstack: Make Keystone configurable Change-Id: Ic29d7c367622e0ab35486466e5e32ca432539c39 Signed-off-by: Pedro Alvarez Signed-off-by: Francisco Redondo Marchena --- .../system/openstack-keystone-setup.service | 12 +++++++++++ .../lib/systemd/system/openstack-keystone.service | 13 +++++++++++ .../usr/lib/systemd/system/postgres-server.service | 25 ++++++++++++++++++++++ .../usr/lib/systemd/system/rabbitmq-server.service | 16 ++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 openstack/usr/lib/systemd/system/openstack-keystone-setup.service create mode 100644 openstack/usr/lib/systemd/system/openstack-keystone.service create mode 100644 openstack/usr/lib/systemd/system/postgres-server.service create mode 100644 openstack/usr/lib/systemd/system/rabbitmq-server.service (limited to 'openstack/usr/lib/systemd/system') 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 -- cgit v1.2.1