Merge "Copy pxelinux.0 file to tftpboot"
This commit is contained in:
commit
c532ed1585
|
@ -1032,6 +1032,8 @@ ironic-conductor-daemonset:
|
|||
global:
|
||||
kolla:
|
||||
ironic:
|
||||
all:
|
||||
ironic_api_vip: 172.21.0.1
|
||||
conductor:
|
||||
all:
|
||||
ironic_interface: net1
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
{{- $ironicInterface := include "kolla_val_get_str" (dict "key" "ironic_interface" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $elementName := .Values.element_name | default $resourceName }}
|
||||
{{- $ironicInterface := include "kolla_val_get_str" (dict "key" "ironic_interface" "searchPath" $searchPath "Values" .Values )}}
|
||||
{{- $ironicAPI := include "kolla_val_get_str" (dict "key" "ironic_api_vip" "searchPath" $searchPath "Values" .Values )}}
|
||||
{{- with $env := dict "netHostTrue" $netHostTrue "podTypeBootstrap" $podTypeBootstrap "imageFull" $imageFull "resourceName" $resourceName "serviceName" $serviceName "serviceType" $serviceType "privileged" $privileged "Values" .Values "Release" .Release "searchPath" $searchPath }}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: DaemonSet
|
||||
|
@ -50,6 +51,7 @@ spec:
|
|||
cp -a /config/pxe/..data/* /pxe/;
|
||||
IP=$(ip addr show dev {{ $ironicInterface }} | grep -G ''inet '' | awk ''{print $2}'' | sed ''s@/.*@@'');
|
||||
jq ''.command = \"in.tftpd -v -L -u root -a ''$IP'':69 --map-file /map-file /tftpboot\"'' /config/pxe/..data/config.json > /pxe/config.json;
|
||||
crudini --set /ironic/nova.conf conductor api_url http://{{ $ironicAPI }}:6385;
|
||||
"],
|
||||
"volumeMounts": [
|
||||
{
|
||||
|
@ -77,10 +79,32 @@ spec:
|
|||
"mountPath": "/tftpboot/"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "pxelinux",
|
||||
"image": {{ $imageFullPXE | quote }},
|
||||
"imagePullPolicy": {{ $imagePullPolicy | quote }},
|
||||
"command": [
|
||||
"sh",
|
||||
"-xec",
|
||||
"if [ -f /var/lib/tftpboot/pxelinux.0 ]; then
|
||||
cp /var/lib/tftpboot/pxelinux.0 /tftpboot;
|
||||
fi;
|
||||
if [ -f /usr/lib/PXELINUX/pxelinux.0 ]; then
|
||||
cp /usr/lib/PXELINUX/pxelinux.0 /tftpboot;
|
||||
fi;
|
||||
"],
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "tftpboot",
|
||||
"mountPath": "/tftpboot/"
|
||||
}
|
||||
]
|
||||
}
|
||||
]'
|
||||
spec:
|
||||
hostNetwork: True
|
||||
hostIPC: True
|
||||
nodeSelector:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
|
@ -96,6 +120,8 @@ spec:
|
|||
env:
|
||||
{{- include "common_env_vars" $env | indent 12 }}
|
||||
- name: main
|
||||
securityContext:
|
||||
privileged: true
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
image: "{{ $imageFull }}"
|
||||
volumeMounts:
|
||||
|
|
|
@ -69,3 +69,14 @@ node_id=$(openstack baremetal node list -c "UUID" -f value)
|
|||
openstack baremetal node show $node_id
|
||||
|
||||
openstack baremetal introspection rule list
|
||||
|
||||
tftp_srv=$(sudo netstat -tunlp | grep tftpd | awk '{print $4}')
|
||||
tftp_addr=${tftp_srv%:*}
|
||||
tftp $tftp_addr <<'EOF'
|
||||
get /pxelinux.0 ./pxelinux.0
|
||||
quit
|
||||
EOF
|
||||
downloaded=$(ls -l ./pxelinux.0 | wc -l)
|
||||
if [ $downloaded -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -12,13 +12,13 @@ if [ "x$DISTRO" == "xubuntu" ]; then
|
|||
sudo apt-get update
|
||||
sudo apt-get install lvm2
|
||||
sudo apt-get remove -y open-iscsi
|
||||
sudo apt-get install -y bridge-utils
|
||||
sudo apt-get install -y bridge-utils tftp
|
||||
(echo server:; echo " interface: 172.19.0.1"; echo " access-control: 0.0.0.0/0 allow") | \
|
||||
sudo /bin/bash -c "cat > /etc/unbound/unbound.conf.d/kubernetes.conf"
|
||||
else
|
||||
sudo yum clean all
|
||||
sudo yum remove -y iscsi-initiator-utils
|
||||
sudo yum install -y bridge-utils
|
||||
sudo yum install -y bridge-utils tftp
|
||||
sudo yum install -y lvm2
|
||||
(echo server:; echo " interface: 172.19.0.1"; echo " access-control: 0.0.0.0/0 allow") | \
|
||||
sudo /bin/bash -c "cat > /etc/unbound/conf.d/kubernetes.conf"
|
||||
|
|
Loading…
Reference in New Issue