aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSteven Dake <stdake@cisco.com>2015-08-07 20:13:05 -0700
committerSteven Dake <stdake@cisco.com>2015-08-07 20:18:33 -0700
commit33d8d32381f60b6ff1973383dd87884b84be614e (patch)
treef3f9df365db5e11f02fa3c5d9488a54c1cc3885c /tools
parenta5e907a8e91bc4e1d8f563dc79db0ee96c15d380 (diff)
downloadkolla-33d8d32381f60b6ff1973383dd87884b84be614e.tar.gz
kolla-33d8d32381f60b6ff1973383dd87884b84be614e.zip
Remove validate-min-env-vars gating
We don't use config-internal anymore, so remove validate-min-env-vars from being gated upon. This is becuse there is no minimum environment variables required. While we are at it we remove min-env. Partially-Implements: blueprint remove-config-internal Change-Id: Ibe2947b35e4dc1549e82acc66c01153495a91882
Diffstat (limited to 'tools')
-rwxr-xr-xtools/min-env.sh69
-rwxr-xr-xtools/validate-min-env-vars.sh17
2 files changed, 0 insertions, 86 deletions
diff --git a/tools/min-env.sh b/tools/min-env.sh
deleted file mode 100755
index 96f76f316..000000000
--- a/tools/min-env.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env bash
-#
-# This script generates the minimal environment variable doc
-
-# Move to top level directory
-REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
-cd "$(dirname "$REAL_PATH")/.."
-
-# Make sure sort produces the same output on all systems
-export LC_ALL=C
-
-DOC=docs/minimal-environment-vars.md
-DOCKERDIR="docker"
-# BASE and TYPE can be hard coded to centos and rdo since the required vars will always be the same
-BASE="centos"
-TYPE="rdo"
-
-function write_header {
- local header=$1
- header=${header^}
- header=$(echo ${header} | sed -e 's/-app//')
- echo -e "\n# $header\n" >> "$DOC"
-}
-
-function write_env_var {
- local env_var=$1
- if [ -z "$env_var" ]; then
- echo "" >> "$DOC"
- else
- env_var=${env_var%=*}
- echo " $env_var" >> "$DOC"
- fi
-}
-
-function find_vars {
- local img_location=$1
- local all_vars=''
- local scripts=$(find ${img_location} -name *.sh | sort -t / -k 4)
-
- for script in $scripts; do
- local vars=$(awk '/^check_required_vars/,/([^\\] *$)/' $script)
- all_vars="$all_vars $(echo "$vars" | sed 's/check_required_vars//' | sed 's/\\//g')"
- done
-
- if [ -n "${all_vars// }" ]; then
- all_vars=$(echo "${all_vars[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')
- for v in $all_vars; do
- write_env_var $v
- done
- else
- echo " None" >> "$DOC"
- fi
-}
-
-cat > $DOC <<EOF
-# Environment Variables
-
-In order for each service to function, there is a minimum set of required variables that need to be plugged into the environment. Below is the list of variables that is needed for each service to run in a minimal setting.
-EOF
-
-declare -a startsh
-startsh=$(find "${DOCKERDIR}/${BASE}/${TYPE}/" -name Dockerfile | sort -t / -k 4 | grep -v data)
-
-for start_script in $startsh; do
- if [ ! "$(dirname $start_script | xargs basename)" == "base" ]; then
- write_header $(dirname $start_script | xargs basename)
- find_vars $(dirname $start_script) $(dirname $start_script | xargs basename)
- fi
-done
diff --git a/tools/validate-min-env-vars.sh b/tools/validate-min-env-vars.sh
deleted file mode 100755
index bf76232f9..000000000
--- a/tools/validate-min-env-vars.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
-cd "$(dirname "$REAL_PATH")/.."
-
-MIN_ENV_VARS_DOC=./docs/minimal-environment-vars.md
-
-mv ${MIN_ENV_VARS_DOC}{,.validate}
-
-# Generate a new file and check the content is the same
-./tools/min-env.sh
-/usr/bin/diff ${MIN_ENV_VARS_DOC}{,.validate}
-RET=$?
-
-mv ${MIN_ENV_VARS_DOC}{.validate,}
-
-exit $RET