98 Commits

Author SHA1 Message Date
Dean Troyer
444a8d53ca Fix Apache site config handling on Fedora
Allow enable/disable_apache_sites() on Fedora to gracefully fail if the
config is not present.  This is primarily an issue when the config from
a previous run is not completely cleaned out (unstack.sh vs clean.sh).

Make APACHE_CONFIG_DIR fully qualified and overrideable in local.conf.

Also fix Horizon's handling of its Apache config file to be removed
in clean.sh.

Change-Id: I78a5de579dd3b02fa2e4e7e00ac0aabe71b531ad
2014-06-06 16:52:20 -05:00
Haiwei Xu
98a181713c Save OPENSTACK_KEYSTONE_URL to horizon local_settings
OPENSTACK_KEYSTONE_URL is not saved to local_settings correctly,
this patch fixes this bug.

Change-Id: I4275f035be3d8ab013840d8b5e3f9a5e292a366b
2014-06-04 19:26:40 +09:00
Attila Fazekas
afda4efb2c Enable horizon on Fedoras
The previous apache/horizon a688bc65104e7d8998ffdb321d67a9f33df6997e
change left horizon disabled on Fedora.

Closes-Bug: #1326126

Change-Id: I79f84bb63471f84c6b37538e8dfe2bcca3ce3eac
2014-06-04 07:34:13 +02:00
Gabriel Assis Bezerra
a688bc6510 Fix the way Apache site configuration files are used, to improve OS portability
On Ubuntu 14.04, the site configuration file must have a .conf suffix for a2ensite and a2dissite to
recognise it. a2ensite and a2dissite ignore the .conf suffix used as parameter. The default sites'
files are 000-default.conf and default-ssl.conf.

On Ubuntu 12.04, the site configuration file may have any format, as long as it is in
/etc/apache2/sites-available/. a2ensite and a2dissite need the entire file name to work. The default
sites' files are default and default-ssl.

On Fedora, any file in /etc/httpd/conf.d/ whose name ends with .conf is enabled.

On RHEL and CentOS, things should hopefully work as in Fedora.

This change puts all distribution-related site configuration file name differences in lib/apache and
the other services gets the file name for its sites using the new exported function
apache_site_config_for <sitename>.

It also makes Fedora disabled sites use the .conf.disabled suffix instead of removing the .conf from
the file name.

The table below summarizes what should happen on each distribution:
+----------------------+--------------------+--------------------------+--------------------------+
| Distribution         | File name          | Site enabling command    | Site disabling command   |
+----------------------+--------------------+--------------------------+--------------------------+
| Ubuntu 12.04         | site               | a2ensite site            | a2dissite site           |
| Ubuntu 14.04         | site.conf          | a2ensite site            | a2dissite site           |
| Fedora, RHEL, CentOS | site.conf.disabled | mv site.conf{.disabled,} | mv site.conf{,.disabled} |
+----------------------+--------------------+--------------------------+--------------------------+

Change-Id: Ia2ba3cb7caccb6e9b65380f9d51d9d21180b894e
Closes-bug: #1313765
2014-05-30 12:07:24 +00:00
Jenkins
584e65cfc1 Merge "Configure Horizon to use SSL-enabled Keystone" 2014-05-02 12:12:02 +00:00
Rob Crittenden
c31fa40b77 Configure Horizon to use SSL-enabled Keystone
SSL can be enabled in Keystone when devstack is executed.
Horizon was not being configured to use the SSL port so
authentication was failing.

Change-Id: I253766d359aaab0bd1f844a8a637adc77e8eee2b
Closes-Bug: 1293749
2014-04-29 23:32:59 -04:00
Christian Berendt
cbd97ca975 use disable/enable_apache_site on Ubuntu
Using the specific Apache2 tools a2ensite and a2dissite
(used in the methods disable/enable_apache_site in lib/apache)
should be the preferred way to disable the default site and
to enable the horizon site.

fixes bug #1298031

Change-Id: I2f247c0b6e605a330086a558e03e2c36666c55be
2014-03-27 14:30:12 +00:00
Ian Wienand
aee18c749b Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check.  Add a note to HACKING.rst

Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
2014-02-28 07:59:03 +11:00
Sean Dague
67db4a9bd5 remove database init from horizon
horizon default config no longer uses a session database, it uses
signed cookies instead, so we can stop doing db initialization and
cleanup (which based on errexit we weren't doing correctly anyway).

Change-Id: Icae4318e2784486db2888cbf353e95ac9a5d7cba
2014-02-07 16:04:47 -05:00
Dean Troyer
4237f590b7 Generate Tempest service list rather than hard-code it
The list of services that Tempest used to set its 'service_available'
config values was hard-coded. To be plugin-friendly have each
service (project) add its name to the TEMPEST_SERVICES variable
and use that for setting the 'service_avilable' values.

Change-Id: I208efd7fd0798b18ac2e6353ee70b773e84a2683
2014-01-29 17:25:45 -06:00
Gonéri Le Bouder
394c11c721 horizon: drop nodejs dependency
since commit a0739c9423a4c559b45af96fa4cdb30539dcdbd7, horizon use
a pure Python alternative to nodejs

Change-Id: I231b453e42c303c3cc29e8bea4d7b935fecdccd2
2013-11-14 10:28:51 +01:00
Chris Buccella
610af8cfa7 Fix horizon config under Apache 2.4
Apache 2.4 now uses mod_authz_host for acces control. Horizon's
Apache config needs an update to allow access to its directory,
otherwise a 403 will be returned.
This change replaces a similar previous fixes done for Fedora 18
and Ubuntu 13.10, since this is an Apache version issue, not a
distro-specific one.

Change-Id: Iecc17600d8e1aae6a7b0929b1493d712c307616f
Closes-Bug: #1243075
2013-11-05 13:06:34 +00:00
Jenkins
0eeeb2efdf Merge "Fix apache horizon permissions on Ubuntu 13.10" 2013-11-01 18:32:05 +00:00
Peter Feiner
62e8a30abd Fix apache horizon permissions on Ubuntu 13.10
Fixes bug 1241574.

Change-Id: If6c30874267a6bf30c114146f83b2d3220f32c1a
2013-10-24 18:38:44 -04:00
Adam Spiers
6a5aa7c6a2 Fix some Markdown formatting issues
Address miscellaneous issues with Markdown formatting in comments which
are consumed by shocco when generating the online documentation.

Change-Id: I953075cdbddbf1f119c6c7e35f039e2e54b79078
2013-10-24 17:38:19 +01:00
Jenkins
a15f9092ec Merge "Uniquify unsupported distro error message" 2013-10-03 21:12:22 +00:00
Adam Spiers
3ac8612b55 Don't bail when setting up horizon on openSUSE
I85325179f1792d985b0375572abfe8c8a82fecc3 accidentally removed the
conditional branch required to prevent setup of horizon aborting on
openSUSE, so put it back in.

Change-Id: Ia3e4464a2d718e402d84a0bcf60f13ef30404969
2013-10-01 18:06:41 +01:00
Adam Spiers
15aa0fc315 Uniquify unsupported distro error message
Change a distro-not-supported error message in lib/horizon so that it
can't be confused with a similar error case in lib/apache.

Change-Id: I1197cb4de1497906e93a2c3ce09c3c06afe03b65
2013-10-01 18:05:08 +01:00
Jamie Lennox
5470701e10 Fix swift httpd on fedora
Implements a fedora equivalent of ubuntu's sites-enabled and moves
enabling of mod_wsgi to the installation period so that it doesn't have
to be handled in a platform dependant way later.

Fixes: bug 1226363
Change-Id: I85325179f1792d985b0375572abfe8c8a82fecc3
2013-09-24 10:48:01 +10:00
Akihiro MOTOKI
eaa9e1e3e0 Configure VPNaaS Horizon panel if q-vpn is enabled
Change-Id: I062fd31cb1de50f356c2c549a783d9c597b129fa
Closes-Bug: #1223012
2013-09-10 05:23:22 +09:00
Jenkins
440f746a04 Merge "Adds support for Openstack Networking FWaaS (Firewall)" 2013-08-29 16:27:56 +00:00
Attila Fazekas
248a8cce71 .conf suffix for the horizon config on Fedora
On Fedora by default the *.conf imported only from
the /etc/httpd/conf.d/.

Changing the default config name to horizon.conf with all
distribution in order to have a simple logic.

Change-Id: I08c3e825f697640fd73ac1f9c569f313abc3c04f
2013-08-16 18:26:46 +02:00
Jenkins
74af8ed00f Merge "enable apache2 server as front end for swift" 2013-08-02 12:24:11 +00:00
Edgar Magana
c973f1249a Set horizon configuration for security groups
Fix bug #1206271

Change-Id: I33a530265be1e5ab9181e605eb4b7c3bf1fdf9c4
2013-07-29 22:27:46 -07:00
zhang-hare
d98a5d0a58 enable apache2 server as front end for swift
1.install apache and wsgi module
2.config apache2 vhost and wsgi files for proxy,
account, container and object server.
3.refactor apache functions from horizon and swift
into lib/apache

Change-Id: I3a5d1e511c5dca1e6d01a1adca8fda0a43d4f632
Implements: blueprint enable-apache-frontend-for-swift
2013-07-29 11:15:21 +08:00
Ravi Chunduru
95c93e2b54 Adds support for Openstack Networking FWaaS (Firewall)
blueprint quantum-fwaas-devstack

Change-Id: I3c546433415ab18a5933a25774a06df7c4cb42e9
2013-07-17 00:39:31 -07:00
Nobuto MURATA
73a39bf2c6 replace left quantum string for enable_lb
writing the correct config for horizon to show LBaaS entry properly
like:

OPENSTACK_NEUTRON_NETWORK = {
    'enable_lb': True
}

Change-Id: I7f522a150a3732ee734f2b818910ff92c8c73028
Fixes: bug #1200098
2013-07-11 16:26:02 +09:00
Dean Troyer
1a6d4492e2 Periodic formatting cleanup
This is the semi-irregular comment and docs cleanup.

No functional changes should be here although some code is moved in a
small attempt to sort functions and get things where they need to be.

Change-Id: Ib4a3e2590c6fbd016c391acc7aef6421e91c0dca
2013-06-11 14:39:27 -05:00
Ian Wienand
2bda6cfabf Install nodejs for RHEL/Fedora
nodejs is required for Horizon (ships a copy of lessc internally).  I
couldn't find nodejs in the rpm list, despite it being installed in
lib/horizon.  This adds to the rpm list as NOPRIME and retains the old
install point.

RHEL6 has nodejs in EPEL now, so we remove the old hack that installed
an upstream version and add it to the install mentioned previously

Change-Id: Ib3ee2f7d77e22666c9055c8528288c01b46a95d3
2013-05-28 23:04:14 +00:00
JordanP
1e4587ef99 Clean up horizon apache logs on unstack
It feels like the right think to do. Moreover it will avoid to display
horizon errors from a previous devstack run that would be displayed because
of the tail -f in start_horizon()

Change-Id: Id1ab272e60e0733a4feef3b85029f438f2273cb0
2013-05-10 15:55:27 +02:00
Ian Wienand
ad43b3957e Grab upstream nodejs for RHEL6
RHEL6 has no nodejs in main packages or in EPEL.  The easiest way is
to just install the upstream binary version which works fine for the
very minimal usage by lesscss.

Change-Id: Ia35e7dbaf4c7add43797d6b7d0c846bab1cf0cb0
2013-04-29 16:21:54 +10:00
Sunil Thaha
627d9c77e5 Fixes running horizon on fedora 18 and above
Fixes bug: 1167066
Summary:

1. Starting with fedora 18 the httpd.conf has
    <Directory />
        AllowOverride none
        Require all denied
    </Directory>
  which requires you to explicitly permit access to web content
  directories in other <Directory> blocks

2. Install nodejs on fedora 18 and above

Change-Id: I487a7a74bad6627d32c1081dcbe48630a704a106
2013-04-15 23:24:36 +10:00
Dean Troyer
cc6b443545 Formatting cleanups, doc updates and whatnot
Change-Id: Ica8298353be22f947c8e8a03d8dc29ded9cb26dd
2013-04-09 14:05:32 -05:00
Sean Dague
584d90ec56 add emacs shell-script tagging
for files that don't start with a #! or end in .sh, the added tags
are nice for emacs users to automatically switch to the right mode.

Change-Id: If4b93e106191bc744ccad8420cef20e751cdf902
2013-03-29 14:36:49 -04:00
Akihiro MOTOKI
7104ab406a Use example settings in horizon repo as local_settings.py
The current horizon_settings.py in devstack is out-of-date and we
tend to forget to update this file. This commit changes devstack
to use the example settings in horizon repo.

Change-Id: I0bb6af21a806a72ed59f31b094dd21da85ca335e
2013-03-29 03:01:50 +09:00
Eugene Nikanorov
b663b33f51 Configures horizon lbaas dashboard
fixes bug 1151865

Change-Id: I1f2c7f7f11170571fe37a9cf5444d26c1c8de959
2013-03-12 13:34:48 +04:00
Steven Dake
532908f602 Remove error from httpd/apache on unstack.sh
Fedora/RHEL use httpd for the package name of httpd.  This is handled
in other parts of the horizon startup code, but not in shutdown.

Change-Id: I2732dad652d83a9cbe055f5f077678b7111ca782
Fixes: bug #1099538
2013-01-14 12:40:33 -07:00
Vincent Untz
f2a18c065e Two small fixes for openSUSE support
- Use right package files for openSUSE in tools/info.sh
- Use a2enmod to enable the wsgi apache module

Change-Id: I51e3019be32dc0938674c9c8d285a55f5b023707
2012-12-12 16:14:16 +01:00
Vincent Untz
00011c0847 Add is_fedora and exit_distro_not_supported functions
Between is_fedora, is_ubuntu and is_suse, we can make the code a bit
simpler to read. We also use exit_distro_not_supported to identify
places where we need implementation details for new distros.

As "/sbin/service --skip-redirect" is Fedora-specific, guard this with a
is_fedora test too.

Change-Id: Ic77c0697ed9be0dbb5df8e73da93463e76025f0c
2012-12-07 09:06:07 +01:00
Jenkins
fe89e72659 Merge "Add is_ubuntu function" 2012-12-05 19:47:03 +00:00
Jenkins
f99e75d366 Merge "Fix the default for APACHE_GROUP" 2012-12-05 19:43:26 +00:00
Vincent Untz
c18b965152 Add is_ubuntu function
This replaces all of the [[ "$os_PACKAGE" = "deb" ]] tests, except when
those tests are before straight calls to dpkg.

Change-Id: I8a3ebf1b1bc5a55d736f9258d5ba1d24dabf04ea
2012-12-04 18:30:13 +01:00
Jenkins
1cd8a4725b Merge "Add package names for openSUSE/SLE" 2012-12-04 17:18:44 +00:00
Martin Vidner
2ed63f4f8e Fix the default for APACHE_GROUP
It should be the group of the effective apache user.

For example, on openSUSE, we use wwwrun:www for apache and $USER:users
for users.

Change-Id: I8e12a8d90d45cfd18e67a41cf5462216ae404733
2012-12-04 10:35:53 +01:00
Sean Dague
e1864c37f3 enable mod_wsgi on horizon_init
on a clean ubuntu environment wsgi wasn't getting enabled
ensure that it actually turns on wsgi to that apache can start

Change-Id: I9c74f7c5d5d2f995843b2a649a52f7159c7de314
2012-11-29 14:20:34 -05:00
Vincent Untz
ca5c471386 Add package names for openSUSE/SLE
Change-Id: I487cc7b8bd228ff77c9881528e3395cbe3c43d4a
2012-11-28 16:26:53 +01:00
Vincent Untz
856a11e0e4 Add partial openSUSE/SLE support
Note that this is the first part of the support. A second part involves
dealing with the package names.

Among the changes:
 - add several functions to determine some distro-specific behavior (how
   to call usermod, if some features are available on the distro, etc.)
 - correctly detect openSUSE and SLE in GetOSVersion, and set DISTRO
   accordingly
 - new is_suse() function to check if running on a SUSE-based distro
 - use zypper to install packages
 - adapt apache virtual host configuration for openSUSE
 - some simple fixes (path to pip, mysql service name)

Change-Id: Id2f7c9e18a1c4a7b7cea262ea7959d183e4b0cf0
2012-11-28 16:22:12 +01:00
Sean Dague
b562e6a710 move horizon logic to lib to clean up stack.sh
pre holiday refactor extrodinare, get the horizon code
over fully into lib/horizon so that all these fixes aren't
scattered through stack.sh

Change-Id: I7f26c5c6708d5693048eb7b1ce792122adbc7351
2012-11-26 10:24:09 -05:00