Skip to content

Instantly share code, notes, and snippets.

@mheiges
Last active June 17, 2016 02:21
Show Gist options
  • Save mheiges/b6a5e3644d487f73bad8fcc47bb2e432 to your computer and use it in GitHub Desktop.
Save mheiges/b6a5e3644d487f73bad8fcc47bb2e432 to your computer and use it in GitHub Desktop.

Using Tomcat8 instance on ebrc-webdev 0.0.6

Start the Tomcat8 instance

sudo instance_manager enable Tomcat8

$ instance_manager manage Tomcat8 list
OK - Listed applications for virtual host localhost
/:running:0:/usr/local/tomcat_instances/shared/webapps/ROOT
/jolokia:running:0:jolokia
/manager:running:0:/usr/local/apache-tomcat-8.0.35/webapps/manager

Install directories and apache configuration

Pick your desired hostname and product

HOSTNAME=sa.vm.cryptodb.org

cd

rm -f installWdkSite_*.prop

echo y | installWdkSite

OWNER=vagrant; iws-proper installWdkSite_*.prop ${HOSTNAME}/cryptodb.sa && \
  perl -pi -e "s/BASIC_AUTH_REQUIRED=.*/BASIC_AUTH_REQUIRED=no/" installWdkSite_*.prop && \
  perl -pi -e "s/OWNER=.*/OWNER=$OWNER/" installWdkSite_*.prop && \
  perl -pi -e "s/PRODUCT=.*/PRODUCT=CryptoDB/" installWdkSite_*.prop  && \
  perl -pi -e "s/TOMCAT_INSTANCE=.*/TOMCAT_INSTANCE=Tomcat8/" installWdkSite_*.prop && \
  perl -pi -e "s/TOMCAT_MAJOR_VERSION=.*/TOMCAT_MAJOR_VERSION=8/" installWdkSite_*.prop

Patch apache configuration to proxy to non-default Tomcat instance

Copy/paste as is

sudo ed /etc/httpd/conf/enabled_sites/${HOSTNAME}.conf << "END"
37i
<Perl>
@JkMount = (
    [ "/$VH::Webapp/*" => "Tomcat8" ],
    [ "/$VH::Webapp"   => "Tomcat8" ],
    [ "/axis/*"        => "Tomcat8" ],
    [ "/axis"          => "Tomcat8" ],
);
push @SetEnv, [
    [ 'TOMCAT_INSTANCE' => 'Tomcat8' ],
];
</Perl>
.
w
q
END

Checkout source code

use your own login name and desired /dashboard provider

ssh -l mheiges santol.gacrc.uga.edu 'curl -s integrate.cryptodb.org/dashboard/xml/svn/checkout/value' | /bin/sh

Rebuilder with non-default tomcat instance

Note the --webapp option

rebuilder ${HOSTNAME} \
  --webapp Tomcat8:cryptodb.sa \
  --non-interactive \
  --configure-with /var/www/${HOSTNAME}/etc/metaConfig.yaml \
  --reinstall-config \
  --color \
  --skip-svn-update \
  --gusjvmopts "-Dlog4j.configuration=file:/var/www/${HOSTNAME}/gus_home/config/log4j.nolog.properties"

Using cattail with non-default Tomcat instance

Note the instance name option

cattail -ct sa.vm.cryptodb.org Tomcat8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment