Skip to content

Commit

Permalink
Introduce baseline namespaces into lifecycle env
Browse files Browse the repository at this point in the history
The existing lifecycle test environment runs a set of applications
injected with Conduit.

This change introduces a parallel set of applications that run without
Conduit, to enable comparison.

Part of #43.

Signed-off-by: Andrew Seigner <[email protected]>
  • Loading branch information
siggy committed Jul 6, 2018
1 parent 319a749 commit 1caf310
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
10 changes: 8 additions & 2 deletions lifecycle/bin/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@ if [ "$NAMESPACES" -gt 100 ]; then
exit 1
fi

echo "Deploying $NAMESPACES namespaces..."
echo "Deploying $NAMESPACES injected and baseline namespaces..."

for i in `seq 1 $NAMESPACES`;
do
NS=lifecycle$i
NS_BASELINE=$NS-baseline

echo "\nDeploying $NS..."
kubectl create ns $NS
cat lifecycle.yml |
conduit inject --conduit-namespace conduit-lifecycle --tls optional - |
conduit inject --conduit-namespace conduit-lifecycle - |
kubectl -n $NS apply -f -

echo "\nDeploying $NS_BASELINE..."
kubectl create ns $NS_BASELINE
cat lifecycle.yml |
kubectl -n $NS_BASELINE apply -f -
done
8 changes: 6 additions & 2 deletions lifecycle/bin/scale
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ if [ "$REPLICAS" -gt 100 ]; then
exit 1
fi

echo "Scaling $NAMESPACES namespaces to $REPLICAS replicas..."
echo "Scaling $NAMESPACES injected and baseline namespaces to $REPLICAS replicas..."

for i in `seq 1 $NAMESPACES`;
do
NS=lifecycle$i
NS_BASELINE=$NS-baseline

echo "\nScaling $NS to $REPLICAS replicas..."
kubectl -n lifecycle$i scale --replicas=$REPLICAS deploy/bb-broadcast deploy/bb-p2p deploy/bb-terminus
kubectl -n $NS scale --replicas=$REPLICAS deploy/bb-broadcast deploy/bb-p2p deploy/bb-terminus

echo "\nScaling $NS_BASELINE to $REPLICAS replicas..."
kubectl -n $NS_BASELINE scale --replicas=$REPLICAS deploy/bb-broadcast deploy/bb-p2p deploy/bb-terminus
done
8 changes: 6 additions & 2 deletions lifecycle/bin/teardown
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ set -e

NAMESPACES=${1:-1}

echo "Tearing down $NAMESPACES namespaces...\n"
echo "Tearing down $NAMESPACES injected and baseline namespaces...\n"

for i in `seq 1 $NAMESPACES`;
do
kubectl delete ns lifecycle$i || true
NS=lifecycle$i
NS_BASELINE=$NS-baseline

kubectl delete ns $NS || true
kubectl delete ns $NS_BASELINE || true
done

0 comments on commit 1caf310

Please sign in to comment.