SPARC Wiki

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


Habitat - https://www.habitat.sh


You can use vagrant and the box configured in the sparc-request repository to do these steps if you do not have a system of your own.

Vagrant - https://www.habitat.sh
Vagrant Config File - https://github.com/ui-icts/sparc-request/blob/master/Vagrantfile


Getting a system set up to run SPARC with habitat requires

  1. Installing Habitat
  2. Install SPARC packages
  3. Configuration
  4. Run

Install Habitat

Create habitat user and group
sudo adduser --group hab
sudo useradd -g hab hab
Install habitat binary using curl bash
curl https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh | sudo bash

Install SPARC packages

Install the package
sudo hab pkg install chrisortman/sparc-request --channel unstable

Configuration

Habitat will by default look to see if a user specified configuration file is available. If you are using the vagrant image then you may omit this step as the vagrant provisioner takes care of setting this up. If you are are setting up your own system, you will at least need to configure database access.

We first create the directory habitat will check for the user.toml file, and then we copy the default one from he package we installed.

sudo mkdir -p /hab/user/sparc-request/config
cp $(hab pkg path chrisortman/sparc-request)/default.toml /hab/user/sparc-request/config/user.toml

You may then change configuration values as needed in user.toml. 

Run

If you are starting with a blank database and would like the database to be created and set up for you

sudo mkdir -p /hab/svc/sparc-request/data
touch /hab/svc/sparc-request/data/migrate

To start the server

sudo hab start chrisortman/sparc-request
  • No labels