mirror of
https://github.com/planetmint/planetmint.git
synced 2026-02-27 05:13:18 +00:00
Removing some more remnants of bigchaindb
This commit is contained in:
@@ -12,7 +12,7 @@ umask 022
|
||||
|
||||
# defaults
|
||||
stack_branch=${STACK_BRANCH:="master"}
|
||||
stack_repo=${STACK_REPO:="bigchaindb/bigchaindb"}
|
||||
stack_repo=${STACK_REPO:="planetmint/planetmint"}
|
||||
stack_size=${STACK_SIZE:=4}
|
||||
stack_type=${STACK_TYPE:="docker"}
|
||||
stack_type_provider=${STACK_TYPE_PROVIDER:=""}
|
||||
@@ -42,8 +42,8 @@ if [[ -n "$NOUNSET" ]]; then
|
||||
fi
|
||||
|
||||
TOP_DIR=$(cd $(dirname "$0") && pwd)
|
||||
SCRIPTS_DIR=$TOP_DIR/bigchaindb/pkg/scripts
|
||||
CONF_DIR=$TOP_DIR/bigchaindb/pkg/configuration
|
||||
SCRIPTS_DIR=$TOP_DIR/planetmint/pkg/scripts
|
||||
CONF_DIR=$TOP_DIR/planetmint/pkg/configuration
|
||||
|
||||
function usage() {
|
||||
cat <<EOM
|
||||
@@ -79,11 +79,11 @@ function usage() {
|
||||
of the instance(s) spawned. (default: ${stack_box_name})
|
||||
|
||||
ENV[STACK_REPO]
|
||||
(Optional) To configure bigchaindb repo to use, set STACK_REPO environment
|
||||
(Optional) To configure planetmint repo to use, set STACK_REPO environment
|
||||
variable. (default: ${stack_repo})
|
||||
|
||||
ENV[STACK_BRANCH]
|
||||
(Optional) To configure bigchaindb repo branch to use set STACK_BRANCH environment
|
||||
(Optional) To configure planetmint repo branch to use set STACK_BRANCH environment
|
||||
variable. (default: ${stack_branch})
|
||||
|
||||
ENV[TM_VERSION]
|
||||
@@ -180,8 +180,8 @@ trap finish EXIT
|
||||
|
||||
export STACK_REPO=$stack_repo
|
||||
export STACK_BRANCH=$stack_branch
|
||||
echo "Using bigchaindb repo: '$STACK_REPO'"
|
||||
echo "Using bigchaindb branch '$STACK_BRANCH'"
|
||||
echo "Using planetmint repo: '$STACK_REPO'"
|
||||
echo "Using planetmint branch '$STACK_BRANCH'"
|
||||
|
||||
git clone https://github.com/${stack_repo}.git -b ${stack_branch} || true
|
||||
|
||||
@@ -193,7 +193,7 @@ if [[ $stack_type == "local" ]]; then
|
||||
fi
|
||||
|
||||
# configure stack-config.yml
|
||||
cat >$TOP_DIR/bigchaindb/pkg/configuration/vars/stack-config.yml <<EOF
|
||||
cat >$TOP_DIR/planetmint/pkg/configuration/vars/stack-config.yml <<EOF
|
||||
---
|
||||
stack_type: "${stack_type}"
|
||||
stack_size: "${stack_size}"
|
||||
@@ -222,7 +222,7 @@ if [[ $stack_type == "local" ]]; then
|
||||
if [[ $unstack_type == "hard" ]]; then
|
||||
vagrant destroy -f
|
||||
elif [[ $unstack_type == "soft" ]]; then
|
||||
ansible-playbook $CONF_DIR/bigchaindb-stop.yml -i $CONF_DIR/hosts/all \
|
||||
ansible-playbook $CONF_DIR/planetmint-stop.yml -i $CONF_DIR/hosts/all \
|
||||
--extra-vars "operation=stop home_path=${TOP_DIR}"
|
||||
fi
|
||||
elif [[ $stack_type == "cloud" && $stack_type_provider == "azure" ]]; then
|
||||
@@ -230,7 +230,7 @@ elif [[ $stack_type == "cloud" && $stack_type_provider == "azure" ]]; then
|
||||
if [[ $unstack_type == "hard" ]]; then
|
||||
vagrant destroy -f
|
||||
elif [[ $unstack_type == "soft" ]]; then
|
||||
ansible-playbook $CONF_DIR/bigchaindb-stop.yml -i $CONF_DIR/hosts/all \
|
||||
ansible-playbook $CONF_DIR/planetmint-stop.yml -i $CONF_DIR/hosts/all \
|
||||
--extra-vars "operation=stop home_path=${TOP_DIR}"
|
||||
fi
|
||||
elif [[ $stack_type == "docker" ]]; then
|
||||
@@ -240,7 +240,7 @@ elif [[ $stack_type == "docker" ]]; then
|
||||
$(hostname) ansible_connection=local
|
||||
EOF
|
||||
|
||||
ansible-playbook $CONF_DIR/bigchaindb-stop.yml -i $CONF_DIR/hosts/all \
|
||||
ansible-playbook $CONF_DIR/planetmint-stop.yml -i $CONF_DIR/hosts/all \
|
||||
--extra-vars "operation=stop home_path=${TOP_DIR}"
|
||||
else
|
||||
echo "Invalid Stack Type OR Provider"
|
||||
|
||||
Reference in New Issue
Block a user