Skip to content

Sandhill is an extensible platform designed to make developing data-driven web applications fast and easy.

License

Notifications You must be signed in to change notification settings

MSU-Libraries/sandhill

Repository files navigation

Sandhill

Sandhill is still in active development and is considered in the alpha stage

Sandhill is an extensible platform designed to make developing data-driven web applications fast and easy. Written in Python using the Flask microframework, Sandhill is built with a decoupled codebase that allows for rapid deployment of new features. Sandhill provides tools to combine multiple data sources into web content using custom data processors.

About Sandhill

Sandhill was originally created by a development team at Michigan State University Libraries to provide a flexible front end for a digital repository. A key advantage of Sandhill is the ability to change back-end data sources without requiring significant rewrites of the base application.

Sandhill isn't a pre-built solution for repositories, but a lightweight platform that allows for rapid development of web applications covering a wide range of purposes.

What does the name Sandhill mean?
Sandhill was named for the Sandhill Crane, a migratory bird that spends part of its time in Michigan.

Technology stack

Sandhill has been developed primarily with the following:

  • Python (Tested with version 3.10)
  • Flask
  • Jinja
  • JSON
  • Ubuntu/Debian based Linux (but it should work on other Linux distros as well)

Having a grasp of all of the above technologies isn't necessary to get started with Sandhill, but being familiar with at least JSON, the Linux command line, and how an HTML template library works (even if it isn't Jinja) will help you get started with Sandhill.

Installation

There are two ways to install Sandhill.

  1. Manual installation
  2. Docker installation

Manual installation

This installation method will get Sandhill running on your Linux machine directly. This requires a few more steps, but if you aren't familiar with Docker, this could be the easier route.

These instructions assume you are using a Ubuntu or another Debian-based Linux and use the apt command. If you are familiar with another distro, the process should be very similar if you substitute another package manager. If all else fails, you can always try running Sandhill in Docker.

Required packages
Install the required packages to set up Sandhill (note the required sudo privileges for these commands only):

sudo apt update
sudo apt install virtualenv python3-pip

Getting Sandhill
Clone the Sandhill repository and navigate into that directory:

git clone https://github.com/MSU-Libraries/sandhill.git
cd sandhill

Dependencies
Next create a virtual environment and install the required pip packages:

# Sandhill has been tested with Python 3.10, though other versions may work as well.
virtualenv -p python3 env
env/bin/pip install -r requirements.txt

Running Sandhill
To start Sandhill, run the uwsgi within the application environment:

env/bin/uwsgi --ini uwsgi.ini

Go to http://localhost:8080/ in your browser. If everything worked, you will see a default "It Works!" page. Congratulations - you've got Sandhill up and running! (Press Ctrl-C when you want to stop Sandhill)

You're now ready to dive into Sandhill. Head over and read through setting up an instance of Sandhill which will help you start development of your Sandhill application.

Docker installation

With the Docker install of Sandhill, you'll be able to skip most of the setup to get things running quickly, but it may require a few extra steps before you can start building content with Sandhill.

Required packages
You'll need both docker installed. You can install Docker by following the instructions at their site:

Initialize your Swarm To use Docker Swarm you need to initialize the Swarm on the environment you are running on:

# Where <IP> is the current server's IP
docker swarm init --advertise-addr <IP> --listen-addr <IP>:2377

Getting Sandhill
Clone the Sandhill repository and navigate into that directory:

git clone https://github.com/MSU-Libraries/sandhill.git
cd sandhill

Building the Docker image
Build the Sandhill image by running:

docker build . -t sandhill:latest

Run Sandhill as a container
Create the Sandhill container in Docker Swarm mode by running:

docker stack deploy -c docker-compose.yml sandhill

Go to http://localhost:8080/ in your browser. If everything worked, you will see a default "It Works!" page. Congratulations - you've got Sandhill up and running!

To stop the Sandhill container, run the following while in the sandhill/ directory you cloned from git:

docker-compose down

You're now ready to dive into Sandhill. Head over and read through setting up an instance of Sandhill which will help you start development of your Sandhill application.

Setting up an instance of Sandhill

After you install the core Sandhill application, you are ready to set up your own application instance. The following documentation provides further instructions for setting up your own instance.

If you have further questions or comment, please reach out to the development team at LIB.DL.repoteam@msu.edu.