blob: 0a5b6809dac633f92a05ef518fc139f29040dd24 [file] [log] [blame]
Jeremy Ronquillo223db002020-06-05 10:28:22 -07001#!/bin/bash
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07002
Jeremy Ronquillo223db002020-06-05 10:28:22 -07003# Copyright 2019-present Open Networking Foundation
4#
Jeremy Ronquillo6046ce32020-06-18 11:06:29 -07005# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
Jeremy Ronquillo223db002020-06-05 10:28:22 -07006
7set -xe
8
9{{- if .Values.config.coreDump.enabled }}
10cp /bin/ngic_controlplane /tmp/coredump/
11{{- end }}
12
13mkdir -p /opt/cp/config
14cd /opt/cp/config
Hyunsun Moon7f03a772020-09-27 23:23:50 -050015cp /etc/cp/config/{*.cfg,*.json} .
Jeremy Ronquillo223db002020-06-05 10:28:22 -070016
Hyunsun Moon7f03a772020-09-27 23:23:50 -050017if [ ! -d "/dev/hugepages" ]; then
18 MEMORY="--no-huge -m $((MEM_LIMIT-1024))"
19fi
20CORES="-c $(taskset -p $$ | awk '{print $NF}')"
21EAL_ARGS="${CORES} ${MEMORY} --no-pci"
Jeremy Ronquillo223db002020-06-05 10:28:22 -070022
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070023cat /opt/cp/config/subscriber_mapping.json
Hyunsun Moon7f03a772020-09-27 23:23:50 -050024ngic_controlplane $EAL_ARGS -- -f /etc/cp/config/