-
Notifications
You must be signed in to change notification settings - Fork 2
SolarSSH Deployment Guide
This guide describes how to deploy the SolarSSH server application. SolarSSH is designed to be easily deployed into the cloud or onto private infrastructure. As SolarSSH builds on top of the SolarNetwork API, it can be deployed outside the core SolarNetwork infrastructure and customized to suit other needs.
The application is a Java web application, and requires a Servlet 3.1 or higher servlet container to run in. It requires Java 8 or higher.
Additionally, any SolarNode that will work with SolarSSH must be configured to support it. Recent standard SolarNode images are already configured to support SolarSSH running on ssh.solarnetwork.net. See the SolarNode SolarSSH setup guide for more details.
The runtime can be configured using properties provided in the following ways:
- JNDI servlet environment settings, available at
java:config/env
. In Tomcat this can be provided via acontext.xml
file. There is an example of this in theconfig/example
directory. - JVM system properties, by passing on the command line. For example
-Dssh.host=ssh.example.com
. - A classpath
application-test.properties
file, added to the build at compile time. This can be useful during development, to tweak the settings to suit the developer. This resource is not checked into source control, so it must be created by the developer. - A classpath
application.properties
file, added to the build at compile time. This is provided by default and serves as the default runtime settings.
Logging is handled by Logback, controlled via a classpath logback.xml
resource added to the build at compile time. The app maintains two log files:
logs/solarssh.log
logs/solarssh-audit.log
The first contains general log messages, while the audit
log
contains just auditing information about sessions.
Both logs are configured to rotate based on a maximum size of 2MB, with 21 total log files persisted before deleting the oldest.
Another classpath resource, logback-test.xml
can be added, which
will take precedence over the logback.xml
file. That resource is
not checked into source control, so developers can create that resource to suit
their preferences.
The project uses Gradle for builds. From the command line, run
./gradlew build
to perform a full build. That will produce a WAR
file like build/libs/solarssh-X.war
where X
is the
application version.
The project also supports the Eclipse IDE, as long as the Buildship plugin is installed. Simply import the project into Eclipse, and you can then deploy the app into a servlet 3.1 runtime, like Tomcat 8.5.