Differences between revisions 5 and 6
Revision 5 as of 2012-11-30 11:36:25
Size: 3511
Comment:
Revision 6 as of 2015-12-08 09:54:32
Size: 3288
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
'''Contents'''
<<TableOfContents(5)>>
'''Contents''' <<TableOfContents(5)>>
Line 4: Line 3:
This page contains some notes about management of {{{cocoon.zones.apache.org}}}. This page contains some notes about management of {{{cocoon-vm.apache.org}}}.
Line 7: Line 6:
Preconditions:
Line 8: Line 8:
Preconditions:
 1. someone with enough administrator rights on the jail created an user for you (as indicated in http://apache.org/dev/freebsd-jails.html)
 1. your SSH public key checked in at https://svn.apache.org/repos/infra/infrastructure/trunk/ssh_keys/people/
 1. someone from infrastructure listed you in {{{/etc/ssh/ssh_keys}}} on jail machine
 1. your SSH public key checked in at [[https://svn.apache.org/repos/infra/infrastructure/trunk/ssh_keys/people/|https://svn.apache.org/repos/infra/infrastructure/trunk]]
 1. fire a ticket on JIRA to infra to create an account for you
Line 16: Line 14:
alias mvn='/usr/local/share/java/maven3/bin/mvn' alias mvn=/opt/apache-maven-3.2.5/bin/mvn
Line 18: Line 16:
Line 20: Line 17:

Sources for application deployed in jail are available at https://svn.apache.org/repos/asf/cocoon/trunk/jail.
Sources for application deployed in jail are available at https://svn.apache.org/repos/asf/cocoon/trunk/jail and checked out in /usr/local/src/cocoon-jail/
Line 27: Line 23:
To build, cd under cocoon3 and launch
Line 28: Line 25:
To build, cd under cocoon3 and launch
Line 32: Line 28:
Line 34: Line 29:
Line 38: Line 32:
To build, cd under cocoon2.1 and launch
Line 39: Line 34:
To build, cd under cocoon2.1 and launch
Line 43: Line 37:
== Deployment ==
[[http://cocoon.zones.apache.org/|http://cocoon-vm.apache.org/]] is the base URL for reaching an Apache HTTPD 2.2 instance having:
Line 44: Line 40:
== Deployment ==  * document directory {{{/var/www}}}
 * configuration directory {{{/etc/apache22}}}
Line 46: Line 43:
http://cocoon.zones.apache.org/ is the base URL for reaching an Apache HTTPD 2.2 instance having:
 * document directory {{{/usr/local/www/apache22/data}}}
 * configuration directory {{{/usr/local/etc/apache22/httpd.conf}}}
This HTTPD instance is acting as a reverse proxy for an Apache Tomcat 7.0 instance having CATALINA_HOME at {{{/opt/apache-tomcat-7.0}}}.
Line 50: Line 45:
This HTTPD instance is acting as a reverse proxy for an Apache Tomcat 7.0 instance having CATALINA_HOME at {{{/usr/local/apache-tomcat-7.0}}}. The reverse proxy configuration is located at /etc/apache2/mods-enabled/proxy.conf
Line 52: Line 47:
The reverse proxy configuration is located at the end of HTTPD conf file, and it is something like
Line 67: Line 61:
Line 70: Line 63:
sudo cp index.html /usr/local/www/apache22/data sudo cp index.html /var/www
Line 72: Line 65:
=== Cocoon 3.0 samples ===
Once built,
Line 73: Line 68:
=== Cocoon 3.0 samples ===

Once built,
Line 77: Line 69:
sudo cp cocoon3-sample-webapp/target/cocoon3-sample-webapp-3.0.0-beta-1-SNAPSHOT.war /usr/local/apache-tomcat-7.0/webapps/cocoon3.war sudo cp cocoon3-sample-webapp/target/cocoon3-sample-webapp-3.0.0-beta-1-SNAPSHOT.war /opt/apache-tomcat-7.0/webapps/cocoon3.war
Line 79: Line 71:
Line 82: Line 73:
Line 83: Line 75:
sudo cp core/cocoon-webapp/target/cocoon-webapp.war /usr/local/apache-tomcat-7.0/webapps/cocoon22.war sudo cp core/cocoon-webapp/target/cocoon-webapp.war /opt/apache-tomcat-7.0/webapps/cocoon22.war
Line 85: Line 77:
Line 88: Line 79:
Line 89: Line 81:
sudo cp build/cocoon-2.1-samples.war /usr/local/apache-tomcat-7.0/webapps/cocoon21.war sudo cp build/cocoon-2.1-samples.war /opt/apache-tomcat-7.0/webapps/cocoon21.war
Line 91: Line 83:
Line 95: Line 86:
Due to a different handling of SAX parsers, you will need to remove any xercesImpl-*.jar and xml-apis-*.jar from /usr/local/apache-tomcat-7.0/webapps/*/WEB-INF/lib and put the most updated versions of the same JAR files under /usr/local/apache-tomcat-7.0/lib Due to a different handling of SAX parsers, you will need to remove any xercesImpl-*.jar and xml-apis-*.jar from /opt/apache-tomcat-7.0/webapps/*/WEB-INF/lib and put the most updated versions of the same JAR files under /opt/apache-tomcat-7.0/lib
Line 97: Line 88:
== Service management ==
Use standard Ubuntu way, i.e.
Line 98: Line 91:
== Service management ==

Use standard FreeBSD way, i.e.
Line 102: Line 92:
sudo service apache22 [start | status | stop] sudo service apache2 [start | status | stop]
Line 105: Line 95:
Line 106: Line 97:
sudo service tomcat7 [start | status | stop] sudo service tomcat [start | status | stop]
Line 108: Line 99:

All configurations go in {{{/etc/rc.conf}}}.
Line 114: Line 102:
After [[https://issues.apache.org/jira/browse/INFRA-4685|INFRA-4685]], a script /usr/local/bin/restartCocoonServices.sh has been configured (via /etc/crontab) to restart apache22 and tomcat7 services every two hours. After [[https://issues.apache.org/jira/browse/INFRA-4685|INFRA-4685]], a script /usr/local/bin/restartCocoonServices.sh has been configured (via /etc/crontab) to restart apache2 and tomcat services once a day.

Contents

This page contains some notes about management of cocoon-vm.apache.org.

SSH Access

Preconditions:

  1. your SSH public key checked in at https://svn.apache.org/repos/infra/infrastructure/trunk

  2. fire a ticket on JIRA to infra to create an account for you

Environment setup

Maven 3.0

alias mvn=/opt/apache-maven-3.2.5/bin/mvn

Application sources

Sources for application deployed in jail are available at https://svn.apache.org/repos/asf/cocoon/trunk/jail and checked out in /usr/local/src/cocoon-jail/

Index page

No need to build anything, plain HTML page.

Cocoon 3.0 samples

To build, cd under cocoon3 and launch

mvn clean package

Cocoon 2.2 samples

Please follow instructions contained in cocoon2.2/README.

Cocoon 2.1 samples

To build, cd under cocoon2.1 and launch

ant clean cocoon:get webapp war

Deployment

http://cocoon-vm.apache.org/ is the base URL for reaching an Apache HTTPD 2.2 instance having:

  • document directory /var/www

  • configuration directory /etc/apache22

This HTTPD instance is acting as a reverse proxy for an Apache Tomcat 7.0 instance having CATALINA_HOME at /opt/apache-tomcat-7.0.

The reverse proxy configuration is located at /etc/apache2/mods-enabled/proxy.conf

        <Location "/cocoon21">
                ProxyPass http://localhost:8080/cocoon21
                ProxyPassReverse http://localhost:8080/cocoon21
        </Location>
        <Location "/cocoon22">
                ProxyPass http://localhost:8080/cocoon22
                ProxyPassReverse http://localhost:8080/cocoon22
        </Location>
        <Location "/cocoon3">
                ProxyPass http://localhost:8080/cocoon3
                ProxyPassReverse http://localhost:8080/cocoon3
        </Location>

Index page

sudo cp index.html /var/www

Cocoon 3.0 samples

Once built,

sudo cp cocoon3-sample-webapp/target/cocoon3-sample-webapp-3.0.0-beta-1-SNAPSHOT.war /opt/apache-tomcat-7.0/webapps/cocoon3.war

Cocoon 2.2 samples

Once built,

sudo cp core/cocoon-webapp/target/cocoon-webapp.war /opt/apache-tomcat-7.0/webapps/cocoon22.war

Cocoon 2.1 samples

Once built,

sudo cp build/cocoon-2.1-samples.war /opt/apache-tomcat-7.0/webapps/cocoon21.war

Note

Due to a different handling of SAX parsers, you will need to remove any xercesImpl-*.jar and xml-apis-*.jar from /opt/apache-tomcat-7.0/webapps/*/WEB-INF/lib and put the most updated versions of the same JAR files under /opt/apache-tomcat-7.0/lib

Service management

Use standard Ubuntu way, i.e.

sudo service apache2 [start | status | stop]

and

sudo service tomcat [start | status | stop]

Note

After INFRA-4685, a script /usr/local/bin/restartCocoonServices.sh has been configured (via /etc/crontab) to restart apache2 and tomcat services once a day.

JailManagement (last edited 2015-12-08 09:54:32 by FrancescoChicchiricco)