Bug 991226

Summary: Distribute keystone httpd configuration in RPMS
Product: [Fedora] Fedora Reporter: Adam Young <ayoung>
Component: openstack-keystoneAssignee: Alan Pevec (Fedora) <apevec>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 20CC: apevec, ayoung, dpal, ggillies, jlennox, markmc, rbryant, sclewis
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 892420 Environment:
Last Closed: 2015-06-30 00:40:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to put HTTPD fiels into the share directory
apevec: review-
HTTPD files
none
HTTPD files none

Description Adam Young 2013-08-01 22:08:53 UTC
I'm looking at deploying keystone inside of httpd as per the instructions at

https://github.com/openstack/keystone/blob/master/doc/source/apache-httpd.rst

I noticed that none of the rpms we ship include any files in this directory

https://github.com/openstack/keystone/tree/stable/folsom/httpd

Are distributed as part of the packages. I understand that we don't want to ship them in the openstack-keystone rpm as it may confuse people, but could we have another subpackage openstack-keystone-httpd or python-keystone-httpd which contains the apache configuration and the mod_wsgi python file so people who want to deploy keystone inside of httpd can do so?

Thanks,

Graeme

--- Additional comment from Alan Pevec on 2013-02-26 18:31:09 EST ---

This will require config reorganization from bug 887815
httpd fails to access 640 root:keystone /etc/keystone/keystone.conf

--- Additional comment from Alan Pevec on 2013-02-26 19:29:23 EST ---

Tested with
640 root:apache /etc/keystone-httpd.conf with modifications from distributed conf:

-# public_port = 5000
+public_port = 8443
 
-# admin_port = 35357
+admin_port = 8443
 
-# public_endpoint = http://localhost:%(public_port)d/
-# admin_endpoint = http://localhost:%(admin_port)d/
+public_endpoint = https://localhost:%(public_port)s/keystone/main
+admin_endpoint = https://localhost:%(admin_port)s/keystone/admin

$ keystone --insecure --os-token ADMIN --os-endpoint https://localhost:8443/keystone/admin/v2.0 user-create --name demo --pass 123
+----------+----------------------------------+
| Property |              Value               |
+----------+----------------------------------+
|  email   |                                  |
| enabled  |               True               |
|    id    | db83171efe614cf582a7cd2ac08da8dd |
|   name   |               demo               |
| tenantId |                                  |
+----------+----------------------------------+

--- Additional comment from Alan Pevec on 2013-02-26 19:54:03 EST ---

Also needs to be /etc/httpd/conf.d/wsgi-keystone.conf to ensure wsgi is loaded first (/etc/httpd/conf.modules.d/99-keystone.conf in httpd >= 2.4)

--- Additional comment from Adam Young on 2013-08-01 18:03:34 EDT ---

The wsgi enabling files from keystone/httpd/  should go into /usr/share/openstack-keystone/  And a Puppet module can pick them up from there and complete the initialization

Comment 1 Adam Young 2013-08-02 15:30:40 UTC
Created attachment 782020 [details]
Patch to put  HTTPD fiels into the share directory

Comment 2 Alan Pevec 2013-08-02 16:01:01 UTC
> Patch to put  HTTPD fiels into the share directory

Debian does this:
"Installs httpd/keystone.py in /usr/share/keystone/wsgi.py as requested by fc__"
http://anonscm.debian.org/gitweb/?p=openstack/keystone.git;a=commit;h=bd7205b304ef8ac4adc375d5b0539f7a6437406e

Not sure why was that requested, but wouldn't be better to have that in a openstack-keystone-httpd subpackage in the locations expected by httpd i.e.
/etc/httpd/conf.modules.d/ or /etc/httpd/conf.d/ (epel6)

Comment 3 Adam Young 2013-08-27 21:09:40 UTC
That approach would be wrong in this case.  If a user deploys Keystone as an Eventlet based web service, and deploys Horizon on the same machine, the Keystone file would double-deploy Keystone and provide a potentially broken system.  Deploying Keystone into HTTPS is only one potential approach, and is handled post RPM install.

Comment 4 Alan Pevec 2013-09-17 16:16:50 UTC
Comment on attachment 782020 [details]
Patch to put  HTTPD fiels into the share directory

ok, let's go with sample httpd config in /usr/share/ but please move it to %{_datadir}/keystone/ - I've moved stuff there recently as a part of adding dist.conf in f20/RDO Havana:
http://pkgs.fedoraproject.org/cgit/openstack-keystone.git/commit/?id=31f2c501cc1e24b4200df455b38dd6b6bfbfd6f9

Comment 5 Alan Pevec 2013-10-02 21:13:09 UTC
Created attachment 806729 [details]
HTTPD files

Comment 6 Alan Pevec 2013-10-03 17:38:39 UTC
Created attachment 807198 [details]
HTTPD files

There should be nothing secret in /usr/share/ so changing permissions to 644

Comment 7 Alan Pevec 2013-10-04 10:59:59 UTC
Comment on attachment 807198 [details]
HTTPD files

%files section is missing + more follow-up changes, won't post here, see fed pkg git.

Comment 8 Alan Pevec 2013-10-04 14:59:59 UTC
Also, I'll propose upstream to rename httpd/keystone.py to httpd/keystone.wsgi to match openstack-dashboard[1]
.py is misleading and triggers rpmbuild Python precompile.

[1] https://github.com/openstack/horizon/tree/master/openstack_dashboard/wsgi

Comment 9 Alan Pevec 2013-10-07 23:26:02 UTC
Tested with 640 root:apache /etc/keystone.conf (/etc/keystone/ is not accessible by httpd): 
[DEFAULT]
log_file =
onready =
admin_token = ADMIN

public_port = 8443
admin_port = 8443
public_endpoint = http://localhost:%(public_port)s/keystone/main
admin_endpoint = http://localhost:%(admin_port)s/keystone/admin

Comment 10 Alan Pevec 2013-10-09 09:53:09 UTC
Redoing it to match approach in devstack[1] - run mod_wsgi process under keystone user to avoid separate configuration files.


[1] https://github.com/openstack-dev/devstack/commit/a00e5f8810b6ca3b0b5d63cc228125e19bc91955

Comment 11 Alan Pevec 2013-12-05 20:25:30 UTC
note to myself: bug 1035032 comment 6 - change header size in httpd config

Comment 12 Fedora End Of Life 2015-05-29 09:14:15 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 13 Fedora End Of Life 2015-06-30 00:40:39 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.