Commit a518701a authored by Raphael Defosseux's avatar Raphael Defosseux

feat(docker): adding conf template to gNB container image

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 96997d1e
...@@ -6,10 +6,8 @@ eNBs = ...@@ -6,10 +6,8 @@ eNBs =
( (
{ {
////////// Identification parameters: ////////// Identification parameters:
eNB_ID = 0xe00; eNB_ID = 0xe01;
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB-Eurecom-LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
...@@ -139,13 +137,14 @@ eNBs = ...@@ -139,13 +137,14 @@ eNBs =
discRxPool_ResourceConfig_offsetIndicator_choice = 0; discRxPool_ResourceConfig_offsetIndicator_choice = 0;
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40"; discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff"; discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size= 5; discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; 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 : srb1_parameters :
{ {
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
...@@ -175,6 +174,7 @@ eNBs = ...@@ -175,6 +174,7 @@ eNBs =
SCTP_OUTSTREAMS = 2; SCTP_OUTSTREAMS = 2;
}; };
enable_measurement_reports = "no";
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
...@@ -185,8 +185,6 @@ eNBs = ...@@ -185,8 +185,6 @@ eNBs =
} }
); );
enable_measurement_reports = "no";
///X2 ///X2
enable_x2 = "no"; enable_x2 = "no";
t_reloc_prep = 1000; /* unit: millisecond */ t_reloc_prep = 1000; /* unit: millisecond */
......
...@@ -5,8 +5,6 @@ Asn1_verbosity = "none"; ...@@ -5,8 +5,6 @@ Asn1_verbosity = "none";
eNBs = eNBs =
( (
{ {
# real_time choice in {hard, rt-preempt, no}
real_time = "no";
////////// Identification parameters: ////////// Identification parameters:
eNB_ID = 0xe01; eNB_ID = 0xe01;
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
...@@ -14,21 +12,20 @@ eNBs = ...@@ -14,21 +12,20 @@ eNBs =
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1; tracking_area_code = 1;
plmn_list = ( plmn_list = ( { mcc = 222; mnc = 01; mnc_length = 2; } );
{ mcc = 222; mnc = 01; mnc_length = 2; }
);
tr_s_preference = "local_mac" tr_s_preference = "local_mac"
// In seconds
rrc_inactivity_threshold = 0;
////////// Physical parameters: ////////// Physical parameters:
component_carriers = ( component_carriers = (
{ {
node_function = "eNodeB_3GPP"; node_function = "3GPP_eNODEB";
node_timing = "synch_to_ext_device"; node_timing = "synch_to_ext_device";
node_synch_ref = 0; node_synch_ref = 0;
nb_antenna_ports = 1;
ue_TransmissionMode = 1;
frame_type = "FDD"; frame_type = "FDD";
tdd_config = 3; tdd_config = 3;
tdd_config_s = 0; tdd_config_s = 0;
...@@ -36,27 +33,25 @@ eNBs = ...@@ -36,27 +33,25 @@ eNBs =
eutra_band = 7; eutra_band = 7;
downlink_frequency = 2680000000L; downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
Nid_cell = 0; Nid_cell = 0;
N_RB_DL = 25; N_RB_DL = 25;
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1; nb_antennas_tx = 1;
nb_antennas_rx = 1; nb_antennas_rx = 1;
prach_root = 0;
tx_gain = 90; tx_gain = 90;
rx_gain = 115; rx_gain = 115;
pbch_repetition = "FALSE"; pbch_repetition = "FALSE";
prach_root = 0;
prach_config_index = 0; prach_config_index = 0;
prach_high_speed = "DISABLE"; prach_high_speed = "DISABLE";
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 2; prach_freq_offset = 2;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 0; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 0; pucch_n1_AN = 0;
pdsch_referenceSignalPower = -29; pdsch_referenceSignalPower= -29;
pdsch_p_b = 0; pdsch_p_b = 0;
pusch_n_SB = 1; pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE"; pusch_enable64QAM = "DISABLE";
...@@ -109,6 +104,7 @@ eNBs = ...@@ -109,6 +104,7 @@ eNBs =
ue_TimersAndConstants_t311 = 10000; ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20; ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1; ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
//Parameters for SIB18 //Parameters for SIB18
rxPool_sc_CP_Len = "normal"; rxPool_sc_CP_Len = "normal";
...@@ -198,39 +194,19 @@ eNBs = ...@@ -198,39 +194,19 @@ eNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "eth1"; ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_INTERFACE_NAME_FOR_S1U = "eth1";
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
ENB_PORT_FOR_X2C = 36422; # Spec 36422 ENB_PORT_FOR_X2C = 36422; # Spec 36422
}; };
log_config :
{
global_log_level ="info";
global_log_verbosity ="high";
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 ="debug";
rlc_log_verbosity ="high";
pdcp_log_level ="info";
pdcp_log_verbosity ="high";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
} }
); );
MACRLCs = ( MACRLCs =
(
{ {
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
...@@ -241,21 +217,16 @@ MACRLCs = ( ...@@ -241,21 +217,16 @@ MACRLCs = (
} }
); );
THREAD_STRUCT = ( L1s =
{ (
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
worker_config = "WORKER_ENABLE";
}
);
L1s = (
{ {
num_cc = 1; num_cc = 1;
tr_n_preference = "local_mac"; tr_n_preference = "local_mac";
} }
); );
RUs = ( RUs =
(
{ {
local_rf = "yes" local_rf = "yes"
nb_tx = 1 nb_tx = 1
...@@ -270,6 +241,26 @@ RUs = ( ...@@ -270,6 +241,26 @@ RUs = (
} }
); );
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";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "eth0";
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no";
};
log_config : log_config :
{ {
global_log_level ="info"; global_log_level ="info";
...@@ -286,4 +277,5 @@ log_config : ...@@ -286,4 +277,5 @@ log_config :
pdcp_log_verbosity ="high"; pdcp_log_verbosity ="high";
rrc_log_level ="info"; rrc_log_level ="info";
rrc_log_verbosity ="medium"; rrc_log_verbosity ="medium";
}; };
...@@ -8,7 +8,6 @@ gNBs = ...@@ -8,7 +8,6 @@ gNBs =
{ {
////////// Identification parameters: ////////// Identification parameters:
gNB_ID = 0xe00; gNB_ID = 0xe00;
cell_type = "CELL_MACRO_GNB"; cell_type = "CELL_MACRO_GNB";
gNB_name = "gNB-Eurecom-5GNRBox"; gNB_name = "gNB-Eurecom-5GNRBox";
...@@ -185,13 +184,13 @@ gNBs = ...@@ -185,13 +184,13 @@ gNBs =
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; # mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17"; # ipv6 = "192:168:30::17";
port = 36412 ; # port = 36412 ;
active = "yes"; # active = "yes";
preference = "ipv4"; # preference = "ipv4";
} # }
); # );
///X2 ///X2
enable_x2 = "yes"; enable_x2 = "yes";
...@@ -199,8 +198,8 @@ gNBs = ...@@ -199,8 +198,8 @@ gNBs =
tx2_reloc_overall = 2000; /* unit: millisecond */ tx2_reloc_overall = 2000; /* unit: millisecond */
t_dc_prep = 1000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */
t_dc_overall = 2000; /* unit: millisecond */ t_dc_overall = 2000; /* unit: millisecond */
target_enb_x2_ip_address = (
{ ipv4 = "CI_FR1_CTL_ENB_IP_ADDR"; target_enb_x2_ip_address = ( { ipv4 = "CI_FR1_CTL_ENB_IP_ADDR";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
preference = "ipv4"; preference = "ipv4";
} }
...@@ -208,7 +207,6 @@ gNBs = ...@@ -208,7 +207,6 @@ gNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR"; GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR";
GNB_INTERFACE_NAME_FOR_S1U = "eth0"; GNB_INTERFACE_NAME_FOR_S1U = "eth0";
...@@ -217,6 +215,7 @@ gNBs = ...@@ -217,6 +215,7 @@ gNBs =
GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR"; GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR";
GNB_PORT_FOR_X2C = 36422; # Spec 36422 GNB_PORT_FOR_X2C = 36422; # Spec 36422
}; };
} }
); );
...@@ -257,14 +256,13 @@ THREAD_STRUCT = ( ...@@ -257,14 +256,13 @@ THREAD_STRUCT = (
{ {
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" #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_RU_L1_TRX_SPLIT";
//parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE"; worker_config = "WORKER_ENABLE";
} }
); );
log_config : log_config :
{ {
global_log_level ="info"; global_log_level ="info";
global_log_verbosity ="medium"; global_log_verbosity ="medium";
hw_log_level ="info"; hw_log_level ="info";
...@@ -279,8 +277,8 @@ THREAD_STRUCT = ( ...@@ -279,8 +277,8 @@ THREAD_STRUCT = (
pdcp_log_verbosity ="medium"; pdcp_log_verbosity ="medium";
rrc_log_level ="info"; rrc_log_level ="info";
rrc_log_verbosity ="medium"; rrc_log_verbosity ="medium";
}; };
uicc: { uicc: {
opc = "testopc"; opc = "testopc";
}; };
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
# #
#--------------------------------------------------------------------- #---------------------------------------------------------------------
FROM localhost/ran-build:latest AS gnb-build FROM ran-build:latest AS gnb-build
RUN rm -Rf /oai-ran RUN rm -Rf /oai-ran
WORKDIR /oai-ran WORKDIR /oai-ran
...@@ -37,11 +37,9 @@ RUN /bin/sh oaienv && \ ...@@ -37,11 +37,9 @@ RUN /bin/sh oaienv && \
mkdir -p log && \ mkdir -p log && \
./build_oai --gNB --ninja -w USRP --verbose-ci ./build_oai --gNB --ninja -w USRP --verbose-ci
#debug RUN yum install -y python3-pip && \
#RUN ldconfig -v pip3 install --ignore-installed pyyaml && \
#RUN ldd /oai-ran/targets/bin/nr-softmodem.Rel15 python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml
#RUN ls -lst /oai-ran/targets/bin
#RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
#start from scratch for target executable #start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb
...@@ -62,6 +60,7 @@ RUN yum repolist --disablerepo=* && \ ...@@ -62,6 +60,7 @@ RUN yum repolist --disablerepo=* && \
WORKDIR /opt/oai-gnb/bin WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build /oai-ran/targets/bin/nr-softmodem.Rel15 . 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/ WORKDIR /usr/local/lib/
COPY --from=gnb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 . COPY --from=gnb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
...@@ -99,23 +98,10 @@ COPY --from=gnb-build /lib64/libboost_timer.so.1.66.0 /lib64 ...@@ -99,23 +98,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 COPY --from=gnb-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
RUN ldconfig 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 # Copy the relevant configuration files for gNB
WORKDIR /opt/oai-gnb/etc 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 WORKDIR /opt/oai-gnb
#EXPOSE 2152/udp # S1U, GTP/UDP #EXPOSE 2152/udp # S1U, GTP/UDP
...@@ -125,6 +111,5 @@ WORKDIR /opt/oai-gnb ...@@ -125,6 +111,5 @@ WORKDIR /opt/oai-gnb
#EXPOSE 50000/udp # IF5 / ORI (control) #EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data) #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"]
#ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"] CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
CMD ["sleep", "infinity"]
...@@ -37,23 +37,21 @@ RUN /bin/sh oaienv && \ ...@@ -37,23 +37,21 @@ RUN /bin/sh oaienv && \
mkdir -p log && \ mkdir -p log && \
./build_oai --gNB --ninja -w USRP --verbose-ci ./build_oai --gNB --ninja -w USRP --verbose-ci
#debug RUN apt-get install -y python3-pip && \
RUN ldconfig -v pip3 install --ignore-installed pyyaml && \
RUN ldd /oai-ran/targets/bin/nr-softmodem.Rel15 python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml
RUN ls -lst /oai-ran/targets/bin
RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
#start from scratch for target executable #start from scratch for target executable
FROM ubuntu:bionic as oai-gnb FROM ubuntu:bionic as oai-gnb
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe ENV TZ=Europe
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && \ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \ DEBIAN_FRONTEND=noninteractive apt-get install --yes \
software-properties-common \ software-properties-common \
libsctp1 \ libsctp1 \
tzdata \
libnettle6 \ libnettle6 \
libblas3 \ libblas3 \
libatlas3-base \ libatlas3-base \
...@@ -76,6 +74,7 @@ RUN apt-get update && \ ...@@ -76,6 +74,7 @@ RUN apt-get update && \
WORKDIR /opt/oai-gnb/bin WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build /oai-ran/targets/bin/nr-softmodem.Rel15 . 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/ WORKDIR /usr/local/lib/
COPY --from=gnb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 . COPY --from=gnb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
...@@ -96,23 +95,10 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li ...@@ -96,23 +95,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 . COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 .
RUN ldconfig 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 # Copy the relevant configuration files for gNB
WORKDIR /opt/oai-gnb/etc 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 WORKDIR /opt/oai-gnb
#EXPOSE 2152/udp # S1U, GTP/UDP #EXPOSE 2152/udp # S1U, GTP/UDP
...@@ -122,6 +108,5 @@ WORKDIR /opt/oai-gnb ...@@ -122,6 +108,5 @@ WORKDIR /opt/oai-gnb
#EXPOSE 50000/udp # IF5 / ORI (control) #EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data) #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"]
#ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"] CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
CMD ["sleep", "infinity"]
...@@ -25,7 +25,7 @@ ...@@ -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 RUN rm -Rf /oai-ran
WORKDIR /oai-ran WORKDIR /oai-ran
......
...@@ -25,7 +25,7 @@ ...@@ -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 RUN rm -Rf /oai-ran
WORKDIR /oai-ran WORKDIR /oai-ran
......
...@@ -44,8 +44,11 @@ RUN rm -f /etc/rhsm-host && \ ...@@ -44,8 +44,11 @@ RUN rm -f /etc/rhsm-host && \
file \ file \
psmisc \ psmisc \
git \ git \
# python3-pip and pyyaml are used for conf template generation
python3-pip
#unzip is needed for protobuf #unzip is needed for protobuf
unzip && \ unzip && \
pip3 install --ignore-installed pyyaml && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /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 && \ ...@@ -42,7 +42,10 @@ RUN apt-get update && \
git \ git \
xxd \ xxd \
#unzip is needed for protobuf #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 # 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" 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 && \ ...@@ -56,4 +59,3 @@ RUN /bin/sh oaienv && \
cd cmake_targets && \ cd cmake_targets && \
mkdir -p log && \ mkdir -p log && \
./build_oai -I -w USRP ./build_oai -I -w USRP
...@@ -4,6 +4,8 @@ set -euo pipefail ...@@ -4,6 +4,8 @@ set -euo pipefail
PREFIX=/opt/oai-enb PREFIX=/opt/oai-enb
RRC_INACTIVITY_THRESHOLD=${RRC_INACTIVITY_THRESHOLD:-0} 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 # 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 if [[ -v USE_FDD_CU ]]; then ln -s $PREFIX/etc/cu.fdd.conf $PREFIX/etc/enb.conf; fi
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
- key: bands - key: bands
env: "@UTRA_BAND_ID@" env: "@UTRA_BAND_ID@"
- filePrefix: enb.band7.tm1.25PRB.usrpb210 - filePrefix: enb.band7.tm1.fr1.25PRB.usrpb210.conf
outputfilename: "enb.fdd.conf" outputfilename: "enb.fdd.conf"
config: config:
- key: Active_eNBs - key: Active_eNBs
...@@ -147,6 +147,10 @@ ...@@ -147,6 +147,10 @@
env: "@NID_CELL@" env: "@NID_CELL@"
- key: N_RB_DL - key: N_RB_DL
env: "@NB_PRB@" env: "@NB_PRB@"
- key: enable_measurement_reports
env: "@ENABLE_MEASUREMENT_REPORTS@"
- key: enable_x2
env: "@ENABLE_X2@"
- key: ipv4 - key: ipv4
env: "@MME_S1C_IP_ADDRESS@" env: "@MME_S1C_IP_ADDRESS@"
- key: ENB_INTERFACE_NAME_FOR_S1_MME - key: ENB_INTERFACE_NAME_FOR_S1_MME
......
...@@ -48,11 +48,12 @@ def main(): ...@@ -48,11 +48,12 @@ def main():
"du.band7.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "du.band7.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rru.fdd": 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}', "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}', "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.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"rcc.band7.tm1.if4p5.lo.25PRB": 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}', "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.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
"ue_sim_ci": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}' "ue_sim_ci": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}'
} }
......
#!/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