Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
shadansari committed Dec 6, 2019
2 parents bd23e5b + 5ae1ff5 commit 593de1e
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 17 deletions.
7 changes: 7 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@
path = xranc-sb-api
url = https://github.com/OpenNetworkingFoundation/xranc-sb-api.git
branch = master
[submodule "common/hiredis"]
path = common/hiredis
url = https://github.com/redis/hiredis
[submodule "common/grpc"]
path = common/grpc
url = https://github.com/grpc/grpc
branch = v1.20.x
37 changes: 22 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,48 @@ SHELL := /bin/bash
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
OS_VENDOR := $(shell lsb_release -i -s)
OS_RELEASE := $(shell lsb_release -r -s)
GRPC_BRANCH := master
NUM_CORES := 4
GRPC_DIR := /tmp/grpc
GRPC_BRANCH := v1.20.0
GRPC_DIR := $(ROOT_DIR)/common/grpc
HIREDIS_TAG := v0.14.0
HIREDIS_DIR := $(ROOT_DIR)/common/hiredis
PROTOBUF_DIR := $(GRPC_DIR)/third_party/protobuf
XRANC_DIR := $(ROOT_DIR)/xranc
XRANC_SBI_DIR := $(ROOT_DIR)/xranc-sb-api-src
XRANC_NBI_DIR := $(ROOT_DIR)/xranc-nb-api-src
XRANC_ENBSIM_DIR := $(ROOT_DIR)/enbsim
XRANC_DB_DIR := $(ROOT_DIR)/database

all: install_prerequisites get_submodules build_xranc-sb build_xranc-nb build_xranc build_enbsim
all: modules utilities build

install_prerequisites:
build: build_xranc-sb build_xranc-nb build_xranc build_enbsim

modules:
cd $(ROOT_DIR) && git submodule init && git submodule update;
cd $(GRPC_DIR) && git fetch --all && git checkout $(GRPC_BRANCH)
cd $(HIREDIS_DIR) && git fetch --all && git checkout $(HIREDIS_TAG);

utilities:
@if [[ $(OS_VENDOR) =~ (Ubuntu) ]]; then \
if [[ $(OS_RELEASE) =~ (16.04) ]]; then \
echo "WARN: Not fully tested on $(OS_VENDOR) $(OS_RELEASE)."; \
sudo apt update; \
sudo apt-get install -y libevent2-dev libjsoncpp-dev libsctp-dev; \
sudo apt install -y libevent2-dev libjsoncpp-dev libsctp-dev; \
elif [[ $(OS_RELEASE) =~ (18.04) ]]; then \
sudo apt update; \
sudo apt-get install libevent-dev libjsoncpp-dev libsctp-dev; \
sudo apt install -y libevent-dev libjsoncpp-dev libsctp-dev; \
fi \
else \
echo "Unsupported OS - Ubuntu 18.04 is recommended"; \
exit 1; \
fi
sudo apt-get install -y build-essential autoconf git pkg-config automake libtool curl make g++ unzip;
git clone -b $(GRPC_BRANCH) https://github.com/grpc/grpc $(GRPC_DIR); \
cd $(GRPC_DIR) && git submodule update --init && echo "--- installing protobuf ---" && cd $(PROTOBUF_DIR) && \
./autogen.sh && ./configure --enable-shared && make -j$(NUM_CORES) && sudo make install && make clean && sudo ldconfig && \
echo "--- installing grpc ---" && cd $(GRPC_DIR) && make -j$(NUM_CORES) && sudo make install && make clean && sudo ldconfig;
sudo apt install -y build-essential autoconf git pkg-config automake libtool curl make g++ unzip;
# build gRPC
cd $(GRPC_DIR) && git submodule update --init && make && sudo make install;
# build protobuf
cd $(PROTOBUF_DIR) && make && sudo make install;
# build hiredis
cd $(HIREDIS_DIR) && make && sudo make install;

get_submodules:
cd $(ROOT_DIR) && git submodule init && git submodule update;

build_xranc-sb:
cd $(XRANC_SBI_DIR) && make;

Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ cd xranc
make
```

**NOTE**: Makefile in the root directory has four options:
- make or make all: install everything in this repo
- make utilities: only install utilities and dependencies
- make build: build xranc interfaces, xranc, and enbsim
- make clean: clean all object and binary files

## Manual steps to install xRANc
### Install dependencies
```
Expand All @@ -19,6 +25,14 @@ sudo apt install libsctp-dev
#### Install gRPC
Please follow this [link](https://github.com/grpc/grpc/blob/v1.25.0/BUILDING.md)

#### Install hiredis
```
git clone https://github.com/redis/hiredis
cd /path/to/hiredis
make
sudo make install
```

#### Clone with SSH or HTTPS
```
git clone [email protected]:OpenNetworkingFoundation/xranc.git
Expand Down
1 change: 1 addition & 0 deletions common/grpc
Submodule grpc added at 200e0f
1 change: 1 addition & 0 deletions common/hiredis
Submodule hiredis added at 5d0568
4 changes: 2 additions & 2 deletions xranc/xran-cfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"l2_meas_report_interval_ms": 5000,
"rx_signal_meas_report_interval_ms": 7000,
"xranc_cellconfigrequest_interval_seconds": 5,
"xranc_bind_ip": "10.0.0.10",
"xranc_bind_ip": "127.0.0.1",
"xranc_port": 5555,
"admission_success": true,
"bearer_success": true,
"no_meas_link_removal_ms": 1000000,
"idle_ue_removal_ms": 1,
"nb_response_timeout_ms": 10000,
"redis_ip_addr": "10.0.0.11",
"redis_ip_addr": "127.0.0.1",
"redis_port": 50002,
"xranc_nbi_port": 50001
}

0 comments on commit 593de1e

Please sign in to comment.