Reminder: Do not include any PHI or PII in Confluence. If you require 508 accessibility assistance or any other support for this system, then please send an email to onc-jira-questions@healthit.gov
Introduction
This guide details the process for installing the Direct Certificate Discovery Tool (DCDT, or the Tool) from a version of the source code.
Requirements
See the 2.1 System Requirements Install Guide for instructions on how to prepare your system prior to installation of the Tool.
Building the Tool
Checkout the Sources
Use the Subversion CLI to checkout the desired version. Typically, the latest stable release tag should be used for deployments. To checkout this tag, run the following:
svn co http://direct-certificate-discovery-tool.googlecode.com/svn/tags/direct-certificate-discovery-tool-2.1-RELEASE ~/direct-certificate-discovery-tool
To checkout the trunk, run the following:
svn co http://direct-certificate-discovery-tool.googlecode.com/svn/trunk ~/direct-certificate-discovery-tool
Checkout the Sources for Development
To checkout the trunk for development (project membership required), run the following:
svn co --user=<user> https://direct-certificate-discovery-tool.googlecode.com/svn/trunk ~/direct-certificate-discovery-tool
Upon checkin, you will be prompted to enter your password. This is not your Google account password, but a string that Google Code has generated for you. It can be retrieved from your Google Code profile.
Build the Projects
Modify Assembly pom.xml Direct Project Stock Version
Before the project can be built, a small change must be made to ~/direct-certificate-discovery-tool/assembly/pom.xml file due to the fact that the dependency was removed after the DCDT release tag was created. Open that file in a text editor, search for the string "2.1-SNAPSHOT", and replace with the string "3.0.1". The direct-project-stock dependency should now look like this:
<artifactItem>
<groupId>org.nhind</groupId>
<artifactId>direct-project-stock</artifactId>
<version>3.0.1</version>
<type>tar.gz</type>
<includes>direct/apache-james-3.0-*/**,direct/apache-tomcat-*/webapps/*.war,direct/DirectDNSServices/**,direct/tools/**</includes>
<!--<excludes>direct/apache-tomcat-*/bin,direct/apache-tomcat-*/conf,direct/apache-tomcat-*/lib,direct/apache-tomcat-*/logs,direct/apache-tomcat-*/temp,direct/apache-tomcat-*/*,direct/james-*</excludes>-->
<outputDirectory>${project.build.directory}/direct-project-stock-tmp</outputDirectory>
</artifactItem>
Build the Projects and Assemblies
To build all of the Maven projects that comprise the Tool and generate assemblies, run the following:
cd ~/direct-certificate-discovery-tool/assembly
mvn clean compile package install
Build Individual Projects
To build all of the Maven projects that comprise the Tool without generating assemblies, run the following:
mvn clean compile package install
An aggregate Maven project exists in the parent directory of all of the Maven modules (direct-cert-discovery-all).
Running the previously mentioned command while in this directory will build all of the modules. In order to build individual modules, simply change your current directory to that of the module.
Note: Except for direct-cert-discovery-all and direct-cert-discovery-assembly, all other modules require that any dependency modules specific to the Tool are installed in the local Maven repository prior to the start of the build. Thus, it is usually preferable to build using the direct-cert-discovery-all module, as it will apply any goals recursively.
Add Tool Apt Repository
In order to resolve some dependent packages, you will need to add the Tool's Apt repository:
sudo add-apt-repository http://packages.direct-test.com/ubuntu/
sudo apt-get update
Install Tool Package
To install the tool package run:
sudo dpkg -i ~/direct-certificate-discovery-tool/assembly/target/direct-cert-discovery-tool-assembly-*.deb
Configure the Environment
Append the following lines to the global environment configuration file, /etc/environment:
DIRECT_HOME="/usr/share/direct"
DIRECT_VAR="/var/lib/direct"
Source and export the variables in the global environment configuration file by running:
. /etc/environment
export DIRECT_HOME DIRECT_VAR
Configure Tomcat
Stop the Tomcat 7 service by running:
sudo service tomcat7 stop
Modify the HTTP connector port by running:
sudo /usr/share/direct/direct-cert-discovery-tool-utils/bin/tomcat7-setport.sh
Append the following lines to the file /etc/default/tomcat7:
JAVA_HOME="/usr/lib/jvm/java-7-oracle"
JAVA_OPTS="-Djava.awt.headless=true -Xms512m -Xmx1536m -XX:+UseConcMarkSweepGC"
If the file /usr/share/tomcat7/bin/setenv.sh does not exist, create it by running:
sudo touch /usr/share/tomcat7/bin/setenv.sh
Append the following lines to the file /usr/share/tomcat7/bin/setenv.sh:
CATALINA_OPTS="$CATALINA_OPTS -XX:MaxPermSize=512m"
CATALINA_OPTS="$CATALINA_OPTS -Dderby.stream.error.file=$CATALINA_BASE/logs/derby.log"
CATALINA_OPTS="$CATALINA_OPTS -Ddcdt.config.dir=/var/lib/direct/direct-cert-discovery-tool/config"
CATALINA_OPTS="$CATALINA_OPTS -Ddcdt.log.dir=$CATALINA_BASE/logs"
Start the Tomcat 7 service by running:
sudo service tomcat7 start
Configure Direct DNS Services
Start the Direct DNS Server service by running:
sudo service DirectDNSServer start
Configure ApacheDS
Stop the ApacheDS default instance service by running:
sudo service apacheds-2.0.0-M10-default stop
Create the ApacheDS domain2ldap1 instance data by running:
sudo mkdir -p /var/lib/apacheds-2.0.0-M10/domain2ldap1/run
sudo cp -r /var/lib/apacheds-2.0.0-M10/default/conf/ /var/lib/apacheds-2.0.0-M10/domain2ldap1/conf/
sudo sed -i -r 's/^(ads\-systemport: )10(389|636)$/\111\2/g' /var/lib/apacheds-2.0.0-M10/domain2ldap1/conf/config.ldif
sudo chown -R apacheds:apacheds /var/lib/apacheds-2.0.0-M10/domain2ldap1
Create the ApacheDS domain2ldap1 instance service by running:
sudo cp /etc/init.d/apacheds-2.0.0-M10-default /etc/init.d/apacheds-2.0.0-M10-domain2ldap1
sudo sed -i -r 's/(apacheds \$1 )default/\1domain2ldap1/' /etc/init.d/apacheds-2.0.0-M10-domain2ldap1
Start both ApacheDS instance services by running:
sudo service apacheds-2.0.0-M10-default start
sudo service apacheds-2.0.0-M10-domain2ldap1 start
Further Steps
At this point the system contains all of the Tool's software components, but has not yet been made deployment domain-specific. To finalize the configuration, please follow the instructions in the Configuration Guide.