Skip to content

Commit

Permalink
BZ 751088 (refix): Conductor and configserver on the same box
Browse files Browse the repository at this point in the history
https://bugzilla.redhat.com/show_bug.cgi?id=751088

This patch changes the aeolus-configserver-setup script.  When the script
detects that conductor is already installed, the script will ensure that the
root context of the aeolus-configserver service is updated to match the root
context of the proxy pass settings in apache.

This change allows the oauth library in the aeolus-configserver service to
correctly decipher the encrypted payload because the request base path will
remain unaltered after the proxy pass.
  • Loading branch information
blomquisg committed Sep 27, 2012
1 parent 58643c6 commit b3e3237
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configserver/Rakefile
Expand Up @@ -24,7 +24,7 @@ require 'rake/clean'
require 'rubygems'
require 'rubygems/package_task'

version = '0.4.10'
version = '0.4.11'
man_section = '8'
pkg_name = 'aeolus-configserver'

Expand Down
9 changes: 8 additions & 1 deletion configserver/aeolus-configserver.spec.in
Expand Up @@ -17,7 +17,7 @@

Name: aeolus-configserver
Version: @VERSION@
Release: 2%{?dist}
Release: 1%{?dist}
Summary: The Aeolus Config Server

Group: Applications/System
Expand Down Expand Up @@ -137,6 +137,11 @@ install -m 0644 \
configure/puppet/modules/configserver/manifests/init.pp \
%{buildroot}%{app_root}/configure/puppet/modules/configserver/manifests

install -d %{buildroot}%{app_root}/configure/puppet/modules/configserver/templates
install -m 0644 \
configure/puppet/modules/configserver/templates/aeolus-configserver.conf.erb \
%{buildroot}%{app_root}/configure/puppet/modules/configserver/templates

install configure/bin/config_httpd.sh \
%{buildroot}%{_bindir}/aeolus-configserver-setup

Expand Down Expand Up @@ -186,6 +191,8 @@ fi
%doc COPYING

%changelog
* Tue Sep 20 2012 Greg Blomquist <gblomqui@redhat.com> 0.4.11-1
- refix: https://bugzilla.redhat.com/show_bug.cgi?id=751088
* Tue Aug 07 2012 Greg Blomquist <gblomqui@redhat.com> 0.4.10-2
- https://bugzilla.redhat.com/show_bug.cgi?id=782922
- https://bugzilla.redhat.com/show_bug.cgi?id=806053
Expand Down
5 changes: 4 additions & 1 deletion configserver/configure/bin/config_httpd.sh
Expand Up @@ -80,9 +80,11 @@ fi
## is this config server being installed alongside a conductor installation?
puppetclass="ssl"
root_context="/"
prefix="/"
if [ -d "/etc/httpd/conf.d/aeolus-conductor.d" ]; then
puppetclass="conductor"
root_context="/configserver/"
prefix="/configserver/"
else
echo "$PREAMBLE"
echo -n "Do you wish to continue [y/N]: "
Expand Down Expand Up @@ -122,7 +124,8 @@ parameters:
conductor_key: ${conductor_key}
conductor_secret: ${conductor_secret}
config_server_context: ${root_context}
config_server_url: http://localhost:4567/
config_server_prefix: ${prefix}
config_server_url: http://localhost:4567${prefix}
yaml"""
echo "$manifest" > $manifest_file
chmod 755 $manifest_file
Expand Down
Expand Up @@ -11,6 +11,18 @@
ensure => installed,
}

$config_server_prefix = $config_server_prefix ? {
'' => '/',
default => $config_server_prefix
}
file { "/etc/sysconfig/aeolus-configserver":
owner => 'root',
group => 'root',
content => template("configserver/aeolus-configserver.conf.erb"),
require => Package["configserver"],
notify => Service["configserver"],
}

file { "/var/lib/aeolus-configserver/":
ensure => directory,
owner => 'aeolus',
Expand Down
@@ -0,0 +1,60 @@
#
# Copyright [2011] [Red Hat, Inc.]
#
# 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.
#
# Settings overrides for /etc/init.d/aeolus-configserver
# Defaults shown for each config option

# Environment setting for rack (sinatra)
#RACK_ENV="${RACK_ENV:-production}"

# root directory of the Aeolus Config Server sinatra application
#CONFIG_SERVER_DIR="/usr/share/aeolus-configserver"

# location of rackup file to configure rack for Aeolus Config Server
# relative to the $CONFIG_SERVER_DIR
#CONFIG_SERVER_RACKUP="config.ru"

# thin server port
#CONFIG_SERVER_PORT="4567"

# thin log file for Aeolus Config Server
#THIN_LOG="/var/log/aeolus-configserver/thin.log"

# log file for application INFO and ERROR messages
#APPLICATION_LOG="/var/log/aeolus-configserver/configserver.log"

# thin pid file for Aeolus Config Server
#THIN_PID="/var/run/aeolus-configserver/thin.pid"

# thin lock file for Aeolus Config Server
#THIN_LOCKFILE="/var/lock/subsys/aeolus-configserver"

# thin server IP address
#THIN_IP="127.0.0.1"

# user and group under which Aeolus Config Server sinatra application runs
#AEOLUS_USER="aeolus"
#AEOLUS_GROUP="aeolus"

# thin server prefix (i.e., application context) for Aeolus Config Server
# sinatra application
PREFIX="<%= scope.lookupvar("configserver::config_server_prefix") %>"

# Directory where aeolus-configserver stores the instance configurations
#STORAGE_DIR="/var/lib/aeolus-configserver/configs"

# Location of Relax NG schema file for instance-config
# This can be a local file location or a URL (http://here.org/file.rng)
#INSTANCE_CONFIG_RNG="/var/lib/aeolus-configserver/schema/instance-config.rng"

0 comments on commit b3e3237

Please sign in to comment.