promenade/tools/simple-deployment.sh
Mark Burnett 135f0e7dc7 Doc: Add brief getting started with API section
Change-Id: I5bd0984bbdd65b7ca073d75de611499dab0ad906
2017-11-20 15:13:48 -06:00

44 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
set -eux
IMAGE_PROMENADE=${IMAGE_PROMENADE:-quay.io/attcomdev/promenade:latest}
PROMENADE_DEBUG=${PROMENADE_DEBUG:-0}
SCRIPT_DIR=$(realpath $(dirname $0))
CONFIG_SOURCE=$(realpath ${1:-${SCRIPT_DIR}/../examples/basic})
BUILD_DIR=$(realpath ${2:-${SCRIPT_DIR}/../build})
echo === Cleaning up old data ===
rm -rf ${BUILD_DIR}
mkdir -p ${BUILD_DIR}
chmod 777 ${BUILD_DIR}
cp "${CONFIG_SOURCE}"/*.yaml ${BUILD_DIR}
echo === Generating updated certificates ===
docker run --rm -t \
-w /target \
-e PROMENADE_DEBUG=$PROMENADE_DEBUG \
-v ${BUILD_DIR}:/target \
${IMAGE_PROMENADE} \
promenade \
generate-certs \
-o /target \
$(ls ${BUILD_DIR})
echo === Building bootstrap scripts ===
docker run --rm -t \
-w /target \
-e PROMENADE_DEBUG=$PROMENADE_DEBUG \
-v ${BUILD_DIR}:/target \
${IMAGE_PROMENADE} \
promenade \
build-all \
-o /target \
--validators \
$(ls ${BUILD_DIR})
echo === Done ===