Git Product home page Git Product logo

stratus's Introduction

Gitter Build Status

This project is no longer maintained

Stratus

Stratus is a Spring Boot packaging of Geoserver (currently targeting 2.16) that is designed for Enterprise/Cloud deployments. Due to the magic of Spring and Maven, Stratus doesn't actually change any of the core code of the GeoServer community project. It instead declares (some) of those modules as dependencies and rewires parts of the runtime configuration to use custom pieces.

Stratus has the following main differences from community GeoServer:

  • The web administration interface has been removed from all Stratus instances in the cluster. A single instance with the web UI will be deployed for times when the administrative tasks need to be performed with the UI.
  • The standard XML file based catalog and resource stores are replaced with a Redis based ones. They intentionally do not cache any resources but instead fetch configuration from the catalog on each request. Ideally this renders Stratus stateless and scalable.
  • Stratus uses an embedded Tomcat 8 rather than building a WAR file (however it is still possible to build one)

Contents:

Building Stratus:

Prerequisites:

  • Maven 3
  • Java 8+
  • Docker

Build

Build Stratus jar using:

cd src
mvn clean install -DskipTests

If you wish to enable GDAL support in Stratus, build using:

cd src
mvn clean install -Dgdal

Build Stratus docker image using:

cd src/stratus-application
mvn docker:build

To enable GDAL support while running Strats in docker, you must first build the custom docker base image which includes the GDAL binaries:

cd build/docker/amazonlinux-gdal-py-java11
docker build -t amazonlinux-gdal-py-java11 .

The GDAL-enabled Stratus docker image can then be built using:

cd src/stratus-application
mvn docker:build -Dgdal

For more details on building and developing Stratus, refer to the stratus-application submodule.

Eclipse:

Stratus makes extensive use of Lombok, download from https://projectlombok.org/download and run java -jar lombok.jar to launch the installer. Restart eclipse and run Project/clean/clean all projects.

Running Stratus locally:

Requires: Java 8, Local Redis instance

The Stratus jar can be executed with the command java -jar stratus.jar.

Alternatively, you can run Stratus from source from the stratus-application subfolder using mvn spring-boot:run.

Redis is the only dependency required for Stratus to run. By default, it will attempt to connect to a Redis server at localhost:6379.

The deploy/standalone directory contains several useful scripts to start various supporting services, including Redis, PostGIS, and Stratus itself.

By default, Stratus will start with a configuration that excludes all web components and backup/restore dependencies. To enable the web admin UI, be sure to set the property stratus.admin-enabled or environment variable STRATUS_ADMIN_ENABLED to true.

Profiles

By default, Stratus will start using the redis-manual profile which will attempt to connect to a single Redis host.
The following profiles are available:

Profile Description
jedis-manual Attempts to connect to a single Redis instance using the Jedis client
lettuce-manual Attempts to connect to a single Redis instance using the Lettuce client
jedis-sentinel Attempts to connect to a Redis Sentinel host using the Jedis client
lettuce-sentinel Attempts to connect to a Redis Sentinel host using the Lettuce client
jedis-cluster Attempts to connect to a Redis Cluster using the Jedis client
lettuce-cluster Attempts to connect to a Redis Cluster using the Lettuce client
jedis-aws-tag-discovery Attempts to connect to Redis using metadata provided by AWS tags using the Jedis client
lettuce-aws-tag-discovery Attempts to connect to Redis using metadata provided by AWS tags using the Lettuce client
cloud Used by PCF to connect to a Redis service

Startup Properties/Parameters

By default, running Stratus with no parameters will attempt to connect to a single Redis host on localhost:6379. The following configuration properties can be specified as command line parameters or environment variables.

Property Shortcut Profile Default Value Description
stratus.catalog.redis.manual.host redis-host {jedis/lettuce}-manual localhost The Redis host to connect to.
stratus.catalog.redis.manual.port redis-port {jedis/lettuce}-manual 6379 The Redis port to connect to.
stratus.catalog.redis.manual.database redis-database {jedis/lettuce}-manual 0 The Redis database to connect to.
stratus.catalog.redis.sentinel.master sentinel-master {jedis/lettuce}-sentinel mymaster The name of the Sentinel master.
stratus.catalog.redis.sentinel.hosts sentinel-hosts {jedis/lettuce}-sentinel localhost:26379 A list of Sentinel hosts.
stratus.catalog.redis.cluster.hosts cluster-hosts {jedis/letuce}-cluster localhost:6379 A list of Redis cluster nodes.

Passing in custom properties depends on how you are running Stratus. Below are examples using java and maven from the command line:

Set the active profile:

  • java: java -jar -Dspring.profiles.active=redis-sentinel stratus.jar
  • maven: mvn spring-boot:run -Dspring-boot.run.profiles=lettuce-sentinel

Set the server port:

  • java: java -jar -Dserver.port=8081 stratus.jar
  • maven: mvn spring-boot:run -Dserver.port=8081

In addition, properties can be set via environment variables. The variable names should follow the following rules:

  • Strictly use all uppercase
  • Replace all periods in the property path with underscores
  • Separate camelcase variables with underscore where the case changes

Example:

Stratus Property Name Environment Variable Name
test TEST
spring.profiles.active SPRING_PROFILES_ACTIVE
sentinel-master SENTINEL_MASTER
stratus.catalog.redis.caching.useParallelQueries STRATUS_CATALOG_REDIS_CACHING_USE_PARALLEL_QUERIES

Releasing Stratus

Update the Changelog

Before performing a release, update the CHANGELOG and whatsnew.rst with details of the release.

  1. Add a new heading for the version being released.

  2. If you are performing a major or minor release:

    i. Add a Summary subsection with the highlights of the release. Any migration notes should also be included in this section. ii. Add a Changes subsections to list individual changes (git log --oneline $PREVIOUS_RELEASE_TAG..HEAD should provide a good basis for the list). Further seperate this list into Version Updates, New Features, and Bugfixes.

  3. If you are performing a patch release, instead just list the changes, without any subsections. This should be pretty short, or else you probably shouldn't be doing a patch release.

  4. Update build.properties and banner.txt with the version of the new release.

  5. Push the updated files to master.

Jenkins Release (Recommended)

Stratus is released using Jenkins, via the stratus-release job. When run, this job will:

  • Run all tests.
  • Remove -SNAPSHOT from the project version
  • Commit and Tag in git with v${version}.
  • Increment the patch version by one, and add -SNAPSHOT back onto the version.
  • Commit.
  • Push commits and tag to the gsstratus/stratus repository.
  • Trigger a new run of stratus-deploy-all against the released tag, which will create Docker images and push them to Docker Hub.

Jenkins configuration is managed in deploy/jenkins.

Local Release (Not Recommended)

Requires:

To run the release process locally, you can use the command:

mvn release:prepare --batch-mode -Dtag=$GIT_TAG -DreleaseVersion=$RELEASE_VERSION -DdevelopmentVersion=$DEVELOPMENT_VERSION

Where:

  • $GIT_TAG - The tag for the release, to be pushed to git. Usually of the form v1.2.0
  • $RELEASE_VERSION - The maven version for the release, usualy of the form 1.2.0
  • $DEVELOPMENT_VERSION - The maven version to update master to, usually of the form 1.2.1-SNAPSHOT.

(For more information on tagging and version guidlines, refer to tagging.md)

This will do everything the stratus-release job does except for building and deploying the docker images. To deploy the release, checkout the newly created release tag, cd to the stratus-application submodule and follow the instructions for deploying with docker.

Verify the Release

After running the release job:

  1. Verify the new git tag is listed at https://github.com/planetlabs/stratus/releases.

  2. Still on GitHub, click Draft a new release, selecting the tag you just pushed, and fill in details for this release (Only do this for final releases, not RCs).

  3. Verify the new docker tag is listed at https://docker.io/repository/gsstratus/stratus?tab=tags

You can test the release artifacts locally using single-host-deploy.sh in stratus:

  1. Update DOCKER_TAG to the tag you just pushed to docker.io, and ensure that DOCKER_REPO=docker.io

  2. Run single-host-deploy.sh.

  3. Navigate to http://localhost:8080/geoserver/web and verify the UI shows up.

  4. Navigate to http://localhost:8080/geoserver/rest/manage/info and verify that the git commit id matches that of the release tag in git.

Testing

For integration testing, refer to the test/ directory.

This includes a number of integration and performance tests, and an upgrade test.

Deployment

Stratus deployments can be found under deploy/.

This includes:

  • Jenkins pipelines for CI.
  • Scripts for standalone deployments for demos and testing.
  • Kubernetes deployments, both manual and using helm.
  • Terraform Deployments.

Any custom Docker images used by these deployments can be found in build/docker.

Upgrade Procedures

stratus's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stratus's Issues

BUILD FAILURE

Hi all,

when I tried to build from this cmd:
cd src
mvn clean install -Dgdal

I have this error:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Stratus Parent 1.6.1-SNAPSHOT:
[INFO]
[INFO] Stratus Parent ..................................... SUCCESS [ 1.109 s]
[INFO] stratus-commons .................................... SUCCESS [ 10.490 s]
[INFO] stratus-redis-core ................................. SUCCESS [ 11.443 s]
[INFO] stratus-redis-resource-store ....................... FAILURE [ 4.039 s]
[INFO] Stratus Redis Catalog .............................. SKIPPED
[INFO] Stratus OWS Support ................................ SKIPPED
[INFO] Stratus OWS Core Support ........................... SKIPPED
[INFO] Stratus WFS Support ................................ SKIPPED
[INFO] Stratus WMS Support ................................ SKIPPED
[INFO] Stratus WCS Support ................................ SKIPPED
[INFO] stratus-extras ..................................... SKIPPED
[INFO] ndvi-process ....................................... SKIPPED
[INFO] stratus-gwc ........................................ SKIPPED
[INFO] stratus-wps ........................................ SKIPPED
[INFO] Stratus ............................................ SKIPPED
[INFO] Stratus Integration Tests .......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30.698 s
[INFO] Finished at: 2020-04-17T18:44:37+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project stratus-redis-resource-store: Could not resolve dependencies for project stratus:stratus-redis-resource-store:jar:1.6.1-SNAPSHOT: Failed to collect dependencies at org.geoserver:gs-platform:jar:2.16.0: Failed to read artifact descriptor for org.geoserver:gs-platform:jar:2.16.0: Could not transfer artifact org.geoserver:gs-platform:pom:2.16.0 from/to boundless (https://repo.boundlessgeo.com/artifactory/main): repo.boundlessgeo.com: Name or service not known: Unknown host repo.boundlessgeo.com: Name or service not known -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :stratus-redis-resource-store

someone can help me?
Thanks in advance,
Ema.

geoserver 2.17.xx

Hi all,

any plan in order to switch to geoserver 2.17?

thanks for the great work,
Ema.

Restore getting failed

Hi,

We have moved dump.rdb to the pod and tried
redis-cli -h redis-master -p 6379 -a <> --rdb /data/dump.rdb

Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.

sending REPLCONF capa eof
sending REPLCONF rdb-only 1
SYNC sent to master, writing 178 bytes to '/data/dump.rdb'
Transfer finished with success.

I got the success message but didn't get data when running keys *. Its showing empty.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.