mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-21 17:11:58 +00:00
Advance state of routed esxi deployment
This commit is contained in:
parent
e8d2f550b8
commit
9987cb5c03
@ -435,4 +435,4 @@ if __name__ == '__main__':
|
||||
status, rsp = client.grab_url_with_status(sys.argv[1], data)
|
||||
sys.stdout.write(rsp.decode())
|
||||
else:
|
||||
sys.stdout.write(HTTPSClient(usejson, errout=errout).grab_url(sys.argv[1], data, phmac=phmac).decode())
|
||||
sys.stdout.write(HTTPSClient(usejson, errout=errout, phmac=phmac).grab_url(sys.argv[1], data).decode())
|
||||
|
@ -20,6 +20,7 @@ if [ -e /dev/disk/by-label/CNFLNT_IDNT ]; then
|
||||
else
|
||||
v4addr=$(grep ^ipv4_address: $tcfg)
|
||||
v4addr=${v4addr#ipv4_address: }
|
||||
v4addr=${v4addr%/*}
|
||||
v4gw=$(grep ^ipv4_gateway: $tcfg)
|
||||
v4gw=${v4gw#ipv4_gateway: }
|
||||
if [ "$v4gw" = "null" ]; then
|
||||
|
@ -20,6 +20,7 @@ if [ ! -z "$personality" ]; then
|
||||
mkdir -p /tmp/confluentident
|
||||
mcopy -i $personality ::* /tmp/confluentident/
|
||||
fi
|
||||
touch /etc/confluent/confluent.apikey
|
||||
if [ -e /tmp/confluentident/cnflnt.yml ]; then
|
||||
cat /tls/*.pem >> /etc/confluent/ca.pem
|
||||
deploysrvs=$(sed -n '/^deploy_servers:/,/^[^-]/p' /tmp/confluentident/cnflnt.yml |grep ^-|sed -e 's/^- //'|grep -v :)
|
||||
@ -35,6 +36,7 @@ if [ -e /tmp/confluentident/cnflnt.yml ]; then
|
||||
if [ "$autoconfigmethod" = "static" ]; then
|
||||
v4addr=$(grep ^ipv4_address: $tcfg)
|
||||
v4addr=${v4addr#ipv4_address: }
|
||||
v4addr=${v4addr%/*}
|
||||
v4gw=$(grep ^ipv4_gateway: $tcfg)
|
||||
v4gw=${v4gw#ipv4_gateway: }
|
||||
if [ "$v4gw" = "null" ]; then
|
||||
@ -46,14 +48,15 @@ if [ -e /tmp/confluentident/cnflnt.yml ]; then
|
||||
localcli network ip route ipv4 add -n default -g $v4gw
|
||||
fi
|
||||
hmackeyfile=$(mktemp)
|
||||
echo -n $(grep ^apitoken: cnflnt.yml|awk '{print $2}') > $hmackeyfile
|
||||
echo -n $(grep ^apitoken: /tmp/confluentident/cnflnt.yml|awk '{print $2}') > $hmackeyfile
|
||||
cd -
|
||||
passfile=$(mktemp)
|
||||
passcrypt=$(mktemp)
|
||||
hmacfile=$(mktemp)
|
||||
ln -s /opt/confluent/bin/clortho /opt/confluent/bin/genpasshmac
|
||||
/opt/confluent/bin/genpasshmac $passfile $passcrypt $hmacfile $hmackeyfile
|
||||
|
||||
/opt/confluent/bin/apiclient -p $hmacfile /confluent-api/self/registerapikey $passcrypt
|
||||
cp $passfile /etc/confluent/confluent.apikey
|
||||
fi
|
||||
while ! grep NODENAME /etc/confluent/confluent.info; do
|
||||
echo "Searching for deployment service on local network..."
|
||||
@ -73,9 +76,13 @@ while ! grep NODENAME /etc/confluent/confluent.info; do
|
||||
done
|
||||
node=$(grep NODENAME: /etc/confluent/confluent.info|head -n 1|awk '{print $2}')
|
||||
mgr=$(grep MANAGER: /etc/confluent/confluent.info|head -n 1|awk '{print $2}')
|
||||
cp /opt/confluent/bin/clortho /clortho
|
||||
(/clortho $node $mgr || /opt/confluent/bin/clortho $node $mgr) > /etc/confluent/confluent.apikey
|
||||
APIKEY=$(cat /etc/confluent/confluent.apikey)
|
||||
|
||||
if [ -z "$APIKEY" ]; then
|
||||
cp /opt/confluent/bin/clortho /clortho
|
||||
(/clortho $node $mgr || /opt/confluent/bin/clortho $node $mgr) > /etc/confluent/confluent.apikey
|
||||
APIKEY=$(cat /etc/confluent/confluent.apikey)
|
||||
fi
|
||||
while [ -z "$APIKEY" ]; do
|
||||
if [ ! -f /var/run/vmware/show-esx-shell-login ]; then
|
||||
chvt 1
|
||||
|
Loading…
Reference in New Issue
Block a user