summaryrefslogtreecommitdiffstats
path: root/scripts/post_apex.sh
diff options
context:
space:
mode:
authorjuraj.linkes <jlinkes@cisco.com>2017-10-17 08:46:18 +0200
committerjuraj.linkes <jlinkes@cisco.com>2017-10-17 08:46:18 +0200
commit0c221bb4dc1b94660f04958e380819c535307565 (patch)
treeb9d94e67423a94243b7fb26d6bdf1408ab59666a /scripts/post_apex.sh
parent13a7b3ceb0d1a2811cd07a7e1bf4763d2b00432d (diff)
Added vim installation to post apex script
Change-Id: I96fb1d7f9f7fd58c89be53a1a34ba94a857b7e30 Signed-off-by: juraj.linkes <jlinkes@cisco.com>
Diffstat (limited to 'scripts/post_apex.sh')
-rwxr-xr-xscripts/post_apex.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/post_apex.sh b/scripts/post_apex.sh
index d38ddd4..fb84d43 100755
--- a/scripts/post_apex.sh
+++ b/scripts/post_apex.sh
@@ -56,9 +56,15 @@ do
echo "Copying overcloudrc to $node_name"
scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $overcloudrc_path heat-admin@$node_ip:. &> /dev/null
ssh -oStrictHostKeyChecking=no heat-admin@$node_ip 'sudo cp /home/heat-admin/overcloudrc /root' &> /dev/null
- echo "Cloning fds repo on $node_name to $overcloud_fds_repo_loc"
- ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $node_name \
- 'git clone https://gerrit.opnfv.org/gerrit/p/fds.git $overcloud_fds_repo_loc' &> /dev/null
+ ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $node_name ping -c 3 8.8.8.8 > /dev/null
+ if [[ $? -eq 0 ]]
+ then
+ echo "Cloning fds repo on $node_name to $overcloud_fds_repo_loc"
+ ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $node_name \
+ 'git clone https://gerrit.opnfv.org/gerrit/p/fds.git $overcloud_fds_repo_loc' &> /dev/null
+ echo "Installing vim on $node_name"
+ ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $node_name yum -y install vim &> /dev/null
+ fi
if [[ $(ssh -oStrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$node_ip \
'grep -c ". /root/overcloudrc" /root/.bashrc' 2> /dev/null) -eq 0 ]]
then