Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Helm Charts as per the reconfiguration/parametrization of paths in source code and Docker images #61

Merged
merged 4 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 5g-control-plane/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: SD-Core 5G control plane services
name: 5g-control-plane
icon: https://guide.opencord.org/logos/cord.svg

version: 1.2.0
version: 2.0.0

dependencies:
- name: mongodb
Expand Down
16 changes: 10 additions & 6 deletions 5g-control-plane/templates/bin/_amf-run.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
#!/bin/bash
#!/bin/sh

# Copyright 2024-present Intel Corporation
# Copyright 2020-present Open Networking Foundation
#
# SPDX-License-Identifier: Apache-2.0

set -xe

IMGPATH={{ .Values.config.imagePath }}
{{- if .Values.config.coreDump.enabled }}
cp $IMGPATH/amf/amf /tmp/coredump/
cp /usr/local/bin/amf /tmp/coredump/
{{- end }}

cd $IMGPATH
cat config/amfcfg.conf
CFGPATH=/home
FILENAME=amfcfg.yaml
# copy config file from configmap (/opt) to a general directory (/home)
cp /opt/$FILENAME $CFGPATH/$FILENAME
cat $CFGPATH/$FILENAME
echo ""

#GOTRACEBACK=crash ./amf/amf -amfcfg config/amfcfg.conf
GOTRACEBACK=crash amf -cfg $CFGPATH/$FILENAME
13 changes: 9 additions & 4 deletions 5g-control-plane/templates/bin/_ausf-run.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
#!/bin/sh

# Copyright 2024-present Intel Corporation
# Copyright 2020-present Open Networking Foundation
#
# SPDX-License-Identifier: Apache-2.0

set -xe

{{- if .Values.config.coreDump.enabled }}
cp /free5gc/ausf/ausf /tmp/coredump/
cp /usr/local/bin/ausf /tmp/coredump/
{{- end }}

cd /free5gc
cat config/ausfcfg.conf
CFGPATH=/home
FILENAME=ausfcfg.yaml
# copy config file from configmap (/opt) to a general directory (/home)
cp /opt/$FILENAME $CFGPATH/$FILENAME
cat $CFGPATH/$FILENAME
echo ""

GOTRACEBACK=crash ./ausf/ausf -ausfcfg config/ausfcfg.conf
GOTRACEBACK=crash ausf -cfg $CFGPATH/$FILENAME
16 changes: 9 additions & 7 deletions 5g-control-plane/templates/bin/_metricfunc-run.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
#!/bin/sh

# Copyright 2024-present Intel Corporation
# Copyright 2022-present Open Networking Foundation
#
# SPDX-License-Identifier: Apache-2.0

set -xe

IMGPATH={{ .Values.config.imagePath }}
{{- if .Values.config.coreDump.enabled }}
cp /sdcore/metrics /tmp/coredump/
cp /usr/local/bin/metricfunc /tmp/coredump/
{{- end }}

cd /metricfunc
cat config/metricscfg.conf
CFGPATH=/home
FILENAME=metricscfg.yaml
# copy config file from configmap (/opt) to a general directory (/home)
cp /opt/$FILENAME $CFGPATH/$FILENAME
cat $CFGPATH/$FILENAME
echo ""

echo $PWD

GOTRACEBACK=crash /metricfunc/bin/metricfunc -metrics config/metricscfg.conf
GOTRACEBACK=crash metricfunc -cfg $CFGPATH/$FILENAME
14 changes: 9 additions & 5 deletions 5g-control-plane/templates/bin/_nrf-run.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
#!/bin/sh

# Copyright 2024-present Intel Corporation
# Copyright 2020-present Open Networking Foundation
#
# SPDX-License-Identifier: Apache-2.0

set -xe

{{- if .Values.config.coreDump.enabled }}
cp /free5gc/nrf/nrf /tmp/coredump/
cp /usr/local/bin/nrf /tmp/coredump/
{{- end }}

cd /free5gc
CFGPATH=/home
FILENAME=nrfcfg.yaml
# copy config file from configmap (/opt) to a general directory (/home)
cp /opt/$FILENAME $CFGPATH/$FILENAME
cat $CFGPATH/$FILENAME
echo ""

cat config/nrfcfg.conf

GOTRACEBACK=crash ./nrf/nrf -nrfcfg config/nrfcfg.conf
GOTRACEBACK=crash nrf -cfg $CFGPATH/$FILENAME
14 changes: 9 additions & 5 deletions 5g-control-plane/templates/bin/_nssf-run.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
#!/bin/sh

# Copyright 2024-present Intel Corporation
# Copyright 2020-present Open Networking Foundation
#
# SPDX-License-Identifier: Apache-2.0

set -xe

{{- if .Values.config.coreDump.enabled }}
cp /free5gc/nssf/nssf /tmp/coredump/
cp /usr/local/bin/nssf /tmp/coredump/
{{- end }}

cd /free5gc
CFGPATH=/home
FILENAME=nssfcfg.yaml
# copy config file from configmap (/opt) to a general directory (/home)
cp /opt/$FILENAME $CFGPATH/$FILENAME
cat $CFGPATH/$FILENAME
echo ""

cat config/nssfcfg.conf

GOTRACEBACK=crash ./nssf/nssf -nssfcfg config/nssfcfg.conf
GOTRACEBACK=crash nssf -cfg $CFGPATH/$FILENAME
14 changes: 9 additions & 5 deletions 5g-control-plane/templates/bin/_pcf-run.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
#!/bin/sh

# Copyright 2024-present Intel Corporation
# Copyright 2020-present Open Networking Foundation
#
# SPDX-License-Identifier: Apache-2.0

set -xe

{{- if .Values.config.coreDump.enabled }}
cp /free5gc/pcf/pcf /tmp/coredump/
cp /usr/local/bin/pcf /tmp/coredump/
{{- end }}

cd /free5gc
CFGPATH=/home
FILENAME=pcfcfg.yaml
# copy config file from configmap (/opt) to a general directory (/home)
cp /opt/$FILENAME $CFGPATH/$FILENAME
cat $CFGPATH/$FILENAME
echo ""

cat config/pcfcfg.conf

GOTRACEBACK=crash ./pcf/pcf -pcfcfg config/pcfcfg.conf
GOTRACEBACK=crash pcf -cfg $CFGPATH/$FILENAME
14 changes: 9 additions & 5 deletions 5g-control-plane/templates/bin/_sctplb-run.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
#!/bin/sh

# Copyright 2024-present Intel Corporation
# Copyright 2021-present Open Networking Foundation
#
# SPDX-License-Identifier: Apache-2.0

set -xe

{{- if .Values.config.coreDump.enabled }}
cp /sdcore/bin/sctplb /tmp/coredump/
cp /usr/local/bin/sctplb /tmp/coredump/
{{- end }}

cd /sdcore
CFGPATH=/home
FILENAME=sctplb.yaml
# copy config file from configmap (/opt) to a general directory (/home)
cp /opt/$FILENAME $CFGPATH/$FILENAME
cat $CFGPATH/$FILENAME
echo ""

cat config/sctplb.yaml

GOTRACEBACK=crash ./bin/sctplb config/sctplb.yaml
GOTRACEBACK=crash sctplb -cfg $CFGPATH/$FILENAME
22 changes: 14 additions & 8 deletions 5g-control-plane/templates/bin/_smf-run.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
#!/bin/bash
#!/bin/sh

# Copyright 2024-present Intel Corporation
# Copyright 2020-present Open Networking Foundation
#
# SPDX-License-Identifier: Apache-2.0

set -xe

IMGPATH={{ .Values.config.imagePath }}
{{- if .Values.config.coreDump.enabled }}
cp /free5gc/smf/smf /tmp/coredump/
cp /usr/local/bin/smf /tmp/coredump/
{{- end }}

cd $IMGPATH
CFGPATH=/home
FILENAME=smfcfg.yaml
UEFILENAME=uerouting.yaml
# copy config file from configmap (/opt) to a general directory (/home)
cp /opt/$FILENAME $CFGPATH/$FILENAME
cp /opt/$UEFILENAME $CFGPATH/$UEFILENAME
cat $CFGPATH/$FILENAME
echo ""
cat $CFGPATH/$UEFILENAME
echo ""

cat config/smfcfg.conf
cat uerouting/uerouting.conf

#GOTRACEBACK=crash ./smf/smf -smfcfg config/smfcfg.conf -uerouting uerouting/uerouting.conf
GOTRACEBACK=crash smf -cfg $CFGPATH/$FILENAME -uerouting $CFGPATH/$UEFILENAME
14 changes: 9 additions & 5 deletions 5g-control-plane/templates/bin/_udm-run.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
#!/bin/sh

# Copyright 2024-present Intel Corporation
# Copyright 2020-present Open Networking Foundation
#
# SPDX-License-Identifier: Apache-2.0

set -xe

{{- if .Values.config.coreDump.enabled }}
cp /free5gc/udm/udm /tmp/coredump/
cp /usr/local/bin/udm /tmp/coredump/
{{- end }}

cd /free5gc
CFGPATH=/home
FILENAME=udmcfg.yaml
# copy config file from configmap (/opt) to a general directory (/home)
cp /opt/$FILENAME $CFGPATH/$FILENAME
cat $CFGPATH/$FILENAME
echo ""

cat config/udmcfg.conf

GOTRACEBACK=crash ./udm/udm -udmcfg config/udmcfg.conf
GOTRACEBACK=crash udm -cfg $CFGPATH/$FILENAME
14 changes: 9 additions & 5 deletions 5g-control-plane/templates/bin/_udr-run.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
#!/bin/sh

# Copyright 2024-present Intel Corporation
# Copyright 2020-present Open Networking Foundation
#
# SPDX-License-Identifier: Apache-2.0

set -xe

{{- if .Values.config.coreDump.enabled }}
cp /free5gc/udr/udr /tmp/coredump/
cp /usr/local/bin/udr /tmp/coredump/
{{- end }}

cd /free5gc
CFGPATH=/home
FILENAME=udrcfg.yaml
# copy config file from configmap (/opt) to a general directory (/home)
cp /opt/$FILENAME $CFGPATH/$FILENAME
cat $CFGPATH/$FILENAME
echo ""

cat config/udrcfg.conf

GOTRACEBACK=crash ./udr/udr -udrcfg config/udrcfg.conf
GOTRACEBACK=crash udr -cfg $CFGPATH/$FILENAME
13 changes: 8 additions & 5 deletions 5g-control-plane/templates/bin/_upf-adapter-run.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
set -xe

{{- if .Values.config.coreDump.enabled }}
cp /aether/upfadapter /tmp/coredump/
cp /usr/local/bin/upfadapter /tmp/coredump/
{{- end }}

cd /aether
CFGPATH=/home
FILENAME=upfadaptercfg.yaml
# copy config file from configmap (/opt) to a general directory (/home)
cp /opt/$FILENAME $CFGPATH/$FILENAME
cat $CFGPATH/$FILENAME
echo ""

cat config/config.yaml

GOTRACEBACK=crash ./upfadapter -config config/config.yaml
GOTRACEBACK=crash upfadapter -cfg $CFGPATH/$FILENAME
14 changes: 9 additions & 5 deletions 5g-control-plane/templates/bin/_webui-run.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
#!/bin/sh

# Copyright 2024-present Intel Corporation
# Copyright 2020-present Open Networking Foundation
#
# SPDX-License-Identifier: Apache-2.0

set -xe

{{- if .Values.config.coreDump.enabled }}
cp /free5gc/webconsole/webconsole /tmp/coredump/
cp /usr/local/bin/webconsole /tmp/coredump/
{{- end }}

cd /free5gc
CFGPATH=/home
FILENAME=webuicfg.yaml
# copy config file from configmap (/opt) to a general directory (/home)
cp /opt/$FILENAME $CFGPATH/$FILENAME
cat $CFGPATH/$FILENAME
echo ""

cat config/webuicfg.conf

GOTRACEBACK=crash ./webconsole/webconsole -webuicfg config/webuicfg.conf
GOTRACEBACK=crash webconsole -cfg $CFGPATH/$FILENAME
2 changes: 1 addition & 1 deletion 5g-control-plane/templates/configmap-amf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{- if .Values.config.amf.deploy }}

{{- if not .Values.config.useExistingConfigMap -}}
{{- $amfcfg := index .Values.config.amf.cfgFiles "amfcfg.conf" }}
{{- $amfcfg := index .Values.config.amf.cfgFiles "amfcfg.yaml" }}
{{- $sbi := index $amfcfg.configuration "sbi" }}

{{- if not (hasKey $sbi "port") -}}
Expand Down
2 changes: 1 addition & 1 deletion 5g-control-plane/templates/configmap-ausf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{- if .Values.config.ausf.deploy }}

{{- if not .Values.config.useExistingConfigMap -}}
{{- $ausfcfg := index .Values.config.ausf.cfgFiles "ausfcfg.conf" }}
{{- $ausfcfg := index .Values.config.ausf.cfgFiles "ausfcfg.yaml" }}
{{- $sbi := index $ausfcfg.configuration "sbi" }}

{{- if not (hasKey $ausfcfg "logger") -}}
Expand Down
2 changes: 1 addition & 1 deletion 5g-control-plane/templates/configmap-metricfunc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{- if .Values.config.metricfunc.deploy }}

{{- if not .Values.config.useExistingConfigMap -}}
{{- $metricscfg := index .Values.config.metricfunc.cfgFiles "metricscfg.conf" }}
{{- $metricscfg := index .Values.config.metricfunc.cfgFiles "metricscfg.yaml" }}

{{- end }}

Expand Down
2 changes: 1 addition & 1 deletion 5g-control-plane/templates/configmap-nrf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{- if .Values.config.nrf.deploy }}

{{- if not .Values.config.useExistingConfigMap -}}
{{- $nrfcfg := index .Values.config.nrf.cfgFiles "nrfcfg.conf" }}
{{- $nrfcfg := index .Values.config.nrf.cfgFiles "nrfcfg.yaml" }}
{{- $config := index $nrfcfg "configuration" }}
{{- $sbi := index $config "sbi" }}

Expand Down
2 changes: 1 addition & 1 deletion 5g-control-plane/templates/configmap-nssf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{- if .Values.config.nssf.deploy }}

{{- if not .Values.config.useExistingConfigMap -}}
{{- $nssfcfg := index .Values.config.nssf.cfgFiles "nssfcfg.conf" }}
{{- $nssfcfg := index .Values.config.nssf.cfgFiles "nssfcfg.yaml" }}
{{- $sbi := index $nssfcfg.configuration "sbi" }}

{{- if not (hasKey $nssfcfg "logger") -}}
Expand Down
2 changes: 1 addition & 1 deletion 5g-control-plane/templates/configmap-pcf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{- if .Values.config.pcf.deploy }}

{{- if not .Values.config.useExistingConfigMap -}}
{{- $pcfcfg := index .Values.config.pcf.cfgFiles "pcfcfg.conf" }}
{{- $pcfcfg := index .Values.config.pcf.cfgFiles "pcfcfg.yaml" }}
{{- $sbi := index $pcfcfg.configuration "sbi" }}
{{- $config := index $pcfcfg "configuration" }}

Expand Down
2 changes: 1 addition & 1 deletion 5g-control-plane/templates/configmap-smf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{{- if .Values.config.smf.deploy }}

{{- if not .Values.config.useExistingConfigMap -}}
{{- $smfcfg := index .Values.config.smf.cfgFiles "smfcfg.conf" }}
{{- $smfcfg := index .Values.config.smf.cfgFiles "smfcfg.yaml" }}
{{- $sbi := index $smfcfg.configuration "sbi" }}

{{- if not (hasKey $smfcfg.configuration "mongodb") -}}
Expand Down
Loading
Loading