Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #245 from isnuryusuf/master
Browse files Browse the repository at this point in the history
adding function to umount when the /dev/sda1
  • Loading branch information
galthaus authored Apr 5, 2019
2 parents 552f60a + 4874d58 commit 426e2cf
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
3 changes: 3 additions & 0 deletions krib/profiles/example-krib-ha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Description: Example HA Krib Profile - Clone Me!
Documentation: |
Minimum required Params to set on a KRIB Kubernetes
cluster to define a Highly Available setup.
Clone this profile as `krib-ha` and change the VIP to your needs.
Meta:
color: blue
icon: ship
Expand Down
2 changes: 2 additions & 0 deletions krib/tasks/krib-dev-reset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Templates:
echo "drpcli plugins runaction certs deleteroot certs/root {{.Param "etcd/name"}}-server-ca"
echo "drpcli plugins runaction certs deleteroot certs/root {{.Param "etcd/name"}}-peer-ca"
echo "==========================================================================="
echo "Try to add unsafe/rs-password with value: your-non-default-password, on your profile and re-run the krib-reset-cluster workflow"
sleep 1
{{if .ParamExists "unsafe/rs-password"}}
PASSWORD="{{.Param "unsafe/rs-password"}}"
Expand Down
2 changes: 1 addition & 1 deletion krib/templates/etcd-config.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ fi
mkdir -p ${TMP_DIR}

echo "Download etcd version: v${ETCD_VERSION}"
download -L https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz -o ${TMP_DIR}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz
download -L https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz -O ${TMP_DIR}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz
echo "Install etcd version: ${ETCD_VERSION}"
tar -C ${INSTALL_DIR} -xzf ${TMP_DIR}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz --strip-components=1

Expand Down
3 changes: 3 additions & 0 deletions krib/templates/krib-helm-init.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ if [[ $MASTER_INDEX != notme ]] ; then
chmod 700 get_helm.sh

HELM_INSTALL_DIR=$INSTALL_DIR ./get_helm.sh -v ${HELM_VERSION}
echo "When helm fail to get the latest version, please add param "helm/version" and re-run again"
echo "You can find the version release or tag on: https://github.com/helm/helm/releases/"

fi

if [[ ! -z $(kubectl -n kube-system rollout status deploy/tiller-deploy -w=0 | grep success) ]] ; then
Expand Down
11 changes: 10 additions & 1 deletion krib/templates/mount-disks.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ case $BE in
;;
esac

# Umount disk if already mounted
export MOUNT=/mnt/hdd

if grep -qs $MOUNT /proc/mounts; then
umount /dev/sda1
else
echo "/dev/sda1 is not mounted"
fi

GETDISK=$(lsblk | grep "disk" | awk '{ print $1 }' | head -1)
echo "Found /dev/$GETDISK - using ..."

Expand All @@ -41,7 +50,7 @@ partprobe

echo "Make filesystem - xfs - docker likes it"

mkfs.xfs /dev/${GETDISK}1
mkfs.xfs -f /dev/${GETDISK}1

echo "Mount filesystem - put it in place, put not permanently"

Expand Down

0 comments on commit 426e2cf

Please sign in to comment.