[evlatests] eliminating evlamon & lando-new, technical details
Bill Sahr
bsahr at nrao.edu
Mon Sep 9 18:29:37 EDT 2013
Earlier today I posted a notice to several of the listservers
concerning the need to eliminate references to the dbase name
"evlamon" and the machine name "lando-new".
Given below are some of the technical details for doing so.
The connection parameters for connection to evlampts via
the host machine alias evlampt-proddb, phrased in terms of
Java, are:
private String dbName = "evlampts";
private String jdbcDriver = "org.postgresql.Driver";
private String dbHost = "evlampt-proddb";
private String jdbcPort = "5432";
//(dbURL = “jdbc:postgresql//evlampt-proddb:5432/evlaparm”)
private String dbURL = "jdbc:postgresql://" + dbHost + ":"
+ jdbcPort + "/" + dbName;
// This username provides read-only access
private String username = "mptdata_r";
private String password = "xxxxxxxx";
Please email me if you need the password.
If you are converting from evlamon, then you will also need the
library containing the JDBC driver.
If you use maven for the build:
The maven dependency for the JDBC driver is:
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.0-801.jdbc4</version>
</dependency>
The dependency references postgresql-9.0-801.jdbc4.jar. Later versions
are available. The latest, as of September 2013, is postgresql
9.2-1003.jdbc4. The drivers can be obtained from:
http://jdbc.postgresql.org/index.html#welcome
If you are compiling in the EVLA software development environment, the
repository specified in version 3.2.1 of the parent pom contains
postgresql-9.0-801.jdbc4. The repository specification in that parent
pom is:
<repositories>
<repository>
<id>nrao-maven3-local-repository</id>
<name>nrao-maven3-local-repository</name>
<layout>default</layout>
<url>https://builder.aoc.nrao.edu/maven/m2-repo/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
For those of you working in the EVLA monitor & control environment,
during the evla parameters dbase conversion, Barry stashed a copy
of postgresql-9.0-801.jdbc4.jar in /home/mchost/evla/lib, and sym
linked it to postgresql.jar. It's still there as of the time I'm
writing this post, but do not consider that location to be permanent
or reliable.
Sample Java code & a maven pom.xml file to build it are available
on request.
If you do not use maven for your builds, then I assume you have your
own system and know how to integrate the jar file into it.
If you are working in C, I have no answers for you. It's been many,
many years since I worked in C & I'm not in a position to research
the matter.
If you work in python, Daniel Lyons asked the sysadmins to install
psycopg2 and make it available everywhere, which they seem to have
done. For more info on psycopg, see http://www.initd.org/psycopg/.
Basically, Daniel Lyons & I are the points of contact for this matter.
If you have questions or issues, contact one of us & we'll try.
Thanks.
Bill Sahr
More information about the evlatests
mailing list