forked from yard-turkey/aws-s3-provisioner
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathup.sh
More file actions
executable file
·32 lines (26 loc) · 916 Bytes
/
up.sh
File metadata and controls
executable file
·32 lines (26 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash -e
cd "$(dirname "$0")/.."
runprovision=true
if [ "$1" == "--nop" ]; then
runprovision=false
shift
fi
FIELD=${1:-green}field
if [ "$FIELD" != "greenfield" ] && [ "$FIELD" != "brownfield" ]; then
echo "usage: up.sh [--nop] [green|brown]"
exit 1
fi
# Prepare to run our provisiner
kubectl apply -f crds/apiextensions-v1/objectbucket.io_objectbuckets.yaml
kubectl apply -f crds/apiextensions-v1/objectbucket.io_objectbucketclaims.yaml
kubectl apply -f examples/cloudian-s3-provisioner-dev.yaml
kubectl apply -f examples/owner-secret.yaml
kubectl apply -f "examples/$FIELD/storageclass.yaml"
# Start provisioner
if $runprovision; then
SERVER=$(grep server ~/.kube/config | awk '{ print $2 }')
go run ./cmd -master "$SERVER" -kubeconfig ~/.kube/config -alsologtostderr -v=2 &
fi
# Install the app and watch its creation
kubectl apply -f "examples/$FIELD/photo.yaml"
kubectl get pods -w