Commit 3e6ef7ba authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/docker-improvements-august-2021' into integration_2021_w32

parents a0e3cc8d 4db87599
......@@ -6,10 +6,8 @@ eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
eNB_ID = 0xe01;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
......@@ -128,24 +126,25 @@ eNBs =
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
*/
// Parameters for SIB19
discRxPool_cp_Len = "normal"
discRxPool_discPeriod = "rf32"
discRxPool_numRetx = 1;
discRxPool_numRepetition = 2;
discRxPool_ResourceConfig_prb_Num = 5;
discRxPool_ResourceConfig_prb_Start = 3;
discRxPool_ResourceConfig_prb_End = 21;
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size= 5;
discRxPool_cp_Len = "normal"
discRxPool_discPeriod = "rf32"
discRxPool_numRetx = 1;
discRxPool_numRepetition = 2;
discRxPool_ResourceConfig_prb_Num = 5;
discRxPool_ResourceConfig_prb_Start = 3;
discRxPool_ResourceConfig_prb_End = 21;
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
//SSB central frequency of NR secondary cell group (for ENDC NSA)
nr_scg_ssb_freq = 641272;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
......@@ -175,6 +174,7 @@ eNBs =
SCTP_OUTSTREAMS = 2;
};
enable_measurement_reports = "no";
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
......@@ -185,10 +185,8 @@ eNBs =
}
);
enable_measurement_reports = "no";
///X2
enable_x2 = "no";
enable_x2 = "no";
t_reloc_prep = 1000; /* unit: millisecond */
tx2_reloc_overall = 2000; /* unit: millisecond */
t_dc_prep = 1000; /* unit: millisecond */
......
......@@ -8,7 +8,6 @@ gNBs =
{
////////// Identification parameters:
gNB_ID = 0xe00;
cell_type = "CELL_MACRO_GNB";
gNB_name = "gNB-Eurecom-5GNRBox";
......@@ -185,102 +184,101 @@ gNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
port = 36412 ;
active = "yes";
preference = "ipv4";
}
);
# mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
# ipv6 = "192:168:30::17";
# port = 36412 ;
# active = "yes";
# preference = "ipv4";
# }
# );
///X2
enable_x2 = "yes";
enable_x2 = "yes";
t_reloc_prep = 1000; /* unit: millisecond */
tx2_reloc_overall = 2000; /* unit: millisecond */
t_dc_prep = 1000; /* unit: millisecond */
t_dc_overall = 2000; /* unit: millisecond */
target_enb_x2_ip_address = (
{ ipv4 = "CI_FR1_CTL_ENB_IP_ADDR";
ipv6 = "192:168:30::17";
preference = "ipv4";
}
);
target_enb_x2_ip_address = ( { ipv4 = "CI_FR1_CTL_ENB_IP_ADDR";
ipv6 = "192:168:30::17";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR";
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
GNB_IPV4_ADDRESS_FOR_S1U = "CI_GNB_IP_ADDR";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR";
GNB_PORT_FOR_X2C = 36422; # Spec 36422
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR";
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
GNB_IPV4_ADDRESS_FOR_S1U = "CI_GNB_IP_ADDR";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR";
GNB_PORT_FOR_X2C = 36422; # Spec 36422
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
}
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 6;
}
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 6;
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 3
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 111;
eNB_instances = [0];
# clock_src = "external";
}
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 3
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 111;
eNB_instances = [0];
# clock_src = "external";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
//parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
uicc: {
opc = "testopc";
opc = "testopc";
};
This diff is collapsed.
......@@ -32,7 +32,7 @@ services:
entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'"
oai_hss:
image: oai-hss:develop-2021-06-14
image: oai-hss:latest
container_name: rfsim4g-oai-hss
privileged: true
depends_on: [cassandra]
......@@ -59,7 +59,7 @@ services:
retries: 5
oai_mme:
image: oai-mme:production
image: oai-mme:latest
container_name: rfsim4g-oai-mme
privileged: true
depends_on: [oai_hss]
......@@ -116,7 +116,7 @@ services:
retries: 5
oai_spgwc:
image: oai-spgwc:develop-2021-06-14
image: oai-spgwc:latest
privileged: true
depends_on: [oai_mme]
container_name: rfsim4g-oai-spgwc
......@@ -148,7 +148,7 @@ services:
retries: 5
oai_spgwu:
image: oai-spgwu-tiny:develop-2021-06-14
image: oai-spgwu-tiny:latest
privileged: true
container_name: rfsim4g-oai-spgwu-tiny
depends_on: [oai_spgwc]
......@@ -177,19 +177,6 @@ services:
timeout: 5s
retries: 5
flexran_rtc:
image: flexran-rtc:production
privileged: true
container_name: rfsim4g-flexran-rtc
networks:
public_net:
ipv4_address: 192.168.61.10
healthcheck:
test: /bin/bash -c "pgrep rt_controller"
interval: 10s
timeout: 5s
retries: 5
trf_gen:
image: trf-gen:production
privileged: true
......@@ -235,6 +222,11 @@ services:
FLEXRAN_INTERFACE_NAME: eth0
FLEXRAN_IPV4_ADDRESS: 192.168.61.10
USE_ADDITIONAL_OPTIONS: --rfsim
healthcheck:
test: /bin/bash -c "pgrep lte-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai_ue0:
image: oai-lte-ue:develop
......@@ -257,6 +249,11 @@ services:
MSISDN: '001011234561010'
HPLMN: 20896
USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1
healthcheck:
test: /bin/bash -c "pgrep lte-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
networks:
private_net:
......@@ -264,9 +261,12 @@ networks:
ipam:
config:
- subnet: 192.168.68.0/26
driver_opts:
com.docker.network.bridge.name: "rfsim4g-private"
public_net:
name: rfsim4g-oai-public-net
ipam:
config:
- subnet: 192.168.61.0/26
driver_opts:
com.docker.network.bridge.name: "rfsim4g-public"
......@@ -48,6 +48,7 @@ RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \
nettle \
procps-ng \
atlas \
net-tools \
iputils \
......
......@@ -51,6 +51,7 @@ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
software-properties-common \
procps \
libsctp1 \
libnettle6 \
libblas3 \
......
......@@ -25,7 +25,7 @@
#
#---------------------------------------------------------------------
FROM localhost/ran-build:latest AS gnb-build
FROM ran-build:latest AS gnb-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
......@@ -37,11 +37,9 @@ RUN /bin/sh oaienv && \
mkdir -p log && \
./build_oai --gNB --ninja -w USRP --verbose-ci
#debug
#RUN ldconfig -v
#RUN ldd /oai-ran/targets/bin/nr-softmodem.Rel15
#RUN ls -lst /oai-ran/targets/bin
#RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
RUN yum install -y python3-pip && \
pip3 install --ignore-installed pyyaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb
......@@ -49,6 +47,7 @@ FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb
RUN yum repolist --disablerepo=* && \
yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
procps-ng \
libXpm \
libX11 \
atlas \
......@@ -62,6 +61,7 @@ RUN yum repolist --disablerepo=* && \
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build /oai-ran/targets/bin/nr-softmodem.Rel15 .
COPY --from=gnb-build /oai-ran/docker/scripts/gnb_entrypoint.sh entrypoint.sh
WORKDIR /usr/local/lib/
COPY --from=gnb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
......@@ -99,23 +99,10 @@ COPY --from=gnb-build /lib64/libboost_timer.so.1.66.0 /lib64
COPY --from=gnb-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
RUN ldconfig
#debug
#RUN ldd /opt/oai-gnb/bin/nr-softmodem.Rel15
#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
#RUN ldd /usr/local/lib/libcoding.so
#RUN ldd /usr/local/lib/libparams_libconfig.so
#RUN ldd /usr/local/lib/libdfts.so
#RUN ldd /usr/local/lib/libldpc.so
#RUN ldd /usr/local/lib/libldpc_optim.so
#RUN ldd /usr/local/lib/libldpc_optim8seg.so
#RUN ldd /usr/local/lib/libldpc_orig.so
# Copy the relevant configuration files for gNB
WORKDIR /opt/oai-gnb/etc
COPY --from=gnb-build /oai-ran/ci-scripts/conf_files/gnb.* .
COPY --from=gnb-build /oai-ran/docker/etc .
WORKDIR /opt/oai-gnb
#EXPOSE 2152/udp # S1U, GTP/UDP
......@@ -125,6 +112,5 @@ WORKDIR /opt/oai-gnb
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
#CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
#ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
......@@ -37,23 +37,22 @@ RUN /bin/sh oaienv && \
mkdir -p log && \
./build_oai --gNB --ninja -w USRP --verbose-ci
#debug
RUN ldconfig -v
RUN ldd /oai-ran/targets/bin/nr-softmodem.Rel15
RUN ls -lst /oai-ran/targets/bin
RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
RUN apt-get install -y python3-pip && \
pip3 install --ignore-installed pyyaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml
#start from scratch for target executable
FROM ubuntu:bionic as oai-gnb
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
software-properties-common \
procps \
libsctp1 \
tzdata \
libnettle6 \
libblas3 \
libatlas3-base \
......@@ -76,6 +75,7 @@ RUN apt-get update && \
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build /oai-ran/targets/bin/nr-softmodem.Rel15 .
COPY --from=gnb-build /oai-ran/docker/scripts/gnb_entrypoint.sh entrypoint.sh
WORKDIR /usr/local/lib/
COPY --from=gnb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
......@@ -96,23 +96,10 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li
COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 .
RUN ldconfig
#debug
#RUN ldd /opt/oai-gnb/bin/nr-softmodem.Rel15
#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
#RUN ldd /usr/local/lib/libcoding.so
#RUN ldd /usr/local/lib/libparams_libconfig.so
#RUN ldd /usr/local/lib/libdfts.so
#RUN ldd /usr/local/lib/libldpc.so
#RUN ldd /usr/local/lib/libldpc_optim.so
#RUN ldd /usr/local/lib/libldpc_optim8seg.so
#RUN ldd /usr/local/lib/libldpc_orig.so
# Copy the relevant configuration files for gNB
WORKDIR /opt/oai-gnb/etc
COPY --from=gnb-build /oai-ran/ci-scripts/conf_files/gnb.* ./
COPY --from=gnb-build /oai-ran/docker/etc .
WORKDIR /opt/oai-gnb
#EXPOSE 2152/udp # S1U, GTP/UDP
......@@ -122,6 +109,5 @@ WORKDIR /opt/oai-gnb
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
#CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
#ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
......@@ -48,6 +48,7 @@ ENV TZ=Europe/Paris
RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
tzdata \
procps-ng \
atlas \
net-tools \
iputils \
......
......@@ -50,6 +50,7 @@ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
tzdata \
procps \
software-properties-common \
libblas3 \
libatlas3-base \
......
......@@ -48,6 +48,7 @@ FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ue
RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \
procps-ng \
nettle \
atlas \
iproute \
......
......@@ -52,6 +52,7 @@ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
software-properties-common \
procps \
libsctp1 \
libnettle6 \
liblapacke \
......
......@@ -25,7 +25,7 @@
#
#---------------------------------------------------------------------
FROM localhost/ran-build:latest AS nr-ue-build
FROM ran-build:latest AS nr-ue-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
......@@ -49,6 +49,7 @@ FROM registry.access.redhat.com/ubi8/ubi:latest as oai-nr-ue
RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \
procps-ng \
nettle \
net-tools \
iputils \
......
......@@ -54,6 +54,7 @@ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
software-properties-common \
libsctp1 \
procps \
libnettle6 \
liblapacke \
libatlas3-base \
......
......@@ -25,7 +25,7 @@
#
#---------------------------------------------------------------------
FROM localhost/ran-build:develop AS phy-sim-build
FROM ran-build:develop AS phy-sim-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
......
......@@ -44,8 +44,11 @@ RUN rm -f /etc/rhsm-host && \
file \
psmisc \
git \
# python3-pip and pyyaml are used for conf template generation
python3-pip
#unzip is needed for protobuf
unzip && \
pip3 install --ignore-installed pyyaml && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
......
......@@ -42,7 +42,10 @@ RUN apt-get update && \
git \
xxd \
#unzip is needed for protobuf
unzip
unzip \
# python3-pip for conf template generation
python3-pip && \
pip3 install --ignore-installed pyyaml
# In some network environments, GIT proxy is required
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
......@@ -56,4 +59,3 @@ RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -I -w USRP
......@@ -4,6 +4,8 @@ set -euo pipefail
PREFIX=/opt/oai-enb
RRC_INACTIVITY_THRESHOLD=${RRC_INACTIVITY_THRESHOLD:-0}
ENABLE_MEASUREMENT_REPORTS=${ENABLE_MEASUREMENT_REPORTS:-no}
ENABLE_X2=${ENABLE_X2:-no}
# Based another env var, pick one template to use
if [[ -v USE_FDD_CU ]]; then ln -s $PREFIX/etc/cu.fdd.conf $PREFIX/etc/enb.conf; fi
......
......@@ -123,7 +123,7 @@
- key: bands
env: "@UTRA_BAND_ID@"
- filePrefix: enb.band7.tm1.25PRB.usrpb210
- filePrefix: enb.band7.tm1.fr1.25PRB.usrpb210.conf
outputfilename: "enb.fdd.conf"
config:
- key: Active_eNBs
......@@ -147,6 +147,10 @@
env: "@NID_CELL@"
- key: N_RB_DL
env: "@NB_PRB@"
- key: enable_measurement_reports
env: "@ENABLE_MEASUREMENT_REPORTS@"
- key: enable_x2
env: "@ENABLE_X2@"
- key: ipv4
env: "@MME_S1C_IP_ADDRESS@"
- key: ENB_INTERFACE_NAME_FOR_S1_MME
......
......@@ -48,18 +48,19 @@ def main():
"du.band7.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rru.fdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rru.tdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"enb.band7.tm1.25PRB.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"enb.band7.tm1.fr1.25PRB.usrpb210.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"enb.band40.tm1.25PRB.FairScheduler.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rcc.band7.tm1.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rcc.band7.tm1.if4p5.lo.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rcc.band40.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"gnb.band78.tm1.fr1.106PRB.usrpb210.conf": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"ue.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"ue_sim_ci": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}'
}
print('inputfile = ' + inputfile)
if filePrefix in prefix_outputfile:
outputfile1 = prefix_outputfile[filePrefix]
directory = f'{data[0]["paths"]["dest_dir"]}'
if not os.path.exists(directory):
os.makedirs(directory, exist_ok=True)
......
#!/bin/bash
set -euo pipefail
PREFIX=/opt/oai-gnb
ENABLE_X2=${ENABLE_X2:-yes}
# Based another env var, pick one template to use
if [[ -v USE_TDD_MONO ]]; then ln -s $PREFIX/etc/gnb.tdd.conf $PREFIX/etc/gnb.conf; fi
# Only this template will be manipulated
CONFIG_FILES=`ls $PREFIX/etc/gnb.conf || true`
for c in ${CONFIG_FILES}; do
# grep variable names (format: ${VAR}) from template to be rendered
VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
# create sed expressions for substituting each occurrence of ${VAR}
# with the value of the environment variable "VAR"
EXPRESSIONS=""
for v in ${VARS}; do
NEW_VAR=`echo $v | sed -e "s#@##g"`
if [[ "${!NEW_VAR}x" == "x" ]]; then
echo "Error: Environment variable '${NEW_VAR}' is not set." \
"Config file '$(basename $c)' requires all of $VARS."
exit 1
fi
EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g"
done
EXPRESSIONS="${EXPRESSIONS#';'}"
# render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c}
done
# Load the USRP binaries
if [[ -v USE_B2XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
elif [[ -v USE_N3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
fi
echo "=================================="
echo "== Starting gNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
echo "Additional option(s): ${USE_ADDITIONAL_OPTIONS}"
new_args=()
while [[ $# -gt 0 ]]; do
new_args+=("$1")
shift
done
for word in ${USE_ADDITIONAL_OPTIONS}; do
new_args+=("$word")
done
echo "${new_args[@]}"
exec "${new_args[@]}"
else
echo "$@"
exec "$@"
fi
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
---
- paths:
source_dir: "ci-scripts/conf_files/"
dest_dir: docker/etc
- configurations:
- filePrefix: gnb.band78.tm1.fr1.106PRB.usrpb210.conf
outputfilename: "gnb.tdd.conf"
config:
- key: Active_gNBs
env: "@GNB_NAME@"
- key: gNB_name
env: "@GNB_NAME@"
- key: plmn_list
env:
mcc: "@MCC@"
mnc: "@MNC@"
mnc_length: "@MNC_LENGTH@"
- key: tracking_area_code
env: "@TAC@"
- key: enable_x2
env: "@ENABLE_X2@"
- key: ipv4
env: "@ENB_X2_IP_ADDRESS@"
- key: GNB_INTERFACE_NAME_FOR_S1_MME
env: "@GNB_S1C_IF_NAME@"
- key: GNB_IPV4_ADDRESS_FOR_S1_MME
env: "@GNB_S1C_IP_ADDRESS@"
- key: GNB_INTERFACE_NAME_FOR_S1U
env: "@GNB_S1U_IF_NAME@"
- key: GNB_IPV4_ADDRESS_FOR_S1U
env: "@GNB_S1U_IP_ADDRESS@"
- key: GNB_IPV4_ADDRESS_FOR_X2C
env: "@GNB_X2_IP_ADDRESS@"
- key: rrc_inactivity_threshold
env: "@RRC_INACTIVITY_THRESHOLD@"
- key: FLEXRAN_ENABLED
env: "@FLEXRAN_ENABLED@"
- key: FLEXRAN_INTERFACE_NAME
env: "@FLEXRAN_INTERFACE_NAME@"
- key: FLEXRAN_IPV4_ADDRESS
env: "@FLEXRAN_IPV4_ADDRESS@"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment