2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 11:01:09 +00:00

Numerous fixes to the OS deploy

Most notably, change to safe_dump for yaml.

For the various initrd items, changes
to actually trigger the relevant bits
of the RH installer.
This commit is contained in:
Jarrod Johnson 2020-04-14 16:34:50 -04:00
parent 276e01434d
commit 24bc1210d0
4 changed files with 13 additions and 9 deletions

View File

@ -6,7 +6,7 @@ import yaml
def yamldump(input):
return yaml.dump(input, default_flow_style=False)
return yaml.safe_dump(input, default_flow_style=False)
def handle_request(env, operation, start_response):

View File

@ -1,4 +1,5 @@
#!/bin/bash
echo -n "" >> /tmp/net.ifaces
cat /tls/*.pem >> /etc/pki/tls/certs/ca-bundle.certs
cat /tls/*.pem >> /etc/pki/tls/certs/ca-bundle.crt
. /lib/anaconda-lib.sh
wait_for_kickstart

View File

@ -1,4 +1,6 @@
#!/bin/sh
[ -e /tmp/confluent.initq ] && return 0
echo -n "" > /tmp/confluent.initq
cd /sys/class/net
for currif in *; do
ip link set $currif up
@ -14,17 +16,16 @@ read mgr << EOF
$(grep ^MANAGER /tmp/confluent.info|grep fe80|awk '{print $2}')
EOF
mgridx=${mgr#*%}
mgr="[$mgr]"
ifname=$(ip link |grep ^$ifidx:|awk '{print $2}')
ifname=${ifname%:}
echo $ifname > /tmp/net.ifaces
nodename=$grep ^NODENAME /tmp/confluent.info|awk '{print $2}')
nodename=$(grep ^NODENAME /tmp/confluent.info|awk '{print $2}')
#TODO: blkid --label <whatever> to find mounted api
if [ -z "$apikey" ]; then
apikey=$(/opt/confluent/bin/clortho $nodename $mgr)
fi
mgr="[$mgr]"
curl -f -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $apikey" https://$mgr/confluent-api/self/deploycfg > /tmp/confluent.deploycfg
mgr=$(grep ^ipv4_server: /tmp/confluent.deploycfg)
@ -35,7 +36,10 @@ proto=$(grep ^protocol: /tmp/confluent.deploycfg)
proto=${proto#protocol: }
echo inst.repo=$proto://$mgr/confluent-public/os/$profilename/distribution >> /etc/cmdline.d/01-confluent.conf
echo inst.ks=$proto://$mgr/confluent-public/os/$profilename/kickstart >> /etc/cmdline.d/01-confluent.conf
kickstart=$proto://$mgr/confluent-public/os/$profilename/kickstart
root=anaconda-net:$proto://$mgr/confluent-public/os/$profilename/distribution
export kickstart
export root
autoconfigmethod=$(grep ipv4_method /tmp/confluent.deploycfg)
autoconfigmethod=${autoconfigmethod#ipv4_method}
if [ "$autoconfigmethod" = "dhcp" ]; then
@ -53,4 +57,3 @@ else
echo ip=$v4addr::$vpgw:$v4nm:$nodename:$ifname:none >> /etc/cmdline.d/01-confluent.conf
fi

View File

@ -1,2 +1,2 @@
#!/bin/bash
cat /etc/pki/tls/certs/ca-bundle.crt > /sysroot/etc/pki/tls/certs/
cat /etc/pki/tls/certs/ca-bundle.crt > /sysroot/etc/pki/tls/certs/ca-bundle.crt