Fix opennebula installation and key distribution
parent
4bbe35b83a
commit
9a436788c1
|
@ -8,6 +8,15 @@ set -e -x -a
|
|||
|
||||
key_hosts=${key_hosts:-$opennebula_hosts}
|
||||
|
||||
# Add everyone to /etc/hosts
|
||||
for play_host in $key_hosts; do
|
||||
# FIXME: Take hostname from "inventory"
|
||||
node_name=`ssh root@$play_host 'hostname'`
|
||||
(ssh root@$play_host 'cat /etc/hosts'; grep -v $node_name config/hosts.add) | sort | uniq > tmp$$
|
||||
scp tmp$$ root@$play_host:/etc/hosts
|
||||
rm tmp$$
|
||||
done
|
||||
|
||||
# Generate keys for oneadmin if not yet
|
||||
for play_host in $key_hosts; do
|
||||
ssh root@$play_host <<EOF
|
||||
|
@ -49,7 +58,7 @@ for play_host in $key_hosts; do
|
|||
ssh root@$play_host <<EOF
|
||||
set -e -x
|
||||
if [ ! -f /root/.ssh/id_rsa.pub ]; then
|
||||
ssh-keygen -t rsa -q -P ""
|
||||
ssh-keygen -t rsa -f /root/.ssh/id_rsa -q -P ""
|
||||
fi
|
||||
EOF
|
||||
done
|
||||
|
|
|
@ -34,7 +34,7 @@ apt-get update || true
|
|||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" \
|
||||
-o Dpkg::Options::="--force-confold" install -y \
|
||||
lsb-release sudo mariadb-server netcat-openbsd \
|
||||
opennebula opennebula-sunstone opennebula-gate opennebula-flow opennebula-node opennebula-tools ceph
|
||||
opennebula opennebula-sunstone opennebula-gate opennebula-flow opennebula-node opennebula-tools ceph ruby-bundler
|
||||
|
||||
# Keepalived from buster crashes with libc6 from sid
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" \
|
||||
|
|
12
run.sh
12
run.sh
|
@ -2,9 +2,15 @@
|
|||
|
||||
set -e -x
|
||||
|
||||
play_host=172.31.1.20 node_name=willow1 int_ip=192.168.5.20 ./general.sh
|
||||
play_host=172.31.1.20 node_name=willow1 int_ip=192.168.5.20 ./opennebula.sh
|
||||
play_host=172.31.1.20 node_name=willow1 int_ip=192.168.5.20 ./ceph.sh
|
||||
play_host=172.31.1.20 node_name=ivy1 int_ip=192.168.5.20 ./general.sh
|
||||
play_host=172.31.1.20 node_name=ivy1 int_ip=192.168.5.20 ./opennebula.sh
|
||||
play_host=172.31.1.20 node_name=ivy1 int_ip=192.168.5.20 ./ceph.sh
|
||||
|
||||
exit
|
||||
|
||||
play_host=172.31.1.21 node_name=ivy2 int_ip=192.168.5.21 ./general.sh
|
||||
play_host=172.31.1.21 node_name=ivy2 int_ip=192.168.5.21 ./opennebula.sh
|
||||
play_host=172.31.1.21 node_name=ivy2 int_ip=192.168.5.21 ./ceph.sh
|
||||
|
||||
exit
|
||||
|
||||
|
|
Loading…
Reference in New Issue