Dmitry Tantsur 5c1881282c Add uWSGI role and use systemd instead of emperor mode
Using the emperor mode of uWSGI is redundant now that we depend on
systemd. This change switches uWSGI Keystone to systemd template services
based on the recipe from the uWSGI documentation [1].

A new role is created to encapsulate the uWSGI login in anticipation of
switching Ironic API to uWSGI as well. Reduce repetition in Keystone.

[1] https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html

Change-Id: I50bc3f7a4faf14c36b92e7656b7149e9c833c85e
2021-09-04 15:57:04 +02:00

55 lines
1.5 KiB
YAML

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
- name: "Install packages"
package:
name: "{{ required_packages }}"
state: present
- name: "Install Nginx"
import_role:
name: bifrost-nginx-install
tasks_from: install
# NOTE(TheJulia) While we don't necessarilly require /opt/stack any longer
# and it should already be created by the Ansible setup, we will leave this
# here for the time being.
- name: "Ensure /opt/stack is present"
file: name=/opt/stack state=directory owner=root group=root
when: not skip_install | bool
- name: "Install uWSGI"
include_role:
name: bifrost-uwsgi-install
tasks_from: install
- name: "Install pymysql"
include_role:
name: bifrost-pip-install
vars:
package: pymysql
- name: "Install python-openstackclient"
include_role:
name: bifrost-pip-install
vars:
package: python-openstackclient
- name: "Install keystone"
include_role:
name: bifrost-pip-install
vars:
package: keystone
sourcedir: "{{ keystone_git_folder }}"
source_install: "{{ keystone_source_install }}"