Skip to content

Setting up a Development Environment

Oliver Kennedy edited this page Sep 4, 2019 · 1 revision


These instructions were tested on Linux Mint 19, and should be viable for any ubuntu/debian based distribution of Linux.

Install pyenv and python3

See instructions here

$> git clone ~/.pyenv
$> echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$> echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
$> echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bashrc
$> source ~/.bashrc
$> pyenv install 3.7.4

Install sbt

See instructions here. The following commands install SBT in /opt/sbt.

$> apt install scala
$> if [ ! -d /opt ] ; then sudo mkdir /opt; fi
$> curl -OL 
$> sudo tar -zxvf -C /opt sbt-1.2.8.tgz
$> echo 'export PATH="$PATH:/opt/sbt/bin"' >> ~/.bashrc
$> export PATH="$PATH:/opt/sbt/bin"

Install yarn

$> apt install yarn

You may need to set up the repositories for yarn and nodejs.

Install Vizier Stack

Run these commands in the working directory where you plan to edit Vizier.

Install and run Mimir

See instructions here. Make sure SBT is installed and on your path.

$> git clone
$> cd mimir.git
$> git checkout mimir-vizier-api
$> sbt compile

Run Mimir-Vizier with

$> sbt runMimirVizier

You can test that the Mimir server is running with:

$> curl http://localhost:8089

Install, Configure, and Build Vizier-UI

See instructions here.

$> git clone
$> cd web-ui
$> yarn install

Most UI configuration is in the file public/env.js. The key thing to edit is the API URL, which should point at wherever the API server is being hosted. The configuration listed above would place it here:

  API_URL: 'http://localhost:5000/vizier-db/api/v1/'

Build the UI:

$> yarn build

Install and run Vizier-API

See instructions here and here.

$> git clone
$> cd web-api-async
$> pyenv local 3.7.4
$> pip install wheel
$> pip install git+
$> pip install -r requirements.txt
$> pip install -e .

Instructions on configuring Vizier-API can be found here. Configuration is done through environment variables, so the easiest thing to do is create a launcher script such as the one below. This will need some massaging if you want to put your development server behind a proxy.


# For instructions on configuring this script, see

export VIZIERSERVER_BASE_URL="http://localhost"
export VIZIERENGINE_DATA_DIR="./vizier"
export VIZIERSERVER_PACKAGE_PATH="./resources/packages/common:./resources/packages/mimir"
export VIZIERSERVER_PROCESSOR_PATH="./resources/processors/common:./resources/processors/mimir"
export VIZIERSERVER_APP_PATH="/vizier-db/api/v1"

# The following line assumes web-ui is in the same directory as web-api-async
export WEB_UI_STATIC_FILES=`pwd`"/../web-ui/build/"

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
  eval "$(pyenv init -)"

cd $(dirname $0)
FLASK_APP=vizier.wsgi:app flask run

This script, when run will start an API server on port 5000. You can test to see that the server is running with:

$> curl http://localhost:5000

You should now be able to connect to the Vizier UI at http://localhost:5000/vizier-db/api/v1/web-ui/

You can’t perform that action at this time.