Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 1 | #!/bin/bash |
Jeremy Ronquillo | ec2d3e4 | 2020-06-05 11:33:39 -0700 | [diff] [blame] | 2 | |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 3 | # Copyright 2019-present Open Networking Foundation |
| 4 | # |
Jeremy Ronquillo | 6046ce3 | 2020-06-18 11:06:29 -0700 | [diff] [blame] | 5 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 6 | |
| 7 | set -xe |
| 8 | |
| 9 | {{- if .Values.config.coreDump.enabled }} |
| 10 | cp /bin/ngic_controlplane /tmp/coredump/ |
| 11 | {{- end }} |
| 12 | |
| 13 | mkdir -p /opt/cp/config |
| 14 | cd /opt/cp/config |
Hyunsun Moon | 7f03a77 | 2020-09-27 23:23:50 -0500 | [diff] [blame] | 15 | cp /etc/cp/config/{*.cfg,*.json} . |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 16 | |
Hyunsun Moon | 7f03a77 | 2020-09-27 23:23:50 -0500 | [diff] [blame] | 17 | if [ ! -d "/dev/hugepages" ]; then |
| 18 | MEMORY="--no-huge -m $((MEM_LIMIT-1024))" |
| 19 | fi |
| 20 | CORES="-c $(taskset -p $$ | awk '{print $NF}')" |
| 21 | EAL_ARGS="${CORES} ${MEMORY} --no-pci" |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 22 | |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 23 | cat /opt/cp/config/subscriber_mapping.json |
Hyunsun Moon | 7f03a77 | 2020-09-27 23:23:50 -0500 | [diff] [blame] | 24 | ngic_controlplane $EAL_ARGS -- -f /etc/cp/config/ |