Skip to content

Commit

Permalink
script improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Nov 3, 2017
1 parent 9fe3f8a commit 4d1ea62
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions docker-demo-3/scripts/configure-remote-state.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/sh
echo "the next command is not necessary anymore in newer versions of terraform. You should create a backend.tf file"
terraform remote config -backend=s3 -backend-config="bucket=terraform-state-a2b6219" -backend-config="key=terraform/terraform.tfstate" -backend-config="region=eu-west-1"
10 changes: 10 additions & 0 deletions docker-demo-3/scripts/jenkins-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ vgchange -ay

DEVICE_FS=`blkid -o value -s TYPE ${DEVICE}`
if [ "`echo -n $DEVICE_FS`" == "" ] ; then
# wait for the device to be attached
DEVICENAME=`echo "${DEVICE}" | awk -F '/' '{print $3}'`
DEVICEEXISTS=''
while [[ -z $DEVICEEXISTS ]]; do
echo "checking $DEVICENAME"
DEVICEEXISTS=`ls -asl /dev/disk/by-uuid/ | grep "$DEVICENAME"`
if [[ -z $DEVICEEXISTS ]]; then
sleep 15
fi
done
pvcreate ${DEVICE}
vgcreate data ${DEVICE}
lvcreate --name volume1 -l 100%FREE data
Expand Down

0 comments on commit 4d1ea62

Please sign in to comment.