Wiki source for AdminDeploy


Show raw source

======Deploying Admin======

1) After checking out admin, set ##$ADMIN_HOME## the root directory where the ##build.xml## is located.
1) Set ##$TOMCAT_HOME## to the location of tomcat. On Linux, that's usually ##/usr/share/tomcat##. It should contain directories(or symlinks to directories) like ##webapps##, ##logs##, and ##conf##.
1) ##$JAVA_HOME## should be configured to point to JDK directory.
1) ##$ANT_HOME## should point to the ant executable, if not in $PATH.
1) Copy the ##spring.properties## template to it's permanent location. ##cp $ADMIN_HOME/WEB-INF/src/spring.properties.tpl $ADMIN_HOME/WEB-INF/src/spring.properties##
1) Update ##spring.properties## configuration to fit your environment.
1) Generate the tomcat keystore with 'montana' as the password(for local dev): ##$JAVA_HOME/bin/keytool -genkey -alias admin.votesmart.org -keyalg RSA -keystore $TOMCAT_HOME/conf/pvskeystore##
1) Update ##$TOMCAT_HOME/conf/server.xml## with the information in the section [[server.xml]]
1) Get the libraries in WEB-INF/lib that aren't in the repos from another system.
1) Change directory to $ADMIN_HOME, type ant and return. This will compile and deploy the project for the first time.
1) Start the Tomcat server
1) The server should be started without any error message, open up browser and type 'http://localhost:8080/admin' a login page should be displayed, type 'guest' as username 'guest' as password, you should be logged in.

At this point, development environment has been setup correctly.

Use 'ant test' for running JUnit tests.

Use 'ant jr' to build jasper reports.

'ant clean', 'ant deploy', 'ant jsp', etc. Look at build.xml

=====server.xml=====

Make sure you have an SSL Connector setup with the keystore we have setup. For a development environment, you may want to lower the thread counts to save resources.

%%(xml)
<Connector
port="8443" minSpareThreads="5" maxSpareThreads="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="relative/path/to/keystore" keystorePass="[password]"
/>
%%

We also need a ##JDBCRealm## setup. It should look like the following, updated with your connection information:

%%(xml)
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.postgresql.Driver"
connectionURL="jdbc:postgresql://[servername]/pvsadmin"
connectionName="[username]"
connectionPassword="[password]"
digest="MD5" userTable="public.user" userNameCol="user_id" userCredCol="password"
userRoleTable="user_role" roleNameCol="role_id"/>
%%


----
CategoryITDocs
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki