Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spec file with systemd unit file #40

Merged
merged 1 commit into from Oct 22, 2019

Conversation

machacekondra
Copy link
Contributor

No description provided.

@machacekondra
Copy link
Contributor Author

cc @mwperina

Copy link
Contributor

@mwperina mwperina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@machacekondra
Copy link
Contributor Author

Hello @pcuzner @jmolmo can you please review/merge if all is OK? Thank you!

@jmolmo
Copy link
Collaborator

jmolmo commented Oct 15, 2019

As we already commented in previous occasions, to have an spec file implies make decisions about how is going to be deployed the service. For example, using gunicorn, using nginx with TLS mutual auth or not, or other web servers. Use a systemd unit file or not ...

I think that is good to have this stuff in the ARS, but is needed to improve our current folder structure and documentation. (To reflect the different possibilities).

Can you make the following changes?

  1. Use the a "packaging" folder, This folder should contain a subfolder for each deploy configuration. In your case , you should create a "gunicorn" folder where to store your spec file and related systemd files.

  2. Use always the "wsgy.py" file we have in the root folder.

Comment on lines 1 to 15
import runner_service.configuration as configuration
from runner_service.app import create_app

"""
WSGI config for Ansible Runner Service

It exposes the WSGI callable as a module-level variable named ``application``.

"""

# wsgi entry point is only for production servers
configuration.init(mode='prod')

# The object to be managed by uwsgi
application = create_app()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you using a different file from the one we have in root folder?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one doesn't call setup_common_environment, which is something we don't want in this case.

@machacekondra
Copy link
Contributor Author

Will do.

@machacekondra
Copy link
Contributor Author

@jmolmo Thank you for review, I've updated the PR with your comments..

@jmolmo
Copy link
Collaborator

jmolmo commented Oct 18, 2019

LGTM

Copy link
Collaborator

@pcuzner pcuzner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pcuzner pcuzner merged commit 40a541f into ansible:master Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants