From 14872d032a9f77facebf80674b85937c9cad00ef Mon Sep 17 00:00:00 2001 From: Francisco Redondo Marchena Date: Mon, 13 Apr 2015 17:37:27 +0000 Subject: keystone: Add services needed for keystone Change-Id: I5db259f480988fd3bcd1572debcd4410ca9fe895 --- .../system/openstack-keystone-setup.service | 12 +++++++++++ .../lib/systemd/system/openstack-keystone.service | 13 ++++++++++++ .../usr/lib/systemd/system/postgres-server.service | 24 ++++++++++++++++++++++ .../usr/lib/systemd/system/rabbitmq-server.service | 16 +++++++++++++++ 4 files changed, 65 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 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..d824fc7b --- /dev/null +++ b/openstack/usr/lib/systemd/system/postgres-server.service @@ -0,0 +1,24 @@ +[Unit] +Description=PostgreSQL database server + +[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