5a44b5be49
Update pxeboot-update script to accept parameter for installer base URL Add a common function to parse the port number from inst.repo Update pxeboot and kickstart URLs to support a configurable HTTP port Story: 2004642 Task: 28593 Depends-On: https://review.openstack.org/#/c/634237/ Change-Id: Ibd66e89e49794ca57b938eb43d227860eda6674a Signed-off-by: Tao Liu <tao.liu@windriver.com>
36 lines
914 B
INI
36 lines
914 B
INI
%post --erroronfail
|
|
|
|
# Source common functions
|
|
. /tmp/ks-functions.sh
|
|
|
|
# Retrieve the installation uuid from the controller we booted from
|
|
http_port=$(get_http_port)
|
|
INSTALL_UUID=`curl -sf http://pxecontroller:${http_port:-8080}/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid`
|
|
if [ $? -ne 0 ]
|
|
then
|
|
INSTALL_UUID=unknown
|
|
fi
|
|
|
|
# Set the security profile mode
|
|
secprofile="standard"
|
|
profile_mode=`cat /proc/cmdline |xargs -n1 echo |grep security_profile= | grep extended`
|
|
if [ -n "$profile_mode" ]; then
|
|
secprofile="extended"
|
|
fi
|
|
|
|
mkdir -p -m 0775 /etc/platform
|
|
cat <<EOF > /etc/platform/platform.conf
|
|
nodetype=worker
|
|
subfunction=worker,lowlatency
|
|
system_type=Standard
|
|
security_profile=$secprofile
|
|
INSTALL_UUID=$INSTALL_UUID
|
|
EOF
|
|
|
|
# mount the platform directory from the controller
|
|
cat >> /etc/fstab <<EOF
|
|
controller-platform-nfs:/opt/platform /opt/platform nfs timeo=30,udp,rsize=1024,wsize=1024,_netdev 0 0
|
|
EOF
|
|
|
|
%end
|