Bug 991226 - Distribute keystone httpd configuration in RPMS
Distribute keystone httpd configuration in RPMS
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: openstack-keystone (Show other bugs)
20
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Alan Pevec
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-01 18:08 EDT by Adam Young
Modified: 2015-06-29 20:40 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 892420
Environment:
Last Closed: 2015-06-29 20:40:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to put HTTPD fiels into the share directory (1.69 KB, patch)
2013-08-02 11:30 EDT, Adam Young
apevec: review-
Details | Diff
HTTPD files (1.78 KB, patch)
2013-10-02 17:13 EDT, Alan Pevec
no flags Details | Diff
HTTPD files (1.78 KB, patch)
2013-10-03 13:38 EDT, Alan Pevec
no flags Details | Diff

  None (edit)
Description Adam Young 2013-08-01 18:08:53 EDT
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 11:30:40 EDT
Created attachment 782020 [details]
Patch to put  HTTPD fiels into the share directory
Comment 2 Alan Pevec 2013-08-02 12:01:01 EDT
> 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 17:09:40 EDT
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 12:16:50 EDT
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 17:13:09 EDT
Created attachment 806729 [details]
HTTPD files
Comment 6 Alan Pevec 2013-10-03 13:38:39 EDT
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 06:59:59 EDT
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 10:59:59 EDT
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 19:26:02 EDT
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 05:53:09 EDT
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 15:25:30 EST
note to myself: bug 1035032 comment 6 - change header size in httpd config
Comment 12 Fedora End Of Life 2015-05-29 05:14:15 EDT
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-29 20:40:39 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.