summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-06-13 18:43:31 +0200
committerRemi Collet <fedora@famillecollet.com>2012-06-13 18:43:31 +0200
commit0c258a9fecac1daed409fc5ac5ee9949b461a6c3 (patch)
tree03f026c1a542538643172898ea997ece15de641a
reorg repoHEADmaster
-rw-r--r--Makefile4
-rw-r--r--README.fedora33
-rw-r--r--mod_cluster-1.2.1.Final-pom.patch12
-rw-r--r--mod_cluster.conf14
-rw-r--r--mod_cluster.spec224
5 files changed, 287 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1e65467
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../common/Makefile
+
diff --git a/README.fedora b/README.fedora
new file mode 100644
index 0000000..e662b7b
--- /dev/null
+++ b/README.fedora
@@ -0,0 +1,33 @@
+= Enabling mod_cluster =
+
+Detailed information about configuring mod_cluster can be found here:
+
+ http://docs.jboss.org/mod_cluster/1.2.0/html/native.config.html
+
+== Disable proxy_balancer_module (required) ==
+
+To enable mod_cluster you need to make sure you have proxy_balancer_module disabled. Please comment out the loading of proxy_balancer_module in /etc/httpd/conf/httpd.conf:
+
+# LoadModule proxy_balancer_module
+
+== Enable mod_cluster modules (required) ==
+
+Next step is to load all required mod_cluster modules. Uncomment all LoadModule directives from
+/etc/httpd/conf.d/mod_cluster.conf file:
+
+LoadModule slotmem_module modules/mod_slotmem.so
+LoadModule proxy_cluster_module modules/mod_proxy_cluster.so
+LoadModule advertise_module modules/mod_advertise.so
+LoadModule manager_module modules/mod_manager.so
+
+== Enabling mod_cluster manager (optional) ==
+
+Mod_cluster manager is a simple tool that displays useful information about the cluster. To enable it you need to load the mod_manager module and call SetHandler for the selected context:
+
+<Location /mod_cluster_manager>
+ SetHandler mod_cluster-manager
+</Location>
+
+== Restart ==
+
+Make sure you restart the htttpd server after you apply these changes.
diff --git a/mod_cluster-1.2.1.Final-pom.patch b/mod_cluster-1.2.1.Final-pom.patch
new file mode 100644
index 0000000..22398f2
--- /dev/null
+++ b/mod_cluster-1.2.1.Final-pom.patch
@@ -0,0 +1,12 @@
+diff --git a/pom.xml b/pom.xml
+index cadb9bb..dcb92e0 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -206,7 +206,6 @@
+ <module>container-spi</module>
+ <module>core</module>
+ <module>container</module>
+- <module>demo</module>
+ </modules>
+ </profile>
+ <profile>
diff --git a/mod_cluster.conf b/mod_cluster.conf
new file mode 100644
index 0000000..7bcf2b5
--- /dev/null
+++ b/mod_cluster.conf
@@ -0,0 +1,14 @@
+#
+# This is mod_cluster module configuration file. Please refer to
+# mod_cluster README for more information on how to enable mod_cluster.
+#
+# LoadModule slotmem_module modules/mod_slotmem.so
+# LoadModule proxy_cluster_module modules/mod_proxy_cluster.so
+# LoadModule advertise_module modules/mod_advertise.so
+# LoadModule manager_module modules/mod_manager.so
+#
+# MemManagerFile /var/cache/httpd
+#
+# <Location /mod_cluster_manager>
+# SetHandler mod_cluster-manager
+# </Location>
diff --git a/mod_cluster.spec b/mod_cluster.spec
new file mode 100644
index 0000000..8c1cbf1
--- /dev/null
+++ b/mod_cluster.spec
@@ -0,0 +1,224 @@
+%if 0%{?fedora} >= 17
+%global with_java 1
+%else
+%global with_java 0
+%endif
+
+%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
+%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel)}}
+%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}}
+# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
+%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
+
+%global namedreltag .Final
+%global namedversion %{version}%{?namedreltag}
+
+Summary: Apache HTTP load balancer
+Name: mod_cluster
+Version: 1.2.1
+Release: 2%{?dist}
+License: LGPLv2
+URL: http://jboss.org/mod_cluster
+Group: System Environment/Daemons
+
+# svn export http://anonsvn.jboss.org/repos/mod_cluster/tags/1.2.1.Final/ mod_cluster-1.2.1.Final
+# tar cafJ mod_cluster-1.2.1.Final.tar.xz mod_cluster-1.2.1.Final
+Source: mod_cluster-%{namedversion}.tar.xz
+
+Source1: mod_cluster.conf
+Source2: README.fedora
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: mod_cluster-%{namedversion}-pom.patch
+
+Requires: httpd >= 2.2.8
+Requires: httpd-mmn = %{_httpd_mmn}
+
+%if %{with_java}
+BuildRequires: maven
+BuildRequires: maven-enforcer-plugin
+BuildRequires: jboss-parent
+BuildRequires: jpackage-utils
+BuildRequires: java-devel
+BuildRequires: jcip-annotations
+BuildRequires: jboss-logging
+BuildRequires: jboss-servlet-3.0-api
+BuildRequires: jboss-web
+%endif
+BuildRequires: httpd-devel >= 2.2.8
+BuildRequires: autoconf
+BuildRequires: make
+BuildRequires: gcc
+BuildRequires: tomcat-lib
+
+%description
+Mod_cluster is an httpd-based load balancer. Like mod_jk and mod_proxy,
+mod_cluster uses a communication channel to forward requests from httpd to one
+of a set of application server nodes. Unlike mod_jk and mod_proxy, mod_cluster
+leverages an additional connection between the application server nodes and
+httpd. The application server nodes use this connection to transmit server-side
+load balance factors and lifecycle events back to httpd via a custom set of
+HTTP methods, affectionately called the Mod-Cluster Management Protocol (MCMP).
+This additional feedback channel allows mod_cluster to offer a level of
+intelligence and granularity not found in other load balancing solutions.
+
+%if %{with_java}
+%package java
+Summary: Java bindings for %{name}
+Group: Development/Libraries
+Requires: jpackage-utils
+Requires: jcip-annotations
+Requires: jboss-logging
+Requires: jboss-servlet-3.0-api
+
+%description java
+This package contains Java part of %{name}.
+
+%package javadoc
+Summary: Javadocs for %{name}
+Group: Documentation
+Requires: jpackage-utils
+
+%description javadoc
+This package contains the API documentation for %{name}.
+%endif
+
+%prep
+%setup -q -n mod_cluster-%{namedversion}
+%patch0 -p1
+
+%build
+CFLAGS="$RPM_OPT_FLAGS"
+export CFLAGS
+
+module_dirs=( advertise mod_manager mod_proxy_cluster mod_slotmem )
+
+for dir in ${module_dirs[@]} ; do
+ pushd native/${dir}
+ sh buildconf
+ ./configure --libdir=%{_libdir} --with-apxs=%{_httpd_apxs}
+ make %{?_smp_mflags}
+ popd
+done
+
+%if %{with_java}
+# Build the AS7 required libs
+# Tests skipped because of lack of mockito library
+mvn-rpmbuild -Dmaven.test.skip=true -P AS7 install javadoc:aggregate
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/httpd/modules
+install -d -m 755 $RPM_BUILD_ROOT/etc/httpd/conf.d
+%if %{with_java}
+install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
+install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
+%endif
+
+module_dirs=( advertise mod_manager mod_proxy_cluster mod_slotmem )
+
+for dir in ${module_dirs[@]} ; do
+ pushd native/${dir}
+ cp ./*.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules
+ popd
+done
+
+cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/conf.d/
+
+install -m 0644 %{SOURCE2} README
+
+%if %{with_java}
+# JAR
+cp -p core/target/mod_cluster-core-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/core.jar
+cp -p container/catalina/target/mod_cluster-container-catalina-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/container-catalina.jar
+cp -p container/jbossweb/target/mod_cluster-container-jbossweb-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/container-jbossweb.jar
+cp -p container-spi/target/mod_cluster-container-spi-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/container-spi.jar
+
+# APIDOCS
+cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+
+# POM
+install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-parent.pom
+install -pm 644 core/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-core.pom
+install -pm 644 container/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-container.pom
+install -pm 644 container-spi/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-container-spi.pom
+install -pm 644 container/catalina/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-container-catalina.pom
+install -pm 644 container/jbossweb/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-container-jbossweb.pom
+
+# DEPMAP
+%add_maven_depmap JPP.%{name}-parent.pom
+%add_maven_depmap JPP.%{name}-core.pom %{name}/core.jar
+%add_maven_depmap JPP.%{name}-container-spi.pom %{name}/container-spi.jar
+%add_maven_depmap JPP.%{name}-container.pom
+%add_maven_depmap JPP.%{name}-container-jbossweb.pom %{name}/container-jbossweb.jar
+%add_maven_depmap JPP.%{name}-container-catalina.pom %{name}/container-catalina.jar
+%endif
+
+
+%clean
+rm -Rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc README
+%doc lgpl.txt
+%{_libdir}/httpd/modules/mod_advertise.so
+%{_libdir}/httpd/modules/mod_manager.so
+%{_libdir}/httpd/modules/mod_proxy_cluster.so
+%{_libdir}/httpd/modules/mod_slotmem.so
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
+
+%if %{with_java}
+%files javadoc
+%{_javadocdir}/%{name}
+%doc lgpl.txt
+
+%files java
+%{_mavenpomdir}/*
+%{_mavendepmapfragdir}/*
+%{_javadir}/*
+%doc lgpl.txt
+%endif
+
+
+%changelog
+* Sat Jun 09 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.2.1-2
+- rebuild for remi repo and httpd 2.4
+
+* Tue Jun 05 2012 Marek Goldmann <mgoldman@redhat.com> - 1.2.1-2
+- Added missing container.pom
+
+* Sat May 12 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.2.1-1
+- rebuild for remi repo and httpd 2.4
+
+* Mon May 07 2012 Marek Goldmann <mgoldman@redhat.com> - 1.2.1-1
+- Upstream release 1.2.1.Final
+- Port to httpd 2.4, RHBZ#813871
+
+* Sat Mar 31 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.1.1-4
+- rebuild for remi repo and httpd 2.4
+
+* Wed Mar 28 2012 Marek Goldmann <mgoldman@redhat.com> - 1.2.0-1
+- Upstream release 1.2.0.Final
+- Add java subpackage with AS7 required jars
+
+* Tue Mar 27 2012 Marek Goldmann <mgoldman@redhat.com> - 1.1.1-4
+- Require httpd-mmn RHBZ#803068
+
+* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Fri Mar 11 2011 Marek Goldmann <mgoldman@redhat.com> - 1.1.1-2
+- Another round of cleanup in spec file
+- Patch that disables compilation-time warnings
+
+* Thu Mar 10 2011 Marek Goldmann <mgoldman@redhat.com> - 1.1.1-1
+- Upstream release 1.1.1
+- Cleanup in spec file
+
+* Fri Nov 12 2010 Marek Goldmann <mgoldman@redhat.com> - 1.1.0-1
+- Initial release
+