Skip to content

Commit edcebc9

Browse files
committed
Add some vagrancy.
1 parent ed29795 commit edcebc9

File tree

2 files changed

+35
-3
lines changed

2 files changed

+35
-3
lines changed

hark-a-vagrant.sh

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
CMD="cd /shared/source; make install"
4+
VDIR=~/projects/vagrant/vagrant-ansible-samba-cluster
5+
VNODES=""
6+
7+
reading=false
8+
while read -r line || [[ -n "$line" ]]; do
9+
if [[ "$line" == "[samba_servers]" ]]; then
10+
reading=true
11+
continue
12+
fi
13+
if [ "$reading" = true ]; then
14+
if [ "x${line}" == "x" ]; then
15+
break
16+
fi
17+
VNODES="${VNODES} ${line}"
18+
fi
19+
done < ${VDIR}/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory
20+
21+
case $1 in
22+
-f|--force)
23+
CMD="${CMD} || ./wafbuild-fed.sh"
24+
;;
25+
*)
26+
CMD="$@"
27+
;;
28+
esac
29+
30+
cd ${VDIR}
31+
vagrant rsync ${VNODES}
32+
for NODE in ${VNODES}; do
33+
vagrant ssh ${NODE} -c "${CMD}"
34+
done

mock-the-feds.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ SCM="~/projects/samba/samba-perf"
44
PKG="~/projects/fedora/samba"
55
REPO="~/repo/f23/x86_64"
66
REPO_NAME="jarrpa"
7-
NODES="ganesh"
87

98
MOCK_OPTS="--no-clean --without=configure --nocheck --no-cleanup-after"
109
if [ "x${1}" == "xclean" ]; then
@@ -39,11 +38,10 @@ if [ "${NEW_MD5}" != "${OLD_MD5}" ]; then
3938
echo "sudo mock ${MOCK_OPTS} -r f23-x86_64 rebuild ${SRPM}"
4039
sudo mock ${MOCK_OPTS} -r f23-x86_64 rebuild ${SRPM}
4140
popd
42-
vagrant rsync
4341
if [ "x${OLD_MD5}" != "x" ]; then
4442
CMD="SAMBA_PKGS=`dnf list installed | grep \"samba\\\|ctdb\\\|libwb\\\|libsmb\" | awk '{print $1}'`; sudo dnf reinstall ${SAMBA_PKGS}"
4543
else
4644
CMD="sudo dnf --disablerepo=* --enablerepo=${REPO_NAME} update"
4745
fi
48-
vagrant ssh ${NODES} -c "${CMD}"
46+
./scripts/hark-a-vagrant.sh ${CMD}
4947
fi

0 commit comments

Comments
 (0)