Commit c1f63858 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/ci-chore-updating-cn5g-v1.5' into integration_2023_w07

parents 70949fd4 31d6a5e9
...@@ -77,7 +77,7 @@ pipeline { ...@@ -77,7 +77,7 @@ pipeline {
withCredentials([ withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.DH_Credentials}", usernameVariable: 'DH_Username', passwordVariable: 'DH_Password'] [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.DH_Credentials}", usernameVariable: 'DH_Username', passwordVariable: 'DH_Password']
]) { ]) {
def listOfImages = ["oai-enb", "oai-gnb", "oai-lte-ue", "oai-nr-ue"] def listOfImages = ["oai-enb", "oai-gnb", "oai-lte-ue", "oai-nr-ue", "oai-nr-cuup"]
// Logging in on both registries // Logging in on both registries
sh "docker login -u ${DH_Username} -p ${DH_Password} > /dev/null 2>&1" sh "docker login -u ${DH_Username} -p ${DH_Password} > /dev/null 2>&1"
sh "docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr > /dev/null 2>&1" sh "docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr > /dev/null 2>&1"
......
...@@ -74,23 +74,22 @@ class Cmd(metaclass=abc.ABCMeta): ...@@ -74,23 +74,22 @@ class Cmd(metaclass=abc.ABCMeta):
class LocalCmd(Cmd): class LocalCmd(Cmd):
def __init__(self, d = None): def __init__(self, d = None):
self.cwd = d self.cwd = d
if self.cwd is not None:
logging.debug(f'Working dir is {self.cwd}')
self.cp = sp.CompletedProcess(args='', returncode=0, stdout='') self.cp = sp.CompletedProcess(args='', returncode=0, stdout='')
def run(self, line, timeout=300, silent=False, reportNonZero=True): def run(self, line, timeout=300, silent=False, reportNonZero=True):
if type(line) is str:
line = [s for s in line.split(' ') if len(s) > 0]
if not silent: if not silent:
logging.debug(' '.join(line)) logging.info(line)
try: try:
ret = sp.run(line, cwd=self.cwd, stdout=sp.PIPE, stderr=sp.STDOUT, timeout=timeout) ret = sp.run(line, shell=True, cwd=self.cwd, stdout=sp.PIPE, stderr=sp.STDOUT, timeout=timeout)
except Exception as e: except Exception as e:
ret = sp.CompletedProcess(args=line, returncode=255, stdout=f'Exception: {str(e)}'.encode('utf-8')) ret = sp.CompletedProcess(args=line, returncode=255, stdout=f'Exception: {str(e)}'.encode('utf-8'))
if ret.stdout is None: if ret.stdout is None:
ret.stdout = b'' ret.stdout = b''
ret.stdout = ret.stdout.decode('utf-8').strip() ret.stdout = ret.stdout.decode('utf-8').strip()
if reportNonZero and ret.returncode != 0: if reportNonZero and ret.returncode != 0:
cmd = ' '.join(ret.args) logging.warning(f'command "{ret.args}" returned non-zero returncode {ret.returncode}: output:\n{ret.stdout}')
logging.warning(f'command "{cmd}" returned non-zero returncode {ret.returncode}: output:\n{ret.stdout}')
self.cp = ret self.cp = ret
return ret return ret
......
...@@ -38,6 +38,9 @@ import os ...@@ -38,6 +38,9 @@ import os
import shutil import shutil
import subprocess import subprocess
import time import time
import pyshark
import threading
import cls_cmd
from multiprocessing import Process, Lock, SimpleQueue from multiprocessing import Process, Lock, SimpleQueue
from zipfile import ZipFile from zipfile import ZipFile
...@@ -62,7 +65,8 @@ def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTarge ...@@ -62,7 +65,8 @@ def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTarge
sshSession.command('mkdir -p ' + sourcePath, '\$', 5) sshSession.command('mkdir -p ' + sourcePath, '\$', 5)
sshSession.command('cd ' + sourcePath, '\$', 5) sshSession.command('cd ' + sourcePath, '\$', 5)
# Recent version of git (>2.20?) should handle missing .git extension # without problems # Recent version of git (>2.20?) should handle missing .git extension # without problems
sshSession.command(f'git clone --filter=blob:none -n -b develop {ranRepository} .', '\$', 60) baseBranch = re.sub('origin/', '', ranTargetBranch)
sshSession.command(f'git clone --filter=blob:none -n -b {baseBranch} {ranRepository} .', '\$', 60)
if sshSession.getBefore().count('error') > 0 or sshSession.getBefore().count('error') > 0: if sshSession.getBefore().count('error') > 0 or sshSession.getBefore().count('error') > 0:
sys.exit('error during clone') sys.exit('error during clone')
sshSession.command('git config user.email "jenkins@openairinterface.org"', '\$', 5) sshSession.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
...@@ -287,6 +291,7 @@ class Containerize(): ...@@ -287,6 +291,7 @@ class Containerize():
self.deployedContainers = [] self.deployedContainers = []
self.tsharkStarted = False self.tsharkStarted = False
self.displayedNewTags = False
self.pingContName = '' self.pingContName = ''
self.pingOptions = '' self.pingOptions = ''
self.pingLossThreshold = '' self.pingLossThreshold = ''
...@@ -345,7 +350,7 @@ class Containerize(): ...@@ -345,7 +350,7 @@ class Containerize():
self.dockerfileprefix = '.rhel8.2' self.dockerfileprefix = '.rhel8.2'
self.cliBuildOptions = '--no-cache --disable-compression' self.cliBuildOptions = '--no-cache --disable-compression'
# we always build the ran-build image with all targets # we always build the ran-build image with all targets
imageNames = [('ran-build', 'build')] imageNames = [('ran-build', 'build')]
result = re.search('eNB', self.imageKind) result = re.search('eNB', self.imageKind)
# Creating a tupple with the imageName and the DockerFile prefix pattern on obelix # Creating a tupple with the imageName and the DockerFile prefix pattern on obelix
...@@ -547,14 +552,17 @@ class Containerize(): ...@@ -547,14 +552,17 @@ class Containerize():
oldRanCommidID = self.ranCommitID oldRanCommidID = self.ranCommitID
oldRanRepository = self.ranRepository oldRanRepository = self.ranRepository
oldRanAllowMerge = self.ranAllowMerge oldRanAllowMerge = self.ranAllowMerge
oldRanTargetBranch = self.ranTargetBranch
self.ranCommitID = self.proxyCommit self.ranCommitID = self.proxyCommit
self.ranRepository = 'https://github.com/EpiSci/oai-lte-5g-multi-ue-proxy.git' self.ranRepository = 'https://github.com/EpiSci/oai-lte-5g-multi-ue-proxy.git'
self.ranAllowMerge = False self.ranAllowMerge = False
self.ranTargetBranch = 'master'
CreateWorkspace(mySSH, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) CreateWorkspace(mySSH, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge)
# to prevent accidentally overwriting data that might be used later # to prevent accidentally overwriting data that might be used later
self.ranCommitID = oldRanCommidID self.ranCommitID = oldRanCommidID
self.ranRepository = oldRanRepository self.ranRepository = oldRanRepository
self.ranAllowMerge = oldRanAllowMerge self.ranAllowMerge = oldRanAllowMerge
self.ranTargetBranch = oldRanTargetBranch
# Let's remove any previous run artifacts if still there # Let's remove any previous run artifacts if still there
mySSH.command(self.cli + ' image prune --force', '\$', 30) mySSH.command(self.cli + ' image prune --force', '\$', 30)
...@@ -571,6 +579,7 @@ class Containerize(): ...@@ -571,6 +579,7 @@ class Containerize():
# Note: at this point, OAI images are flattened, but we cannot do this # Note: at this point, OAI images are flattened, but we cannot do this
# here, as the flatten script is not in the proxy repo # here, as the flatten script is not in the proxy repo
mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' proxy:' + tag, '\$', 5) mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' proxy:' + tag, '\$', 5)
mySSH.command(self.cli + ' image prune --force || true','\$', 15)
if mySSH.getBefore().count('o such image') != 0: if mySSH.getBefore().count('o such image') != 0:
logging.error('\u001B[1m Build of L2sim proxy failed\u001B[0m') logging.error('\u001B[1m Build of L2sim proxy failed\u001B[0m')
mySSH.close() mySSH.close()
...@@ -730,60 +739,42 @@ class Containerize(): ...@@ -730,60 +739,42 @@ class Containerize():
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
if lIpAddr != 'none': if lIpAddr != 'none':
logging.debug('Pulling images onto server: ' + lIpAddr) logging.debug('Pulling images onto server: ' + lIpAddr)
mySSH = SSH.SSHConnection() myCmd = cls_cmd.RemoteCmd(lIpAddr)
mySSH.open(lIpAddr, lUserName, lPassWord)
else: else:
logging.debug('Pulling images locally') logging.debug('Pulling images locally')
myCmd = cls_cmd.LocalCmd()
cmd = 'docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr' cmd = 'docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr'
if lIpAddr != 'none': response = myCmd.run(cmd)
mySSH.command(cmd, '\$', 5) if response.returncode != 0:
response = mySSH.getBefore()
else:
logging.info(cmd)
response = subprocess.check_output(cmd, shell=True, universal_newlines=True, stderr=subprocess.STDOUT)
if re.search('Login Succeeded', response) is None:
msg = 'Could not log into local registry' msg = 'Could not log into local registry'
logging.error(msg) logging.error(msg)
if lIpAddr != 'none': myCmd.close()
mySSH.close()
HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK)
return False return False
for image in self.imageToPull: for image in self.imageToPull:
tagToUse = self.ImageTagToUse(image) tagToUse = self.ImageTagToUse(image)
cmd = f'docker pull {tagToUse}' cmd = f'docker pull {tagToUse}'
if lIpAddr != 'none': response = myCmd.run(cmd, timeout=120)
mySSH.command(cmd, '\$', 120) if response.returncode != 0:
response = mySSH.getBefore()
else:
logging.info(cmd)
response = subprocess.check_output(cmd, shell=True, universal_newlines=True)
if re.search('Status: Downloaded newer image for |Status: Image is up to date for', response) is None:
logging.debug(response) logging.debug(response)
msg = f'Could not pull {image} from local registry : {tagToUse}' msg = f'Could not pull {image} from local registry : {tagToUse}'
logging.error(msg) logging.error(msg)
if lIpAddr != 'none': myCmd.close()
mySSH.close()
HTML.CreateHtmlTestRow('msg', 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('msg', 'KO', CONST.ALL_PROCESSES_OK)
return False return False
cmd = 'docker logout porcepix.sboai.cs.eurecom.fr' cmd = 'docker logout porcepix.sboai.cs.eurecom.fr'
if lIpAddr != 'none': response = myCmd.run(cmd)
mySSH.command(cmd, '\$', 5) if response.returncode != 0:
response = mySSH.getBefore()
else:
logging.info(cmd)
response = subprocess.check_output(cmd, shell=True, universal_newlines=True)
if re.search('Removing login credentials', response) is None:
msg = 'Could not log off from local registry' msg = 'Could not log off from local registry'
logging.error(msg) logging.error(msg)
mySSH.close() myCmd.close()
HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK)
return False return False
if lIpAddr != 'none': myCmd.close()
mySSH.close()
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True return True
...@@ -810,22 +801,17 @@ class Containerize(): ...@@ -810,22 +801,17 @@ class Containerize():
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
if lIpAddr != 'none': if lIpAddr != 'none':
logging.debug('Removing test images from server: ' + lIpAddr) logging.debug('Removing test images from server: ' + lIpAddr)
mySSH = SSH.SSHConnection() myCmd = cls_cmd.RemoteCmd(lIpAddr)
mySSH.open(lIpAddr, lUserName, lPassWord)
else: else:
logging.debug('Removing test images locally') logging.debug('Removing test images locally')
myCmd = cls_cmd.LocalCmd()
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup'] imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup']
for image in imageNames: for image in imageNames:
cmd = f'docker rmi {self.ImageTagToUse(image)} || true' cmd = f'docker rmi {self.ImageTagToUse(image)}'
if lIpAddr != 'none': myCmd.run(cmd, reportNonZero=False)
mySSH.command(cmd, '\$', 5)
else:
logging.info(cmd)
subprocess.run(cmd, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
if lIpAddr != 'none': myCmd.close()
mySSH.close()
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True return True
...@@ -922,7 +908,7 @@ class Containerize(): ...@@ -922,7 +908,7 @@ class Containerize():
if healthyNb == 1: if healthyNb == 1:
cnt = 0 cnt = 0
while (cnt < 20): while (cnt < 20):
mySSH.command('docker logs ' + containerName + ' | egrep --text --color=never -i "wait|sync|Starting"', '\$', 30) mySSH.command('docker logs ' + containerName + ' | egrep --text --color=never -i "wait|sync|Starting"', '\$', 30)
result = re.search('got sync|Starting F1AP at CU', mySSH.getBefore()) result = re.search('got sync|Starting F1AP at CU', mySSH.getBefore())
if result is None: if result is None:
time.sleep(6) time.sleep(6)
...@@ -1048,54 +1034,58 @@ class Containerize(): ...@@ -1048,54 +1034,58 @@ class Containerize():
def DeployGenObject(self, HTML, RAN, UE): def DeployGenObject(self, HTML, RAN, UE):
self.exitStatus = 0 self.exitStatus = 0
logging.debug('\u001B[1m Checking Services to deploy\u001B[0m') logging.debug('\u001B[1m Checking Services to deploy\u001B[0m')
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose config --services' # Implicitly we are running locally
logging.info(cmd) myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0])
try: cmd = 'docker-compose config --services'
listServices = subprocess.check_output(cmd, shell=True, universal_newlines=True) listServices = myCmd.run(cmd)
except Exception as e: if listServices.returncode != 0:
myCmd.close()
self.exitStatus = 1 self.exitStatus = 1
HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK)
return return
for reqSvc in self.services[0].split(' '): for reqSvc in self.services[0].split(' '):
res = re.search(reqSvc, listServices) res = re.search(reqSvc, listServices.stdout)
if res is None: if res is None:
logging.error(reqSvc + ' not found in specified docker-compose') logging.error(reqSvc + ' not found in specified docker-compose')
self.exitStatus = 1 self.exitStatus = 1
if (self.exitStatus == 1): if (self.exitStatus == 1):
myCmd.close()
HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK)
return return
cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml' cmd = 'cp docker-compose.y*ml docker-compose-ci.yml'
subprocess.run(cmd, shell=True) myCmd.run(cmd, silent=self.displayedNewTags)
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup'] imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup']
for image in imageNames: for image in imageNames:
tagToUse = self.ImageTagToUse(image) tagToUse = self.ImageTagToUse(image)
cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@{image}:develop@{tagToUse}@" docker-compose-ci.yml' cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@{tagToUse}@" docker-compose-ci.yml'
logging.debug(cmd) myCmd.run(cmd, silent=self.displayedNewTags)
subprocess.run(cmd, shell=True) self.displayedNewTags = True
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml up -d ' + self.services[0] cmd = f'docker-compose -f docker-compose-ci.yml up -d {self.services[0]}'
logging.info(cmd) deployStatus = myCmd.run(cmd, timeout=100)
try: if deployStatus.returncode != 0:
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100) myCmd.close()
except Exception as e:
self.exitStatus = 1 self.exitStatus = 1
logging.error('Could not deploy') logging.error('Could not deploy')
HTML.CreateHtmlTestRow('Could not deploy', 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('Could not deploy', 'KO', CONST.ALL_PROCESSES_OK)
return return
logging.debug('\u001B[1m Checking if all deployed healthy\u001B[0m') logging.debug('\u001B[1m Checking if all deployed healthy\u001B[0m')
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps -a' cmd = 'docker-compose -f docker-compose-ci.yml ps -a'
count = 0 count = 0
healthy = 0 healthy = 0
restarting = 0
newContainers = [] newContainers = []
while (count < 10): while (count < 10):
count += 1 count += 1
containerStatus = [] containerStatus = []
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) deployStatus = myCmd.run(cmd, 30, silent=True)
healthy = 0 healthy = 0
for state in deployStatus.split('\n'): restarting = 0
res = re.search('Name|----------', state) for state in deployStatus.stdout.split('\n'):
state = state.strip()
res = re.search('Name|NAME|----------', state)
if res is not None: if res is not None:
continue continue
if len(state) == 0: if len(state) == 0:
...@@ -1110,23 +1100,32 @@ class Containerize(): ...@@ -1110,23 +1100,32 @@ class Containerize():
if not found: if not found:
newContainers.append(cName) newContainers.append(cName)
self.deployedContainers.append(cName) self.deployedContainers.append(cName)
if re.search('Up \(healthy\)', state) is not None: if re.search('\(healthy\)', state) is not None:
healthy += 1 healthy += 1
if re.search('rfsim4g-db-init.*Exit 0', state) is not None: if re.search('rfsim4g-db-init.*Exit 0', state) is not None or re.search('rfsim4g-db-init.*Exited \(0\)', state) is not None:
subprocess.check_output('docker rm -f rfsim4g-db-init || true', shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) myCmd.run('docker rm -f rfsim4g-db-init', timeout=30, silent=True, reportNonZero=False)
containerStatus.append(state) if re.search('l2sim4g-db-init.*Exit 0', state) is not None or re.search('l2sim4g-db-init.*Exited \(0\)', state) is not None:
if healthy == self.nb_healthy[0]: myCmd.run('docker rm -f l2sim4g-db-init', timeout=30, silent=True, reportNonZero=False)
if re.search('Restarting', state) is None:
containerStatus.append(state)
else:
restarting += 1
if healthy == self.nb_healthy[0] and restarting == 0:
count = 100 count = 100
else: else:
time.sleep(10) time.sleep(10)
imagesInfo = '' imagesInfo = ''
for newCont in newContainers: for newCont in newContainers:
if newCont == 'rfsim4g-db-init':
continue
cmd = 'docker inspect -f "{{.Config.Image}}" ' + newCont cmd = 'docker inspect -f "{{.Config.Image}}" ' + newCont
imageName = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) imageInspect = myCmd.run(cmd, timeout=30, silent=True)
imageName = str(imageName).strip() imageName = str(imageInspect.stdout).strip()
cmd = 'docker image inspect --format "{{.RepoTags}}\t{{.Size}} bytes\t{{.Created}}\t{{.Id}}" ' + imageName cmd = 'docker image inspect --format "{{.RepoTags}}\t{{.Size}} bytes\t{{.Created}}\t{{.Id}}" ' + imageName
imagesInfo += subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) imageInspect = myCmd.run(cmd, 30, silent=True)
imagesInfo += imageInspect.stdout.strip()
myCmd.close()
html_queue = SimpleQueue() html_queue = SimpleQueue()
html_cell = '<pre style="background-color:white">\n' html_cell = '<pre style="background-color:white">\n'
...@@ -1158,48 +1157,71 @@ class Containerize(): ...@@ -1158,48 +1157,71 @@ class Containerize():
self.UndeployGenObject(HTML, RAN, UE) self.UndeployGenObject(HTML, RAN, UE)
self.exitStatus = 1 self.exitStatus = 1
def CaptureOnDockerNetworks(self): # pyshark livecapture launches 2 processes:
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml config | grep com.docker.network.bridge.name | sed -e "s@^.*name: @@"' # * One using dumpcap -i lIfs -w - (ie redirecting the packets to STDOUT)
networkNames = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10) # * One using tshark -i - -w loFile (ie capturing from STDIN from previous process)
# but in fact the packets are read by the following loop before being in fact
# really written to loFile.
# So it is mandatory to keep the loop
def LaunchPySharkCapture(self, lIfs, lFilter, loFile):
capture = pyshark.LiveCapture(interface=lIfs, bpf_filter=lFilter, output_file=loFile, debug=False)
for packet in capture.sniff_continuously():
pass
def CaptureOnDockerNetworks(self):
myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0])
cmd = 'docker-compose -f docker-compose-ci.yml config | grep com.docker.network.bridge.name | sed -e "s@^.*name: @@"'
networkNames = myCmd.run(cmd, silent=True)
myCmd.close()
# Allow only: control plane RAN (SCTP), HTTP of control in CN (port 80), PFCP traffic (port 8805), MySQL (port 3306) # Allow only: control plane RAN (SCTP), HTTP of control in CN (port 80), PFCP traffic (port 8805), MySQL (port 3306)
cmd = 'sudo nohup tshark -f "sctp or port 80 or port 8805 or icmp or port 3306"' capture_filter = 'sctp or port 80 or port 8805 or icmp or port 3306'
for name in networkNames.split('\n'): interfaces = []
iInterfaces = ''
for name in networkNames.stdout.split('\n'):
if re.search('rfsim', name) is not None or re.search('l2sim', name) is not None: if re.search('rfsim', name) is not None or re.search('l2sim', name) is not None:
cmd += ' -i ' + name interfaces.append(name)
cmd += ' -w /tmp/capture_' iInterfaces += f'-i {name} '
ymlPath = self.yamlPath[0].split('/') ymlPath = self.yamlPath[0].split('/')
cmd += ymlPath[1] + '.pcap > /tmp/tshark.log 2>&1 &' output_file = f'/tmp/capture_{ymlPath[1]}.pcap'
logging.info(cmd)
networkNames = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
self.tsharkStarted = True self.tsharkStarted = True
# On old systems (ubuntu 18), pyshark live-capture is buggy.
# Going back to old method
if sys.version_info < (3, 7):
cmd = f'nohup tshark -f "{capture_filter}" {iInterfaces} -w {output_file} > /tmp/tshark.log 2>&1 &'
myCmd = cls_cmd.LocalCmd()
myCmd.run(cmd, timeout=5, reportNonZero=False)
myCmd.close()
return
x = threading.Thread(target = self.LaunchPySharkCapture, args = (interfaces,capture_filter,output_file,))
x.daemon = True
x.start()
def UndeployGenObject(self, HTML, RAN, UE): def UndeployGenObject(self, HTML, RAN, UE):
self.exitStatus = 0 self.exitStatus = 0
# Implicitly we are running locally
ymlPath = self.yamlPath[0].split('/') ymlPath = self.yamlPath[0].split('/')
logPath = '../cmake_targets/log/' + ymlPath[1] logPath = '../cmake_targets/log/' + ymlPath[1]
myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0])
cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml' cmd = 'cp docker-compose.y*ml docker-compose-ci.yml'
logging.info(cmd) myCmd.run(cmd, silent=self.displayedNewTags)
subprocess.run(cmd, shell=True)
imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup'] imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru', 'oai-nr-cuup']
for image in imageNames: for image in imageNames:
tagToUse = self.ImageTagToUse(image) tagToUse = self.ImageTagToUse(image)
cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@{image}:develop@{tagToUse}@" docker-compose-ci.yml' cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@{tagToUse}@" docker-compose-ci.yml'
subprocess.run(cmd, shell=True) myCmd.run(cmd, silent=self.displayedNewTags)
self.displayedNewTags = True
# check which containers are running for log recovery later # check which containers are running for log recovery later
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all' cmd = 'docker-compose -f docker-compose-ci.yml ps --all'
logging.info(cmd) deployStatusLogs = myCmd.run(cmd, timeout=30)
deployStatusLogs = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
# Stop the containers to shut down objects # Stop the containers to shut down objects
logging.debug('\u001B[1m Stopping containers \u001B[0m') logging.debug('\u001B[1m Stopping containers \u001B[0m')
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml stop -t3' cmd = 'docker-compose -f docker-compose-ci.yml stop -t3'
logging.info(cmd) deployStatus = myCmd.run(cmd, timeout=100)
try: if deployStatus.returncode != 0:
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100) myCmd.close()
except Exception as e:
self.exitStatus = 1 self.exitStatus = 1
logging.error('Could not stop containers') logging.error('Could not stop containers')
HTML.CreateHtmlTestRow('Could not stop', 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('Could not stop', 'KO', CONST.ALL_PROCESSES_OK)
...@@ -1207,8 +1229,12 @@ class Containerize(): ...@@ -1207,8 +1229,12 @@ class Containerize():
return return
anyLogs = False anyLogs = False
for state in deployStatusLogs.split('\n'): logging.debug('Working dir is now . (ie ci-scripts)')
res = re.search('Name|----------', state) myCmd2 = cls_cmd.LocalCmd()
myCmd2.run(f'mkdir -p {logPath}')
myCmd2.cd(logPath)
for state in deployStatusLogs.stdout.split('\n'):
res = re.search('Name|NAME|----------', state)
if res is not None: if res is not None:
continue continue
if len(state) == 0: if len(state) == 0:
...@@ -1217,36 +1243,26 @@ class Containerize(): ...@@ -1217,36 +1243,26 @@ class Containerize():
if res is not None: if res is not None:
anyLogs = True anyLogs = True
cName = res.group('container_name') cName = res.group('container_name')
cmd = 'cd ' + self.yamlPath[0] + ' && docker logs ' + cName + ' > ' + cName + '.log 2>&1' cmd = f'docker logs {cName} > {cName}.log 2>&1'
logging.info(cmd) myCmd2.run(cmd, timeout=30, reportNonZero=False)
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
if re.search('magma-mme', cName) is not None: if re.search('magma-mme', cName) is not None:
cmd = 'cd ' + self.yamlPath[0] + ' && docker cp -L ' + cName + ':/var/log/mme.log ' + cName + '-full.log' cmd = f'docker cp -L {cName}:/var/log/mme.log {cName}-full.log'
logging.info(cmd) myCmd2.run(cmd, timeout=30, reportNonZero=False)
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
fullStatus = True fullStatus = True
if anyLogs: if anyLogs:
cmd = 'mkdir -p '+ logPath + ' && cp ' + self.yamlPath[0] + '/*.log ' + logPath
logging.info(cmd)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
# Analyzing log file(s)! # Analyzing log file(s)!
listOfPossibleRanContainers = ['enb', 'gnb', 'cu', 'du'] listOfPossibleRanContainers = ['enb', 'gnb', 'cu', 'du']
for container in listOfPossibleRanContainers: for container in listOfPossibleRanContainers:
filenames = self.yamlPath[0] + '/*-oai-' + container + '.log' filenames = './*-oai-' + container + '.log'
cmd = 'ls ' + filenames cmd = f'ls {filenames}'
containerStatus = True lsStatus = myCmd2.run(cmd, silent=True, reportNonZero=False)
try: if lsStatus.returncode != 0:
lsStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
filenames = str(lsStatus).strip()
except:
containerStatus = False
if not containerStatus:
continue continue
filenames = str(lsStatus.stdout).strip()
for filename in filenames.split('\n'): for filename in filenames.split('\n'):
logging.debug('\u001B[1m Analyzing xNB logfile ' + filename + ' \u001B[0m') logging.debug('\u001B[1m Analyzing xNB logfile ' + filename + ' \u001B[0m')
logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML, self.ran_checkers) logStatus = RAN.AnalyzeLogFile_eNB(f'{logPath}/{filename}', HTML, self.ran_checkers)
if (logStatus < 0): if (logStatus < 0):
fullStatus = False fullStatus = False
self.exitStatus = 1 self.exitStatus = 1
...@@ -1256,49 +1272,42 @@ class Containerize(): ...@@ -1256,49 +1272,42 @@ class Containerize():
listOfPossibleUeContainers = ['lte-ue*', 'nr-ue*'] listOfPossibleUeContainers = ['lte-ue*', 'nr-ue*']
for container in listOfPossibleUeContainers: for container in listOfPossibleUeContainers:
filenames = self.yamlPath[0] + '/*-oai-' + container + '.log' filenames = './*-oai-' + container + '.log'
cmd = 'ls ' + filenames cmd = f'ls {filenames}'
containerStatus = True lsStatus = myCmd2.run(cmd, silent=True, reportNonZero=False)
try: if lsStatus.returncode != 0:
lsStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
filenames = str(lsStatus).strip()
except:
containerStatus = False
if not containerStatus:
continue continue
filenames = str(lsStatus.stdout).strip()
for filename in filenames.split('\n'): for filename in filenames.split('\n'):
logging.debug('\u001B[1m Analyzing UE logfile ' + filename + ' \u001B[0m') logging.debug('\u001B[1m Analyzing UE logfile ' + filename + ' \u001B[0m')
logStatus = UE.AnalyzeLogFile_UE(filename, HTML, RAN) logStatus = UE.AnalyzeLogFile_UE(f'{logPath}/{filename}', HTML, RAN)
if (logStatus < 0): if (logStatus < 0):
fullStatus = False fullStatus = False
HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus) HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus)
else: else:
HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK)
cmd = 'rm ' + self.yamlPath[0] + '/*.log'
logging.info(cmd)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
if self.tsharkStarted: if self.tsharkStarted:
self.tsharkStarted = True self.tsharkStarted = True
cmd = 'killall tshark'
myCmd2.run(cmd, reportNonZero=False)
cmd = 'killall dumpcap'
myCmd2.run(cmd, reportNonZero=False)
time.sleep(5)
ymlPath = self.yamlPath[0].split('/') ymlPath = self.yamlPath[0].split('/')
cmd = 'sudo chmod 666 /tmp/capture_' + ymlPath[1] + '.pcap' # The working dir is still logPath
logging.info(cmd) cmd = f'mv /tmp/capture_{ymlPath[1]}.pcap .'
copyStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10) myCmd2.run(cmd, timeout=100, reportNonZero=False)
cmd = 'cp /tmp/capture_' + ymlPath[1] + '.pcap ' + logPath
logging.info(cmd)
copyStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
cmd = 'sudo rm /tmp/capture_' + ymlPath[1] + '.pcap'
logging.info(cmd)
copyStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
self.tsharkStarted = False self.tsharkStarted = False
myCmd2.close()
logging.debug('\u001B[1m Undeploying \u001B[0m') logging.debug('\u001B[1m Undeploying \u001B[0m')
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml down' logging.debug(f'Working dir is back {self.yamlPath[0]}')
logging.info(cmd) cmd = 'docker-compose -f docker-compose-ci.yml down'
try: deployStatus = myCmd.run(cmd, timeout=100)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100) if deployStatus.returncode != 0:
except Exception as e: myCmd.close()
self.exitStatus = 1 self.exitStatus = 1
logging.error('Could not undeploy') logging.error('Could not undeploy')
HTML.CreateHtmlTestRow('Could not undeploy', 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('Could not undeploy', 'KO', CONST.ALL_PROCESSES_OK)
...@@ -1307,9 +1316,9 @@ class Containerize(): ...@@ -1307,9 +1316,9 @@ class Containerize():
self.deployedContainers = [] self.deployedContainers = []
# Cleaning any created tmp volume # Cleaning any created tmp volume
cmd = 'docker volume prune --force || true' cmd = 'docker volume prune --force'
logging.info(cmd) deployStatus = myCmd.run(cmd, timeout=100, reportNonZero=False)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100) myCmd.close()
if fullStatus: if fullStatus:
HTML.CreateHtmlTestRow('n/a', 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRow('n/a', 'OK', CONST.ALL_PROCESSES_OK)
...@@ -1324,13 +1333,13 @@ class Containerize(): ...@@ -1324,13 +1333,13 @@ class Containerize():
logPath = '../cmake_targets/log/' + ymlPath[1] logPath = '../cmake_targets/log/' + ymlPath[1]
# if the containers are running, recover the logs! # if the containers are running, recover the logs!
cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all' myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0])
logging.info(cmd) cmd = 'docker-compose -f docker-compose-ci.yml ps --all'
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) deployStatus = myCmd.run(cmd, timeout=30)
cmd = 'docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}" ' cmd = 'docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}" '
anyLogs = False anyLogs = False
for state in deployStatus.split('\n'): for state in deployStatus.stdout.split('\n'):
res = re.search('Name|----------', state) res = re.search('Name|NAME|----------', state)
if res is not None: if res is not None:
continue continue
if len(state) == 0: if len(state) == 0:
...@@ -1341,11 +1350,11 @@ class Containerize(): ...@@ -1341,11 +1350,11 @@ class Containerize():
cmd += res.group('container_name') + ' ' cmd += res.group('container_name') + ' '
message = '' message = ''
if anyLogs: if anyLogs:
logging.info(cmd) stats = myCmd.run(cmd, timeout=30)
stats = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) for statLine in stats.stdout.split('\n'):
for statLine in stats.split('\n'):
logging.debug(statLine) logging.debug(statLine)
message += statLine + '\n' message += statLine + '\n'
myCmd.close()
html_queue = SimpleQueue() html_queue = SimpleQueue()
html_cell = '<pre style="background-color:white">\n' + message + '</pre>' html_cell = '<pre style="background-color:white">\n' + message + '</pre>'
...@@ -1353,18 +1362,18 @@ class Containerize(): ...@@ -1353,18 +1362,18 @@ class Containerize():
HTML.CreateHtmlTestRowQueue(self.pingOptions, 'OK', 1, html_queue) HTML.CreateHtmlTestRowQueue(self.pingOptions, 'OK', 1, html_queue)
def PingFromContainer(self, HTML, RAN, UE): def PingFromContainer(self, HTML, RAN, UE):
myCmd = cls_cmd.LocalCmd()
self.exitStatus = 0 self.exitStatus = 0
ymlPath = self.yamlPath[0].split('/') ymlPath = self.yamlPath[0].split('/')
logPath = '../cmake_targets/log/' + ymlPath[1] logPath = '../cmake_targets/log/' + ymlPath[1]
cmd = 'mkdir -p ' + logPath cmd = f'mkdir -p {logPath}'
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10) myCmd.run(cmd, silent=True)
cmd = 'docker exec ' + self.pingContName + ' /bin/bash -c "ping ' + self.pingOptions + '" 2>&1 | tee ' + logPath + '/ping_' + HTML.testCase_id + '.log || true' cmd = f'docker exec {self.pingContName} /bin/bash -c "ping {self.pingOptions}" 2>&1 | tee {logPath}/ping_{HTML.testCase_id}.log'
pingStatus = myCmd.run(cmd, timeout=100, reportNonZero=False)
myCmd.close()
logging.info(cmd) result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', pingStatus.stdout)
deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
result = re.search(', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms', deployStatus)
if result is None: if result is None:
self.PingExit(HTML, RAN, UE, False, 'Packet Loss Not Found') self.PingExit(HTML, RAN, UE, False, 'Packet Loss Not Found')
return return
...@@ -1374,7 +1383,7 @@ class Containerize(): ...@@ -1374,7 +1383,7 @@ class Containerize():
self.PingExit(HTML, RAN, UE, False, 'Packet Loss is 100%') self.PingExit(HTML, RAN, UE, False, 'Packet Loss is 100%')
return return
result = re.search('rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', deployStatus) result = re.search('rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms', pingStatus.stdout)
if result is None: if result is None:
self.PingExit(HTML, RAN, UE, False, 'Ping RTT_Min RTT_Avg RTT_Max Not Found!') self.PingExit(HTML, RAN, UE, False, 'Ping RTT_Min RTT_Avg RTT_Max Not Found!')
return return
...@@ -1427,39 +1436,37 @@ class Containerize(): ...@@ -1427,39 +1436,37 @@ class Containerize():
self.exitStatus = 1 self.exitStatus = 1
def IperfFromContainer(self, HTML, RAN, UE): def IperfFromContainer(self, HTML, RAN, UE):
myCmd = cls_cmd.LocalCmd()
self.exitStatus = 0 self.exitStatus = 0
ymlPath = self.yamlPath[0].split('/') ymlPath = self.yamlPath[0].split('/')
logPath = '../cmake_targets/log/' + ymlPath[1] logPath = '../cmake_targets/log/' + ymlPath[1]
cmd = 'mkdir -p ' + logPath cmd = f'mkdir -p {logPath}'
logStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10) myCmd.run(cmd, silent=True)
# Start the server process # Start the server process
cmd = f'docker exec -d {self.svrContName} /bin/bash -c "nohup iperf {self.svrOptions} > /tmp/iperf_server.log 2>&1"' cmd = f'docker exec -d {self.svrContName} /bin/bash -c "nohup iperf {self.svrOptions} > /tmp/iperf_server.log 2>&1"'
logging.info(cmd) myCmd.run(cmd)
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
time.sleep(3) time.sleep(3)
# Start the client process # Start the client process
cmd = f'docker exec {self.cliContName} /bin/bash -c "iperf {self.cliOptions}" 2>&1 | tee {logPath}/iperf_client_{HTML.testCase_id}.log' cmd = f'docker exec {self.cliContName} /bin/bash -c "iperf {self.cliOptions}" 2>&1 | tee {logPath}/iperf_client_{HTML.testCase_id}.log'
logging.info(cmd) clientStatus = myCmd.run(cmd, timeout=100)
clientStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
# Stop the server process # Stop the server process
cmd = f'docker exec {self.svrContName} /bin/bash -c "pkill iperf"' cmd = f'docker exec {self.svrContName} /bin/bash -c "pkill iperf"'
logging.info(cmd) myCmd.run(cmd)
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
time.sleep(3) time.sleep(3)
serverStatusFilename = f'{logPath}/iperf_server_{HTML.testCase_id}.log' serverStatusFilename = f'{logPath}/iperf_server_{HTML.testCase_id}.log'
cmd = f'docker cp {self.svrContName}:/tmp/iperf_server.log {serverStatusFilename}' cmd = f'docker cp {self.svrContName}:/tmp/iperf_server.log {serverStatusFilename}'
logging.info(cmd) myCmd.run(cmd, timeout=60)
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) myCmd.close()
# clientStatus was retrieved above. The serverStatus was # clientStatus was retrieved above. The serverStatus was
# written in the background, then copied to the local machine # written in the background, then copied to the local machine
with open(serverStatusFilename, 'r') as f: with open(serverStatusFilename, 'r') as f:
serverStatus = f.read() serverStatus = f.read()
(iperfStatus, msg) = AnalyzeIperf(self.cliOptions, clientStatus, serverStatus) (iperfStatus, msg) = AnalyzeIperf(self.cliOptions, clientStatus.stdout, serverStatus)
if iperfStatus: if iperfStatus:
logging.info('\u001B[1m Iperf Test PASS\u001B[0m') logging.info('\u001B[1m Iperf Test PASS\u001B[0m')
else: else:
...@@ -1595,4 +1602,3 @@ class Containerize(): ...@@ -1595,4 +1602,3 @@ class Containerize():
if result is None: if result is None:
mySSH.command('echo ' + password + ' | sudo -S iptables -P FORWARD ACCEPT', '\$', 10) mySSH.command('echo ' + password + ' | sudo -S iptables -P FORWARD ACCEPT', '\$', 10)
mySSH.close() mySSH.close()
...@@ -43,7 +43,7 @@ from multiprocessing import Process, Lock, SimpleQueue ...@@ -43,7 +43,7 @@ from multiprocessing import Process, Lock, SimpleQueue
#----------------------------------------------------------- #-----------------------------------------------------------
# OAI Testing modules # OAI Testing modules
#----------------------------------------------------------- #-----------------------------------------------------------
import sshconnection as SSH import sshconnection as SSH
import helpreadme as HELP import helpreadme as HELP
import constants as CONST import constants as CONST
...@@ -66,8 +66,8 @@ class EPCManagement(): ...@@ -66,8 +66,8 @@ class EPCManagement():
self.mmeConfFile = 'mme.conf' self.mmeConfFile = 'mme.conf'
self.yamlPath = '' self.yamlPath = ''
self.isMagmaUsed = False self.isMagmaUsed = False
self.cfgDeploy = '--type start-mini --fqdn yes --scenario 1 --capture /tmp/oai-cn5g-v1.3.pcap' #from xml, 'mini' is default normal for docker-network.py self.cfgDeploy = '--type start-mini --scenario 1 --capture /tmp/oai-cn5g-v1.5.pcap' #from xml, 'mini' is default normal for docker-network.py
self.cfgUnDeploy = '--type stop-mini --fqdn yes --scenario 1' #from xml, 'mini' is default normal for docker-network.py self.cfgUnDeploy = '--type stop-mini --scenario 1' #from xml, 'mini' is default normal for docker-network.py
#----------------------------------------------------------- #-----------------------------------------------------------
...@@ -253,18 +253,18 @@ class EPCManagement(): ...@@ -253,18 +253,18 @@ class EPCManagement():
logging.debug('Starting OAI CN5G') logging.debug('Starting OAI CN5G')
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5) mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5) mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
mySSH.command('cd /opt/oai-cn5g-fed-v1.4/docker-compose', '\$', 5) mySSH.command('cd /opt/oai-cn5g-fed-v1.5/docker-compose', '\$', 5)
mySSH.command('python3 ./core-network.py '+self.cfgDeploy, '\$', 60) mySSH.command('python3 ./core-network.py '+self.cfgDeploy, '\$', 60)
if re.search('start-mini-as-ue', self.cfgDeploy): if re.search('start-mini-as-ue', self.cfgDeploy):
dFile = 'docker-compose-mini-nrf-asue.yaml' dFile = 'docker-compose-mini-nrf-asue.yaml'
else: else:
dFile = 'docker-compose-mini-nrf.yaml' dFile = 'docker-compose-mini-nrf.yaml'
mySSH.command('docker-compose -p 5gcn -f ' + dFile + ' ps -a', '\$', 60) mySSH.command('docker-compose -f ' + dFile + ' ps -a', '\$', 60)
if mySSH.getBefore().count('Up (healthy)') != 6: if mySSH.getBefore().count('Up (healthy)') != 6:
logging.error('Not all container healthy') logging.error('Not all container healthy')
else: else:
logging.debug('OK --> all containers are healthy') logging.debug('OK --> all containers are healthy')
mySSH.command('docker-compose -p 5gcn -f ' + dFile + ' config | grep --colour=never image', '\$', 10) mySSH.command('docker-compose -f ' + dFile + ' config | grep --colour=never image', '\$', 10)
listOfImages = mySSH.getBefore() listOfImages = mySSH.getBefore()
for imageLine in listOfImages.split('\\r\\n'): for imageLine in listOfImages.split('\\r\\n'):
res1 = re.search('image: (?P<name>[a-zA-Z0-9\-/]+):(?P<tag>[a-zA-Z0-9\-]+)', str(imageLine)) res1 = re.search('image: (?P<name>[a-zA-Z0-9\-/]+):(?P<tag>[a-zA-Z0-9\-]+)', str(imageLine))
...@@ -537,11 +537,11 @@ class EPCManagement(): ...@@ -537,11 +537,11 @@ class EPCManagement():
mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5) mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5)
logging.debug('Terminating OAI CN5G') logging.debug('Terminating OAI CN5G')
mySSH.command('cd /opt/oai-cn5g-fed-v1.4/docker-compose', '\$', 5) mySSH.command('cd /opt/oai-cn5g-fed-v1.5/docker-compose', '\$', 5)
mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60) mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60)
mySSH.command('docker volume prune --force || true', '\$', 60) mySSH.command('docker volume prune --force || true', '\$', 60)
time.sleep(2) time.sleep(2)
mySSH.command('tshark -r /tmp/oai-cn5g-v1.3.pcap | egrep --colour=never "Tracking area update" ','\$', 30) mySSH.command('tshark -r /tmp/oai-cn5g-v1.5.pcap | egrep --colour=never "Tracking area update" ','\$', 30)
result = re.search('Tracking area update request', mySSH.getBefore()) result = re.search('Tracking area update request', mySSH.getBefore())
if result is not None: if result is not None:
message = 'UE requested ' + str(mySSH.getBefore().count('Tracking area update request')) + 'Tracking area update request(s)' message = 'UE requested ' + str(mySSH.getBefore().count('Tracking area update request')) + 'Tracking area update request(s)'
...@@ -828,7 +828,7 @@ class EPCManagement(): ...@@ -828,7 +828,7 @@ class EPCManagement():
mySSH.command('zip mme.log.zip mme_check_run.*', '\$', 60) mySSH.command('zip mme.log.zip mme_check_run.*', '\$', 60)
elif re.match('OAICN5G', self.Type, re.IGNORECASE): elif re.match('OAICN5G', self.Type, re.IGNORECASE):
mySSH.command('cd ' + self.SourceCodePath + '/logs','\$', 5) mySSH.command('cd ' + self.SourceCodePath + '/logs','\$', 5)
mySSH.command('cp -f /tmp/oai-cn5g-v1.3.pcap .','\$', 30) mySSH.command('cp -f /tmp/oai-cn5g-v1.5.pcap .','\$', 30)
mySSH.command('zip mme.log.zip oai-amf.log oai-nrf.log oai-cn5g*.pcap','\$', 30) mySSH.command('zip mme.log.zip oai-amf.log oai-nrf.log oai-cn5g*.pcap','\$', 30)
mySSH.command('mv mme.log.zip ' + self.SourceCodePath + '/scripts','\$', 30) mySSH.command('mv mme.log.zip ' + self.SourceCodePath + '/scripts','\$', 30)
elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE): elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
......
...@@ -70,6 +70,7 @@ import subprocess ...@@ -70,6 +70,7 @@ import subprocess
from multiprocessing import Process, Lock, SimpleQueue from multiprocessing import Process, Lock, SimpleQueue
logging.basicConfig( logging.basicConfig(
level=logging.DEBUG, level=logging.DEBUG,
stream=sys.stdout,
format="[%(asctime)s] %(levelname)8s: %(message)s" format="[%(asctime)s] %(levelname)8s: %(message)s"
) )
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<testCase id="060000"> <testCase id="060000">
<class>Terminate_5GCN</class> <class>Terminate_5GCN</class>
<desc>Terminate 5G Core</desc> <desc>Terminate 5G Core</desc>
<args>--type stop-mini-as-ue --fqdn yes --scenario 1</args> <args>--type stop-mini-as-ue --scenario 1</args>
</testCase> </testCase>
</testCaseList> </testCaseList>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<testCase id="000100"> <testCase id="000100">
<class>Initialize_5GCN</class> <class>Initialize_5GCN</class>
<desc>Initialize 5G Core</desc> <desc>Initialize 5G Core</desc>
<args>--type start-mini-as-ue --fqdn yes --scenario 1 --capture /tmp/oai-cn5g-v1.3.pcap</args> <args>--type start-mini-as-ue --scenario 1 --capture /tmp/oai-cn5g-v1.5.pcap</args>
</testCase> </testCase>
</testCaseList> </testCaseList>
...@@ -180,7 +180,7 @@ services: ...@@ -180,7 +180,7 @@ services:
retries: 5 retries: 5
oai_enb: oai_enb:
image: oai-enb:develop image: oaisoftwarealliance/oai-enb:develop
privileged: true privileged: true
container_name: l2sim4g-oai-enb container_name: l2sim4g-oai-enb
network_mode: "host" network_mode: "host"
...@@ -230,7 +230,7 @@ services: ...@@ -230,7 +230,7 @@ services:
retries: 5 retries: 5
oai_ue1: oai_ue1:
image: oai-lte-ue:develop image: oaisoftwarealliance/oai-lte-ue:develop
privileged: true privileged: true
container_name: l2sim4g-oai-lte-ue1 container_name: l2sim4g-oai-lte-ue1
network_mode: "host" network_mode: "host"
...@@ -258,7 +258,7 @@ services: ...@@ -258,7 +258,7 @@ services:
retries: 5 retries: 5
oai_ue2: oai_ue2:
image: oai-lte-ue:develop image: oaisoftwarealliance/oai-lte-ue:develop
privileged: true privileged: true
container_name: l2sim4g-oai-lte-ue2 container_name: l2sim4g-oai-lte-ue2
network_mode: "host" network_mode: "host"
......
...@@ -54,9 +54,6 @@ $ docker image tag oaisoftwarealliance/oai-spgwc:latest oai-spgwc:latest ...@@ -54,9 +54,6 @@ $ docker image tag oaisoftwarealliance/oai-spgwc:latest oai-spgwc:latest
$ docker image tag oaisoftwarealliance/oai-hss:latest oai-hss:latest $ docker image tag oaisoftwarealliance/oai-hss:latest oai-hss:latest
$ docker image tag oaisoftwarealliance/oai-spgwu-tiny:latest oai-spgwu-tiny:latest $ docker image tag oaisoftwarealliance/oai-spgwu-tiny:latest oai-spgwu-tiny:latest
$ docker image tag oaisoftwarealliance/magma-mme:latest magma-mme:latest $ docker image tag oaisoftwarealliance/magma-mme:latest magma-mme:latest
$ docker image tag oaisoftwarealliance/oai-enb:develop oai-enb:develop
$ docker image tag oaisoftwarealliance/oai-lte-ue:develop oai-lte-ue:develop
``` ```
```bash ```bash
......
...@@ -180,7 +180,7 @@ services: ...@@ -180,7 +180,7 @@ services:
retries: 5 retries: 5
oai_enb0: oai_enb0:
image: oai-enb:develop image: oaisoftwarealliance/oai-enb:develop
privileged: true privileged: true
container_name: rfsim4g-oai-enb container_name: rfsim4g-oai-enb
networks: networks:
...@@ -214,7 +214,7 @@ services: ...@@ -214,7 +214,7 @@ services:
retries: 5 retries: 5
oai_ue0: oai_ue0:
image: oai-lte-ue:develop image: oaisoftwarealliance/oai-lte-ue:develop
privileged: true privileged: true
container_name: rfsim4g-oai-lte-ue0 container_name: rfsim4g-oai-lte-ue0
networks: networks:
......
...@@ -2,7 +2,7 @@ version: '3.8' ...@@ -2,7 +2,7 @@ version: '3.8'
services: services:
oai_enb0: oai_enb0:
image: oai-enb:develop image: oaisoftwarealliance/oai-enb:develop
privileged: true privileged: true
container_name: rfsim4g-oai-enb container_name: rfsim4g-oai-enb
networks: networks:
...@@ -36,7 +36,7 @@ services: ...@@ -36,7 +36,7 @@ services:
retries: 5 retries: 5
oai_ue0: oai_ue0:
image: oai-lte-ue:develop image: oaisoftwarealliance/oai-lte-ue:develop
privileged: true privileged: true
container_name: rfsim4g-oai-lte-ue0 container_name: rfsim4g-oai-lte-ue0
networks: networks:
......
...@@ -180,7 +180,7 @@ services: ...@@ -180,7 +180,7 @@ services:
retries: 5 retries: 5
oai_enb0: oai_enb0:
image: oai-enb:develop image: oaisoftwarealliance/oai-enb:develop
privileged: true privileged: true
container_name: rfsim4g-oai-enb container_name: rfsim4g-oai-enb
networks: networks:
...@@ -214,7 +214,7 @@ services: ...@@ -214,7 +214,7 @@ services:
retries: 5 retries: 5
oai_ue0: oai_ue0:
image: oai-lte-ue:develop image: oaisoftwarealliance/oai-lte-ue:develop
privileged: true privileged: true
container_name: rfsim4g-oai-lte-ue0 container_name: rfsim4g-oai-lte-ue0
networks: networks:
......
...@@ -180,7 +180,7 @@ services: ...@@ -180,7 +180,7 @@ services:
retries: 5 retries: 5
oai_enb0: oai_enb0:
image: oai-enb:develop image: oaisoftwarealliance/oai-enb:develop
privileged: true privileged: true
container_name: rfsim4g-oai-enb container_name: rfsim4g-oai-enb
networks: networks:
...@@ -214,7 +214,7 @@ services: ...@@ -214,7 +214,7 @@ services:
retries: 5 retries: 5
oai_ue0: oai_ue0:
image: oai-lte-ue:develop image: oaisoftwarealliance/oai-lte-ue:develop
privileged: true privileged: true
container_name: rfsim4g-oai-lte-ue0 container_name: rfsim4g-oai-lte-ue0
networks: networks:
......
...@@ -2,7 +2,7 @@ version: '3.8' ...@@ -2,7 +2,7 @@ version: '3.8'
services: services:
oai_enb0: oai_enb0:
image: oai-enb:develop image: oaisoftwarealliance/oai-enb:develop
privileged: true privileged: true
container_name: rfsim4g-oai-enb container_name: rfsim4g-oai-enb
networks: networks:
...@@ -22,7 +22,7 @@ services: ...@@ -22,7 +22,7 @@ services:
retries: 5 retries: 5
oai_ue0: oai_ue0:
image: oai-lte-ue:develop image: oaisoftwarealliance/oai-lte-ue:develop
privileged: true privileged: true
container_name: rfsim4g-oai-lte-ue0 container_name: rfsim4g-oai-lte-ue0
networks: networks:
......
...@@ -2,7 +2,7 @@ version: '3.8' ...@@ -2,7 +2,7 @@ version: '3.8'
services: services:
oai_enb0: oai_enb0:
image: oai-enb:develop image: oaisoftwarealliance/oai-enb:develop
privileged: true privileged: true
container_name: rfsim4g-oai-enb container_name: rfsim4g-oai-enb
networks: networks:
...@@ -22,7 +22,7 @@ services: ...@@ -22,7 +22,7 @@ services:
retries: 5 retries: 5
oai_ue0: oai_ue0:
image: oai-lte-ue:develop image: oaisoftwarealliance/oai-lte-ue:develop
privileged: true privileged: true
container_name: rfsim4g-oai-lte-ue0 container_name: rfsim4g-oai-lte-ue0
networks: networks:
......
...@@ -180,7 +180,7 @@ services: ...@@ -180,7 +180,7 @@ services:
retries: 5 retries: 5
oai_enb0: oai_enb0:
image: oai-enb:develop image: oaisoftwarealliance/oai-enb:develop
privileged: true privileged: true
container_name: rfsim4g-oai-enb container_name: rfsim4g-oai-enb
networks: networks:
...@@ -213,7 +213,7 @@ services: ...@@ -213,7 +213,7 @@ services:
retries: 5 retries: 5
oai_ue0: oai_ue0:
image: oai-lte-ue:develop image: oaisoftwarealliance/oai-lte-ue:develop
privileged: true privileged: true
container_name: rfsim4g-oai-lte-ue0 container_name: rfsim4g-oai-lte-ue0
networks: networks:
......
...@@ -2,27 +2,16 @@ version: '3.8' ...@@ -2,27 +2,16 @@ version: '3.8'
services: services:
oai-nrf: oai-nrf:
container_name: "rfsim5g-oai-nrf" container_name: "rfsim5g-oai-nrf"
image: oai-nrf:august-dev image: oaisoftwarealliance/oai-nrf:v1.5.0
environment: environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0 - NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80 - TZ=Europe/Paris
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- NRF_API_VERSION=v1
- INSTANCE=0
- PID_DIRECTORY=/var/run
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.130 ipv4_address: 192.168.71.130
volumes:
- ./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
mysql: mysql:
container_name: "rfsim5g-mysql" container_name: "rfsim5g-mysql"
image: mysql:5.7 image: mysql:8.0
volumes: volumes:
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh - ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
...@@ -36,17 +25,15 @@ services: ...@@ -36,17 +25,15 @@ services:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh" test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 30
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.131 ipv4_address: 192.168.71.131
oai-amf: oai-amf:
container_name: "rfsim5g-oai-amf" container_name: "rfsim5g-oai-amf"
image: oai-amf:august-dev image: oaisoftwarealliance/oai-amf:v1.5.0
environment: environment:
- TZ=Europe/paris - TZ=Europe/paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- MCC=208 - MCC=208
- MNC=99 - MNC=99
- REGION_ID=128 - REGION_ID=128
...@@ -62,132 +49,85 @@ services: ...@@ -62,132 +49,85 @@ services:
- PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MCC=208
- PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_MNC=99
- PLMN_SUPPORT_TAC=0x0001 - PLMN_SUPPORT_TAC=0x0001
# Only one slice is defined (1, 0xFFFFFF).
- SST_0=1 - SST_0=1
- SD_0=0xffffff
- SST_1=1
- SD_1=1
- AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_NGAP=eth0
- AMF_INTERFACE_NAME_FOR_N11=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0
# One single SMF instance
- SMF_INSTANCE_ID_0=1 - SMF_INSTANCE_ID_0=1
- SMF_FQDN_0=oai-smf - SMF_FQDN_0=oai-smf
- SMF_IPV4_ADDR_0=0.0.0.0 - SMF_IPV4_ADDR_0=192.168.71.133
- SMF_HTTP_VERSION_0=v1
- SELECTED_0=true - SELECTED_0=true
- SMF_INSTANCE_ID_1=2 # mysql definition in AMF is mandatory in mini deployment.
- SMF_FQDN_1=oai-smf
- SMF_IPV4_ADDR_1=0.0.0.0
- SMF_HTTP_VERSION_1=v1
- SELECTED_1=false
- MYSQL_SERVER=192.168.71.131 - MYSQL_SERVER=192.168.71.131
- MYSQL_USER=root - MYSQL_USER=root
- MYSQL_PASS=linux - MYSQL_PASS=linux
- MYSQL_DB=oai_db - MYSQL_DB=oai_db
- OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 # NF registration
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80 - NRF_FQDN=oai-nrf
- NF_REGISTRATION=yes - NF_REGISTRATION=yes
- SMF_SELECTION=yes - SMF_SELECTION=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- NRF_API_VERSION=v1 - USE_HTTP2=no
- NRF_FQDN=oai-nrf
- EXTERNAL_AUSF=no
- AUSF_IPV4_ADDRESS=0.0.0.0
- AUSF_PORT=80
- AUSF_API_VERSION=v1
- AUSF_FQDN=localhost
depends_on: depends_on:
- oai-nrf - oai-nrf
- mysql - mysql
volumes:
- ./amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
interval: 10s
timeout: 15s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.132 ipv4_address: 192.168.71.132
oai-smf: oai-smf:
container_name: "rfsim5g-oai-smf" container_name: "rfsim5g-oai-smf"
image: oai-smf:august-dev image: oaisoftwarealliance/oai-smf:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_N4=eth0
- SMF_INTERFACE_NAME_FOR_SBI=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0
- SMF_INTERFACE_PORT_FOR_SBI=80
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- SMF_API_VERSION=v1
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
- AMF_IPV4_ADDRESS=0.0.0.0 - AMF_IPV4_ADDRESS=192.168.71.132
- AMF_PORT=80
- AMF_API_VERSION=v1
- AMF_FQDN=oai-amf - AMF_FQDN=oai-amf
- UDM_IPV4_ADDRESS=127.0.0.1
- UDM_PORT=80
- UDM_API_VERSION=v1
- UDM_FQDN=localhost
- UPF_IPV4_ADDRESS=192.168.71.134 - UPF_IPV4_ADDRESS=192.168.71.134
- UPF_FQDN_0=oai-spgwu - UPF_FQDN_0=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
- REGISTER_NRF=yes - REGISTER_NRF=yes
- DISCOVER_UPF=yes - DISCOVER_UPF=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- USE_LOCAL_SUBSCRIPTION_INFO=yes
- UE_MTU=1500
# Only one slice is defined (1, 0xFFFFFF)
- DNN_NI0=oai - DNN_NI0=oai
- TYPE0=IPv4 - TYPE0=IPv4
- DNN_RANGE0=12.1.1.2 - 12.1.1.127 - DNN_RANGE0=12.1.1.2 - 12.1.1.127
- NSSAI_SST0=1 - NSSAI_SST0=1
- NSSAI_SD0=0xFFFFFF
- SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_UL0=200Mbps
- SESSION_AMBR_DL0=400Mbps - SESSION_AMBR_DL0=400Mbps
- DNN_NI2=oai.ipv4 - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
- ENABLE_USAGE_REPORTING=no
depends_on: depends_on:
- oai-nrf - oai-nrf
- oai-amf - oai-amf
volumes:
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.133 ipv4_address: 192.168.71.133
oai-spgwu: oai-spgwu:
container_name: "rfsim5g-oai-spgwu" container_name: "rfsim5g-oai-spgwu"
image: oai-spgwu-tiny:august-dev image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- PID_DIRECTORY=/var/run
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
- SGW_INTERFACE_NAME_FOR_SX=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0
- PGW_INTERFACE_NAME_FOR_SGI=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0
- NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_NAT_OPTION=yes
- NETWORK_UE_IP=12.1.1.0/24 - NETWORK_UE_IP=12.1.1.0/24
- SPGWC0_IP_ADDRESS=192.168.71.133
- BYPASS_UL_PFCP_RULES=no
- MCC=208
- MNC=99
- MNC03=099
- TAC=1
- GTP_EXTENSION_HEADER_PRESENT=yes
- GW_ID=1
- REALM=openairinterface.org
- ENABLE_5G_FEATURES=yes - ENABLE_5G_FEATURES=yes
- REGISTER_NRF=yes - REGISTER_NRF=yes
- USE_FQDN_NRF=yes - USE_FQDN_NRF=yes
- UPF_FQDN_5G=oai-spgwu - UPF_FQDN_5G=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
# Only one slice is defined (1, 0xFFFFFF)
- NSSAI_SST_0=1 - NSSAI_SST_0=1
- NSSAI_SD_0=0xffffff - NSSAI_SD_0=0xffffff
- DNN_0=oai - DNN_0=oai
...@@ -200,24 +140,16 @@ services: ...@@ -200,24 +140,16 @@ services:
cap_drop: cap_drop:
- ALL - ALL
privileged: true privileged: true
volumes:
- ./spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.134 ipv4_address: 192.168.71.134
traffic_net: traffic_net:
ipv4_address: 192.168.72.134 ipv4_address: 192.168.72.134
oai-ext-dn: oai-ext-dn:
image: ubuntu:bionic
privileged: true privileged: true
container_name: rfsim5g-oai-ext-dn container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
entrypoint: /bin/bash -c \ entrypoint: /bin/bash -c \
"apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
depends_on: depends_on:
...@@ -231,7 +163,7 @@ services: ...@@ -231,7 +163,7 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-cu: oai-cu:
image: oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-cu container_name: rfsim5g-oai-cu
environment: environment:
...@@ -265,7 +197,7 @@ services: ...@@ -265,7 +197,7 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-du: oai-du:
image: oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-du container_name: rfsim5g-oai-du
environment: environment:
...@@ -299,7 +231,7 @@ services: ...@@ -299,7 +231,7 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-nr-ue: oai-nr-ue:
image: oai-nr-ue:develop image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true privileged: true
container_name: rfsim5g-oai-nr-ue container_name: rfsim5g-oai-nr-ue
environment: environment:
......
...@@ -2,27 +2,16 @@ version: '3.8' ...@@ -2,27 +2,16 @@ version: '3.8'
services: services:
oai-nrf: oai-nrf:
container_name: "rfsim5g-oai-nrf" container_name: "rfsim5g-oai-nrf"
image: oai-nrf:august-dev image: oaisoftwarealliance/oai-nrf:v1.5.0
environment: environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0 - NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80 - TZ=Europe/Paris
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- NRF_API_VERSION=v1
- INSTANCE=0
- PID_DIRECTORY=/var/run
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.130 ipv4_address: 192.168.71.130
volumes:
- ./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
mysql: mysql:
container_name: "rfsim5g-mysql" container_name: "rfsim5g-mysql"
image: mysql:5.7 image: mysql:8.0
volumes: volumes:
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh - ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
...@@ -36,17 +25,15 @@ services: ...@@ -36,17 +25,15 @@ services:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh" test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 30
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.131 ipv4_address: 192.168.71.131
oai-amf: oai-amf:
container_name: "rfsim5g-oai-amf" container_name: "rfsim5g-oai-amf"
image: oai-amf:august-dev image: oaisoftwarealliance/oai-amf:v1.5.0
environment: environment:
- TZ=Europe/paris - TZ=Europe/paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- MCC=208 - MCC=208
- MNC=99 - MNC=99
- REGION_ID=128 - REGION_ID=128
...@@ -62,132 +49,85 @@ services: ...@@ -62,132 +49,85 @@ services:
- PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MCC=208
- PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_MNC=99
- PLMN_SUPPORT_TAC=0x0001 - PLMN_SUPPORT_TAC=0x0001
# Only one slice is defined (1, 0xFFFFFF).
- SST_0=1 - SST_0=1
- SD_0=0xffffff
- SST_1=1
- SD_1=1
- AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_NGAP=eth0
- AMF_INTERFACE_NAME_FOR_N11=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0
# One single SMF instance
- SMF_INSTANCE_ID_0=1 - SMF_INSTANCE_ID_0=1
- SMF_FQDN_0=oai-smf - SMF_FQDN_0=oai-smf
- SMF_IPV4_ADDR_0=0.0.0.0 - SMF_IPV4_ADDR_0=192.168.71.133
- SMF_HTTP_VERSION_0=v1
- SELECTED_0=true - SELECTED_0=true
- SMF_INSTANCE_ID_1=2 # mysql definition in AMF is mandatory in mini deployment.
- SMF_FQDN_1=oai-smf
- SMF_IPV4_ADDR_1=0.0.0.0
- SMF_HTTP_VERSION_1=v1
- SELECTED_1=false
- MYSQL_SERVER=192.168.71.131 - MYSQL_SERVER=192.168.71.131
- MYSQL_USER=root - MYSQL_USER=root
- MYSQL_PASS=linux - MYSQL_PASS=linux
- MYSQL_DB=oai_db - MYSQL_DB=oai_db
- OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 # NF registration
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80 - NRF_FQDN=oai-nrf
- NF_REGISTRATION=yes - NF_REGISTRATION=yes
- SMF_SELECTION=yes - SMF_SELECTION=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- NRF_API_VERSION=v1 - USE_HTTP2=no
- NRF_FQDN=oai-nrf
- EXTERNAL_AUSF=no
- AUSF_IPV4_ADDRESS=0.0.0.0
- AUSF_PORT=80
- AUSF_API_VERSION=v1
- AUSF_FQDN=localhost
depends_on: depends_on:
- oai-nrf - oai-nrf
- mysql - mysql
volumes:
- ./amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
interval: 10s
timeout: 15s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.132 ipv4_address: 192.168.71.132
oai-smf: oai-smf:
container_name: "rfsim5g-oai-smf" container_name: "rfsim5g-oai-smf"
image: oai-smf:august-dev image: oaisoftwarealliance/oai-smf:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_N4=eth0
- SMF_INTERFACE_NAME_FOR_SBI=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0
- SMF_INTERFACE_PORT_FOR_SBI=80
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- SMF_API_VERSION=v1
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
- AMF_IPV4_ADDRESS=0.0.0.0 - AMF_IPV4_ADDRESS=192.168.71.132
- AMF_PORT=80
- AMF_API_VERSION=v1
- AMF_FQDN=oai-amf - AMF_FQDN=oai-amf
- UDM_IPV4_ADDRESS=127.0.0.1
- UDM_PORT=80
- UDM_API_VERSION=v1
- UDM_FQDN=localhost
- UPF_IPV4_ADDRESS=192.168.71.134 - UPF_IPV4_ADDRESS=192.168.71.134
- UPF_FQDN_0=oai-spgwu - UPF_FQDN_0=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
- REGISTER_NRF=yes - REGISTER_NRF=yes
- DISCOVER_UPF=yes - DISCOVER_UPF=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- USE_LOCAL_SUBSCRIPTION_INFO=yes
- UE_MTU=1500
# Only one slice is defined (1, 0xFFFFFF)
- DNN_NI0=oai - DNN_NI0=oai
- TYPE0=IPv4 - TYPE0=IPv4
- DNN_RANGE0=12.1.1.2 - 12.1.1.127 - DNN_RANGE0=12.1.1.2 - 12.1.1.127
- NSSAI_SST0=1 - NSSAI_SST0=1
- NSSAI_SD0=0xFFFFFF
- SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_UL0=200Mbps
- SESSION_AMBR_DL0=400Mbps - SESSION_AMBR_DL0=400Mbps
- DNN_NI2=oai.ipv4 - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
- ENABLE_USAGE_REPORTING=no
depends_on: depends_on:
- oai-nrf - oai-nrf
- oai-amf - oai-amf
volumes:
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.133 ipv4_address: 192.168.71.133
oai-spgwu: oai-spgwu:
container_name: "rfsim5g-oai-spgwu" container_name: "rfsim5g-oai-spgwu"
image: oai-spgwu-tiny:august-dev image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- PID_DIRECTORY=/var/run
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
- SGW_INTERFACE_NAME_FOR_SX=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0
- PGW_INTERFACE_NAME_FOR_SGI=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0
- NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_NAT_OPTION=yes
- NETWORK_UE_IP=12.1.1.0/24 - NETWORK_UE_IP=12.1.1.0/24
- SPGWC0_IP_ADDRESS=192.168.71.133
- BYPASS_UL_PFCP_RULES=no
- MCC=208
- MNC=99
- MNC03=099
- TAC=1
- GTP_EXTENSION_HEADER_PRESENT=yes
- GW_ID=1
- REALM=openairinterface.org
- ENABLE_5G_FEATURES=yes - ENABLE_5G_FEATURES=yes
- REGISTER_NRF=yes - REGISTER_NRF=yes
- USE_FQDN_NRF=yes - USE_FQDN_NRF=yes
- UPF_FQDN_5G=oai-spgwu - UPF_FQDN_5G=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
# Only one slice is defined (1, 0xFFFFFF)
- NSSAI_SST_0=1 - NSSAI_SST_0=1
- NSSAI_SD_0=0xffffff - NSSAI_SD_0=0xffffff
- DNN_0=oai - DNN_0=oai
...@@ -200,24 +140,16 @@ services: ...@@ -200,24 +140,16 @@ services:
cap_drop: cap_drop:
- ALL - ALL
privileged: true privileged: true
volumes:
- ./spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.134 ipv4_address: 192.168.71.134
traffic_net: traffic_net:
ipv4_address: 192.168.72.134 ipv4_address: 192.168.72.134
oai-ext-dn: oai-ext-dn:
image: ubuntu:bionic
privileged: true privileged: true
container_name: rfsim5g-oai-ext-dn container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
entrypoint: /bin/bash -c \ entrypoint: /bin/bash -c \
"apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
depends_on: depends_on:
...@@ -231,7 +163,7 @@ services: ...@@ -231,7 +163,7 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-gnb: oai-gnb:
image: oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-gnb container_name: rfsim5g-oai-gnb
environment: environment:
...@@ -260,7 +192,7 @@ services: ...@@ -260,7 +192,7 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-nr-ue: oai-nr-ue:
image: oai-nr-ue:develop image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true privileged: true
container_name: rfsim5g-oai-nr-ue container_name: rfsim5g-oai-nr-ue
environment: environment:
......
...@@ -32,28 +32,22 @@ Password: ...@@ -32,28 +32,22 @@ Password:
Now pull images. Now pull images.
```bash ```bash
$ docker pull mysql:5.7 $ docker pull mysql:8.0
$ docker pull oaisoftwarealliance/oai-amf:develop $ docker pull oaisoftwarealliance/oai-amf:v1.5.0
$ docker pull oaisoftwarealliance/oai-nrf:develop $ docker pull oaisoftwarealliance/oai-nrf:v1.5.0
$ docker pull oaisoftwarealliance/oai-smf:develop $ docker pull oaisoftwarealliance/oai-smf:v1.5.0
$ docker pull oaisoftwarealliance/oai-spgwu-tiny:develop $ docker pull oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
$ docker pull oaisoftwarealliance/trf-gen-cn5g:latest
$ docker pull oaisoftwarealliance/oai-gnb:develop $ docker pull oaisoftwarealliance/oai-gnb:develop
$ docker pull oaisoftwarealliance/oai-nr-ue:develop $ docker pull oaisoftwarealliance/oai-nr-ue:develop
$ docker pull oaisoftwarealliance/proxy:latest $ docker pull oaisoftwarealliance/proxy:develop
``` ```
And **re-tag** them for tutorials' docker-compose file to work. And **re-tag** them for tutorials' docker-compose file to work.
```bash ```bash
$ docker image tag oaisoftwarealliance/oai-amf:latest oai-amf:august-dev $ docker image tag oaisoftwarealliance/proxy:develop oai-lte-multi-ue-proxy:latest
$ docker image tag oaisoftwarealliance/oai-nrf:latest oai-nrf:august-dev
$ docker image tag oaisoftwarealliance/oai-smf:latest oai-smf:august-dev
$ docker image tag oaisoftwarealliance/oai-spgwu-tiny:latest oai-spgwu-tiny:august-dev
$ docker image tag oaisoftwarealliance/oai-gnb:develop oai-gnb:develop
$ docker image tag oaisoftwarealliance/oai-nr-ue:develop oai-nr-ue:develop
$ docker image tag oaisoftwarealliance/proxy:latest oai-lte-multi-ue-proxy:latest
``` ```
```bash ```bash
......
...@@ -2,27 +2,16 @@ version: '3.8' ...@@ -2,27 +2,16 @@ version: '3.8'
services: services:
oai-nrf: oai-nrf:
container_name: "l2sim-oai-nrf" container_name: "l2sim-oai-nrf"
image: oai-nrf:august-dev image: oaisoftwarealliance/oai-nrf:v1.5.0
environment: environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0 - NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80 - TZ=Europe/Paris
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- NRF_API_VERSION=v1
- INSTANCE=0
- PID_DIRECTORY=/var/run
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.130 ipv4_address: 192.168.71.130
volumes:
- ../5g_rfsimulator/nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
mysql: mysql:
container_name: "l2sim-mysql" container_name: "l2sim-mysql"
image: mysql:5.7 image: mysql:8.0
volumes: volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh - ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
...@@ -36,17 +25,15 @@ services: ...@@ -36,17 +25,15 @@ services:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh" test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 30
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.131 ipv4_address: 192.168.71.131
oai-amf: oai-amf:
container_name: "l2sim-oai-amf" container_name: "l2sim-oai-amf"
image: oai-amf:august-dev image: oaisoftwarealliance/oai-amf:v1.5.0
environment: environment:
- TZ=Europe/paris - TZ=Europe/paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- MCC=208 - MCC=208
- MNC=99 - MNC=99
- REGION_ID=128 - REGION_ID=128
...@@ -62,132 +49,85 @@ services: ...@@ -62,132 +49,85 @@ services:
- PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MCC=208
- PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_MNC=99
- PLMN_SUPPORT_TAC=0x0001 - PLMN_SUPPORT_TAC=0x0001
# Only one slice is defined (1, 0xFFFFFF).
- SST_0=1 - SST_0=1
- SD_0=0xffffff
- SST_1=1
- SD_1=1
- AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_NGAP=eth0
- AMF_INTERFACE_NAME_FOR_N11=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0
# One single SMF instance
- SMF_INSTANCE_ID_0=1 - SMF_INSTANCE_ID_0=1
- SMF_FQDN_0=oai-smf - SMF_FQDN_0=oai-smf
- SMF_IPV4_ADDR_0=0.0.0.0 - SMF_IPV4_ADDR_0=192.168.71.133
- SMF_HTTP_VERSION_0=v1
- SELECTED_0=true - SELECTED_0=true
- SMF_INSTANCE_ID_1=2 # mysql definition in AMF is mandatory in mini deployment.
- SMF_FQDN_1=oai-smf
- SMF_IPV4_ADDR_1=0.0.0.0
- SMF_HTTP_VERSION_1=v1
- SELECTED_1=false
- MYSQL_SERVER=192.168.71.131 - MYSQL_SERVER=192.168.71.131
- MYSQL_USER=root - MYSQL_USER=root
- MYSQL_PASS=linux - MYSQL_PASS=linux
- MYSQL_DB=oai_db - MYSQL_DB=oai_db
- OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 # NF registration
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80 - NRF_FQDN=oai-nrf
- NF_REGISTRATION=yes - NF_REGISTRATION=yes
- SMF_SELECTION=yes - SMF_SELECTION=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- NRF_API_VERSION=v1 - USE_HTTP2=no
- NRF_FQDN=oai-nrf
- EXTERNAL_AUSF=no
- AUSF_IPV4_ADDRESS=0.0.0.0
- AUSF_PORT=80
- AUSF_API_VERSION=v1
- AUSF_FQDN=localhost
depends_on: depends_on:
- oai-nrf - oai-nrf
- mysql - mysql
volumes:
- ../5g_rfsimulator/amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
interval: 10s
timeout: 15s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.132 ipv4_address: 192.168.71.132
oai-smf: oai-smf:
container_name: "l2sim-oai-smf" container_name: "l2sim-oai-smf"
image: oai-smf:august-dev image: oaisoftwarealliance/oai-smf:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_N4=eth0
- SMF_INTERFACE_NAME_FOR_SBI=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0
- SMF_INTERFACE_PORT_FOR_SBI=80
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- SMF_API_VERSION=v1
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
- AMF_IPV4_ADDRESS=0.0.0.0 - AMF_IPV4_ADDRESS=192.168.71.132
- AMF_PORT=80
- AMF_API_VERSION=v1
- AMF_FQDN=oai-amf - AMF_FQDN=oai-amf
- UDM_IPV4_ADDRESS=127.0.0.1
- UDM_PORT=80
- UDM_API_VERSION=v1
- UDM_FQDN=localhost
- UPF_IPV4_ADDRESS=192.168.71.134 - UPF_IPV4_ADDRESS=192.168.71.134
- UPF_FQDN_0=oai-spgwu - UPF_FQDN_0=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
- REGISTER_NRF=yes - REGISTER_NRF=yes
- DISCOVER_UPF=yes - DISCOVER_UPF=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- USE_LOCAL_SUBSCRIPTION_INFO=yes
- UE_MTU=1500
# Only one slice is defined (1, 0xFFFFFF)
- DNN_NI0=oai - DNN_NI0=oai
- TYPE0=IPv4 - TYPE0=IPv4
- DNN_RANGE0=12.1.1.2 - 12.1.1.127 - DNN_RANGE0=12.1.1.2 - 12.1.1.127
- NSSAI_SST0=1 - NSSAI_SST0=1
- NSSAI_SD0=0xFFFFFF
- SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_UL0=200Mbps
- SESSION_AMBR_DL0=400Mbps - SESSION_AMBR_DL0=400Mbps
- DNN_NI2=oai.ipv4 - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
- ENABLE_USAGE_REPORTING=no
depends_on: depends_on:
- oai-nrf - oai-nrf
- oai-amf - oai-amf
volumes:
- ../5g_rfsimulator/smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.133 ipv4_address: 192.168.71.133
oai-spgwu: oai-spgwu:
container_name: "l2sim-oai-spgwu" container_name: "l2sim-oai-spgwu"
image: oai-spgwu-tiny:august-dev image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- PID_DIRECTORY=/var/run
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
- SGW_INTERFACE_NAME_FOR_SX=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0
- PGW_INTERFACE_NAME_FOR_SGI=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0
- NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_NAT_OPTION=yes
- NETWORK_UE_IP=12.1.1.0/24 - NETWORK_UE_IP=12.1.1.0/24
- SPGWC0_IP_ADDRESS=192.168.71.133
- BYPASS_UL_PFCP_RULES=no
- MCC=208
- MNC=99
- MNC03=099
- TAC=1
- GTP_EXTENSION_HEADER_PRESENT=yes
- GW_ID=1
- REALM=openairinterface.org
- ENABLE_5G_FEATURES=yes - ENABLE_5G_FEATURES=yes
- REGISTER_NRF=yes - REGISTER_NRF=yes
- USE_FQDN_NRF=yes - USE_FQDN_NRF=yes
- UPF_FQDN_5G=oai-spgwu - UPF_FQDN_5G=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
# Only one slice is defined (1, 0xFFFFFF)
- NSSAI_SST_0=1 - NSSAI_SST_0=1
- NSSAI_SD_0=0xffffff - NSSAI_SD_0=0xffffff
- DNN_0=oai - DNN_0=oai
...@@ -200,24 +140,17 @@ services: ...@@ -200,24 +140,17 @@ services:
cap_drop: cap_drop:
- ALL - ALL
privileged: true privileged: true
volumes:
- ../5g_rfsimulator/spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.134 ipv4_address: 192.168.71.134
traffic_net: traffic_net:
ipv4_address: 192.168.72.134 ipv4_address: 192.168.72.134
oai-ext-dn: oai-ext-dn:
image: ubuntu:bionic
privileged: true privileged: true
container_name: "l2sim-oai-ext-dn" container_name: "l2sim-oai-ext-dn"
image: oaisoftwarealliance/trf-gen-cn5g:latest
entrypoint: /bin/bash -c \ entrypoint: /bin/bash -c \
"apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
depends_on: depends_on:
- oai-spgwu - oai-spgwu
...@@ -230,7 +163,7 @@ services: ...@@ -230,7 +163,7 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-gnb: oai-gnb:
image: oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: "l2sim-oai-gnb" container_name: "l2sim-oai-gnb"
network_mode: "host" network_mode: "host"
...@@ -278,7 +211,7 @@ services: ...@@ -278,7 +211,7 @@ services:
retries: 5 retries: 5
oai-nr-ue0: oai-nr-ue0:
image: oai-nr-ue:develop image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true privileged: true
container_name: "l2sim-oai-nr-ue0" container_name: "l2sim-oai-nr-ue0"
network_mode: "host" network_mode: "host"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
This page is only valid for an `Ubuntu18` host. This page is only valid for an `Ubuntu18` host.
**NOTE: this version (2022-01-27) has been updated for the `v1.3.0` version of the `OAI 5G CN`.** **NOTE: this version (2023-01-27) has been updated for the `v1.5.0` version of the `OAI 5G CN`.**
**Table of Contents** **Table of Contents**
...@@ -36,35 +36,24 @@ Password: ...@@ -36,35 +36,24 @@ Password:
Now pull images. Now pull images.
```bash ```bash
$ docker pull mysql:5.7 $ docker pull mysql:8.0
$ docker pull oaisoftwarealliance/oai-amf:develop $ docker pull oaisoftwarealliance/oai-amf:v1.5.0
$ docker pull oaisoftwarealliance/oai-nrf:develop $ docker pull oaisoftwarealliance/oai-nrf:v1.5.0
$ docker pull oaisoftwarealliance/oai-smf:develop $ docker pull oaisoftwarealliance/oai-smf:v1.5.0
$ docker pull oaisoftwarealliance/oai-spgwu-tiny:develop $ docker pull oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
$ docker pull oaisoftwarealliance/trf-gen-cn5g:latest
$ docker pull oaisoftwarealliance/oai-gnb:develop $ docker pull oaisoftwarealliance/oai-gnb:develop
$ docker pull oaisoftwarealliance/oai-nr-ue:develop $ docker pull oaisoftwarealliance/oai-nr-ue:develop
``` ```
And **re-tag** them for tutorials' docker-compose file to work.
```bash
$ docker image tag oaisoftwarealliance/oai-amf:latest oai-amf:august-dev
$ docker image tag oaisoftwarealliance/oai-nrf:latest oai-nrf:august-dev
$ docker image tag oaisoftwarealliance/oai-smf:latest oai-smf:august-dev
$ docker image tag oaisoftwarealliance/oai-spgwu-tiny:latest oai-spgwu-tiny:august-dev
$ docker image tag oaisoftwarealliance/oai-gnb:develop oai-gnb:develop
$ docker image tag oaisoftwarealliance/oai-nr-ue:develop oai-nr-ue:develop
```
```bash ```bash
$ docker logout $ docker logout
``` ```
**CAUTION: 2022/01/27 with the release `v1.3.0` of the `CN5G`, the previous version was not compatible any-more.** **CAUTION: 2023/01/27 with the release `v1.5.0` of the `CN5G`, the previous version was not compatible any-more.**
**This new version is working only with the `v1.3.0` of the `CN5G`.** **This new version is working only with the `v1.5.0` of the `CN5G`.**
# 2. Deploy containers # # 2. Deploy containers #
......
#!/bin/bash
set -eo pipefail
STATUS=0
AMF_PORT_FOR_NGAP=38412
AMF_PORT_FOR_N11_HTTP=80
AMF_IP_NGAP_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_NGAP | grep inet | awk {'print $2'})
AMF_IP_N11_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_N11 | grep inet | awk {'print $2'})
N2_PORT_STATUS=$(netstat -Snpl | grep -o "$AMF_IP_NGAP_INTERFACE:$AMF_PORT_FOR_NGAP")
N11_PORT_STATUS=$(netstat -tnpl | grep -o "$AMF_IP_N11_INTERFACE:$AMF_PORT_FOR_N11_HTTP")
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
NB_UNREPLACED_AT=`cat /openair-amf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
if [ $NB_UNREPLACED_AT -ne 0 ]; then
STATUS=1
echo "Healthcheck error: configuration file is not configured properly"
fi
if [[ -z $N2_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: N2 SCTP port $AMF_PORT_FOR_NGAP is not listening"
fi
if [[ -z $N11_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: N11/SBI TCP/HTTP port $AMF_PORT_FOR_N11_HTTP is not listening"
fi
#host="${MYSQL_SERVER}"
#user="${MYSQL_USER:-root}"
#export MYSQL_PWD="${MYSQL_PASS}"
#args=(
# -h"$host"
# -u"$user"
# --silent
#)
#if ! command -v mysql &> /dev/null; then
# echo "Installing mysql command"
# apt update
# apt-get -y install mysql-client
#else
# if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
# database_check=$(mysql -h$host -u$user -D oai_db --silent -e "SELECT * FROM users;")
# if [[ -z $database_check ]]; then
# echo "Healthcheck error: oai_db not populated"
# STATUS=1
# fi
# STATUS=0
# else
# echo "Healthcheck error: Mysql port inactive"
# STATUS=1
# fi
#fi
exit $STATUS
...@@ -2,27 +2,16 @@ version: '3.8' ...@@ -2,27 +2,16 @@ version: '3.8'
services: services:
oai-nrf: oai-nrf:
container_name: "rfsim5g-oai-nrf" container_name: "rfsim5g-oai-nrf"
image: oai-nrf:august-dev image: oaisoftwarealliance/oai-nrf:v1.5.0
environment: environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0 - NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80 - TZ=Europe/Paris
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- NRF_API_VERSION=v1
- INSTANCE=0
- PID_DIRECTORY=/var/run
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.130 ipv4_address: 192.168.71.130
volumes:
- ./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
mysql: mysql:
container_name: "rfsim5g-mysql" container_name: "rfsim5g-mysql"
image: mysql:5.7 image: mysql:8.0
volumes: volumes:
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh - ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
...@@ -36,17 +25,15 @@ services: ...@@ -36,17 +25,15 @@ services:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh" test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 30
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.131 ipv4_address: 192.168.71.131
oai-amf: oai-amf:
container_name: "rfsim5g-oai-amf" container_name: "rfsim5g-oai-amf"
image: oai-amf:august-dev image: oaisoftwarealliance/oai-amf:v1.5.0
environment: environment:
- TZ=Europe/paris - TZ=Europe/paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- MCC=208 - MCC=208
- MNC=99 - MNC=99
- REGION_ID=128 - REGION_ID=128
...@@ -62,132 +49,85 @@ services: ...@@ -62,132 +49,85 @@ services:
- PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MCC=208
- PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_MNC=99
- PLMN_SUPPORT_TAC=0x0001 - PLMN_SUPPORT_TAC=0x0001
# Only one slice is defined (1, 0xFFFFFF).
- SST_0=1 - SST_0=1
- SD_0=0xffffff
- SST_1=1
- SD_1=1
- AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_NGAP=eth0
- AMF_INTERFACE_NAME_FOR_N11=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0
# One single SMF instance
- SMF_INSTANCE_ID_0=1 - SMF_INSTANCE_ID_0=1
- SMF_FQDN_0=oai-smf - SMF_FQDN_0=oai-smf
- SMF_IPV4_ADDR_0=0.0.0.0 - SMF_IPV4_ADDR_0=192.168.71.133
- SMF_HTTP_VERSION_0=v1
- SELECTED_0=true - SELECTED_0=true
- SMF_INSTANCE_ID_1=2 # mysql definition in AMF is mandatory in mini deployment.
- SMF_FQDN_1=oai-smf
- SMF_IPV4_ADDR_1=0.0.0.0
- SMF_HTTP_VERSION_1=v1
- SELECTED_1=false
- MYSQL_SERVER=192.168.71.131 - MYSQL_SERVER=192.168.71.131
- MYSQL_USER=root - MYSQL_USER=root
- MYSQL_PASS=linux - MYSQL_PASS=linux
- MYSQL_DB=oai_db - MYSQL_DB=oai_db
- OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 # NF registration
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80 - NRF_FQDN=oai-nrf
- NF_REGISTRATION=yes - NF_REGISTRATION=yes
- SMF_SELECTION=yes - SMF_SELECTION=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- NRF_API_VERSION=v1 - USE_HTTP2=no
- NRF_FQDN=oai-nrf
- EXTERNAL_AUSF=no
- AUSF_IPV4_ADDRESS=0.0.0.0
- AUSF_PORT=80
- AUSF_API_VERSION=v1
- AUSF_FQDN=localhost
depends_on: depends_on:
- oai-nrf - oai-nrf
- mysql - mysql
volumes:
- ./amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
interval: 10s
timeout: 15s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.132 ipv4_address: 192.168.71.132
oai-smf: oai-smf:
container_name: "rfsim5g-oai-smf" container_name: "rfsim5g-oai-smf"
image: oai-smf:august-dev image: oaisoftwarealliance/oai-smf:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_N4=eth0
- SMF_INTERFACE_NAME_FOR_SBI=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0
- SMF_INTERFACE_PORT_FOR_SBI=80
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- SMF_API_VERSION=v1
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
- AMF_IPV4_ADDRESS=0.0.0.0 - AMF_IPV4_ADDRESS=192.168.71.132
- AMF_PORT=80
- AMF_API_VERSION=v1
- AMF_FQDN=oai-amf - AMF_FQDN=oai-amf
- UDM_IPV4_ADDRESS=127.0.0.1
- UDM_PORT=80
- UDM_API_VERSION=v1
- UDM_FQDN=localhost
- UPF_IPV4_ADDRESS=192.168.71.134 - UPF_IPV4_ADDRESS=192.168.71.134
- UPF_FQDN_0=oai-spgwu - UPF_FQDN_0=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
- REGISTER_NRF=yes - REGISTER_NRF=yes
- DISCOVER_UPF=yes - DISCOVER_UPF=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- USE_LOCAL_SUBSCRIPTION_INFO=yes
- UE_MTU=1500
# Only one slice is defined (1, 0xFFFFFF)
- DNN_NI0=oai - DNN_NI0=oai
- TYPE0=IPv4 - TYPE0=IPv4
- DNN_RANGE0=12.1.1.2 - 12.1.1.127 - DNN_RANGE0=12.1.1.2 - 12.1.1.127
- NSSAI_SST0=1 - NSSAI_SST0=1
- NSSAI_SD0=0xFFFFFF
- SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_UL0=200Mbps
- SESSION_AMBR_DL0=400Mbps - SESSION_AMBR_DL0=400Mbps
- DNN_NI2=oai.ipv4 - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
- ENABLE_USAGE_REPORTING=no
depends_on: depends_on:
- oai-nrf - oai-nrf
- oai-amf - oai-amf
volumes:
- ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.133 ipv4_address: 192.168.71.133
oai-spgwu: oai-spgwu:
container_name: "rfsim5g-oai-spgwu" container_name: "rfsim5g-oai-spgwu"
image: oai-spgwu-tiny:august-dev image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- PID_DIRECTORY=/var/run
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
- SGW_INTERFACE_NAME_FOR_SX=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0
- PGW_INTERFACE_NAME_FOR_SGI=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0
- NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_NAT_OPTION=yes
- NETWORK_UE_IP=12.1.1.0/24 - NETWORK_UE_IP=12.1.1.0/24
- SPGWC0_IP_ADDRESS=192.168.71.133
- BYPASS_UL_PFCP_RULES=no
- MCC=208
- MNC=99
- MNC03=099
- TAC=1
- GTP_EXTENSION_HEADER_PRESENT=yes
- GW_ID=1
- REALM=openairinterface.org
- ENABLE_5G_FEATURES=yes - ENABLE_5G_FEATURES=yes
- REGISTER_NRF=yes - REGISTER_NRF=yes
- USE_FQDN_NRF=yes - USE_FQDN_NRF=yes
- UPF_FQDN_5G=oai-spgwu - UPF_FQDN_5G=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
# Only one slice is defined (1, 0xFFFFFF)
- NSSAI_SST_0=1 - NSSAI_SST_0=1
- NSSAI_SD_0=0xffffff - NSSAI_SD_0=0xffffff
- DNN_0=oai - DNN_0=oai
...@@ -200,24 +140,16 @@ services: ...@@ -200,24 +140,16 @@ services:
cap_drop: cap_drop:
- ALL - ALL
privileged: true privileged: true
volumes:
- ./spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.134 ipv4_address: 192.168.71.134
traffic_net: traffic_net:
ipv4_address: 192.168.72.134 ipv4_address: 192.168.72.134
oai-ext-dn: oai-ext-dn:
image: ubuntu:bionic
privileged: true privileged: true
container_name: rfsim5g-oai-ext-dn container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
entrypoint: /bin/bash -c \ entrypoint: /bin/bash -c \
"apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
depends_on: depends_on:
...@@ -231,10 +163,10 @@ services: ...@@ -231,10 +163,10 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-gnb: oai-gnb:
image: oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-gnb container_name: rfsim5g-oai-gnb
environment: environment:
RFSIMULATOR: server RFSIMULATOR: server
USE_SA_TDD_MONO: 'yes' USE_SA_TDD_MONO: 'yes'
GNB_NAME: gnb-rfsim GNB_NAME: gnb-rfsim
...@@ -261,7 +193,7 @@ services: ...@@ -261,7 +193,7 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-nr-ue: oai-nr-ue:
image: oai-nr-ue:develop image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true privileged: true
container_name: rfsim5g-oai-nr-ue container_name: rfsim5g-oai-nr-ue
environment: environment:
...@@ -284,7 +216,7 @@ services: ...@@ -284,7 +216,7 @@ services:
retries: 5 retries: 5
oai-nr-ue2: oai-nr-ue2:
image: oai-nr-ue:develop image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true privileged: true
container_name: rfsim5g-oai-nr-ue2 container_name: rfsim5g-oai-nr-ue2
environment: environment:
......
#!/bin/bash
set -eo pipefail
STATUS=0
NRF_IP_SBI_INTERFACE=$(ifconfig $NRF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
NRF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$NRF_IP_SBI_INTERFACE:$NRF_INTERFACE_PORT_FOR_SBI")
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
NB_UNREPLACED_AT=`cat /openair-nrf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
if [ $NB_UNREPLACED_AT -ne 0 ]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
fi
if [[ -z $NRF_SBI_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $NRF_INTERFACE_PORT_FOR_SBI is not listening."
fi
exit $STATUS
\ No newline at end of file
#!/bin/bash
set -eo pipefail
STATUS=0
SMF_IP_SBI_INTERFACE=$(ifconfig $SMF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'})
SMF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$SMF_IP_SBI_INTERFACE:$SMF_INTERFACE_PORT_FOR_SBI")
#Check if entrypoint properly configured the conf file and no parameter is unset(optional)
#NB_UNREPLACED_AT=`cat /openair-smf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
#if [ $NB_UNREPLACED_AT -ne 0 ]; then
# STATUS=-1
# echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
#fi
#
if [[ -z $SMF_SBI_PORT_STATUS ]]; then
STATUS=-1
echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $SMF_INTERFACE_PORT_FOR_SBI is not listening."
fi
exit $STATUS
#!/bin/bash
set -eo pipefail
STATUS=0
SGW_PORT_FOR_S1U_S12_S4_UP=2152
SGW_PORT_FOR_SX=8805
SGW_IP_S1U_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP | grep inet | awk {'print $2'})
SGW_IP_SX_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_SX | grep inet | awk {'print $2'})
S1U_S12_S4_UP_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_S1U_INTERFACE:$SGW_PORT_FOR_S1U_S12_S4_UP")
SX_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_SX_INTERFACE:$SGW_PORT_FOR_SX")
#Check if entrypoint properly configured the conf file and no parameter is unset (optional)
NB_UNREPLACED_AT=`cat /openair-spgwu/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true`
if [ $NB_UNREPLACED_AT -ne 0 ]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY configuration file is not configured properly"
fi
if [[ -z $S1U_S12_S4_UP_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY S1U port $SGW_PORT_FOR_S1U_S12_S4_UP is not listening."
fi
if [[ -z $SX_PORT_STATUS ]]; then
STATUS=1
echo "Healthcheck error: UNHEALTHY SX port $SGW_PORT_FOR_SX is not listening."
fi
exit $STATUS
\ No newline at end of file
...@@ -2,28 +2,16 @@ version: '3.8' ...@@ -2,28 +2,16 @@ version: '3.8'
services: services:
oai-nrf: oai-nrf:
container_name: "rfsim5g-oai-nrf" container_name: "rfsim5g-oai-nrf"
image: oai-nrf:august-dev image: oaisoftwarealliance/oai-nrf:v1.5.0
environment: environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0 - NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80 - TZ=Europe/Paris
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- NRF_API_VERSION=v1
- INSTANCE=0
- PID_DIRECTORY=/var/run
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.130 ipv4_address: 192.168.71.130
volumes:
- ../5g_rfsimulator/nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
mysql: mysql:
container_name: "rfsim5g-mysql" container_name: "rfsim5g-mysql"
image: mysql:5.7 image: mysql:8.0
volumes: volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh - ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
...@@ -37,18 +25,15 @@ services: ...@@ -37,18 +25,15 @@ services:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh" test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 30
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.131 ipv4_address: 192.168.71.131
oai-amf: oai-amf:
container_name: "rfsim5g-oai-amf" container_name: "rfsim5g-oai-amf"
image: oai-amf:august-dev image: oaisoftwarealliance/oai-amf:v1.5.0
environment: environment:
- TZ=Europe/paris - TZ=Europe/paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- MCC=208 - MCC=208
- MNC=99 - MNC=99
- REGION_ID=128 - REGION_ID=128
...@@ -64,134 +49,85 @@ services: ...@@ -64,134 +49,85 @@ services:
- PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MCC=208
- PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_MNC=99
- PLMN_SUPPORT_TAC=0x0001 - PLMN_SUPPORT_TAC=0x0001
# Only one slice is defined (1, 0xFFFFFF).
- SST_0=1 - SST_0=1
- SD_0=0xffffff
- SST_1=1
- SD_1=1
- AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_NGAP=eth0
- AMF_INTERFACE_NAME_FOR_N11=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0
# One single SMF instance
- SMF_INSTANCE_ID_0=1 - SMF_INSTANCE_ID_0=1
- SMF_FQDN_0=oai-smf - SMF_FQDN_0=oai-smf
- SMF_IPV4_ADDR_0=0.0.0.0 - SMF_IPV4_ADDR_0=192.168.71.133
- SMF_HTTP_VERSION_0=v1
- SELECTED_0=true - SELECTED_0=true
- SMF_INSTANCE_ID_1=2 # mysql definition in AMF is mandatory in mini deployment.
- SMF_FQDN_1=oai-smf
- SMF_IPV4_ADDR_1=0.0.0.0
- SMF_HTTP_VERSION_1=v1
- SELECTED_1=false
- MYSQL_SERVER=192.168.71.131 - MYSQL_SERVER=192.168.71.131
- MYSQL_USER=root - MYSQL_USER=root
- MYSQL_PASS=linux - MYSQL_PASS=linux
- MYSQL_DB=oai_db - MYSQL_DB=oai_db
- OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 # NF registration
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80 - NRF_FQDN=oai-nrf
- NF_REGISTRATION=yes - NF_REGISTRATION=yes
- SMF_SELECTION=yes - SMF_SELECTION=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- NRF_API_VERSION=v1 - USE_HTTP2=no
- NRF_FQDN=oai-nrf
- EXTERNAL_AUSF=no
- AUSF_IPV4_ADDRESS=0.0.0.0
- AUSF_PORT=80
- AUSF_API_VERSION=v1
- AUSF_FQDN=localhost
depends_on: depends_on:
- oai-nrf - oai-nrf
- mysql - mysql
volumes:
- ../5g_rfsimulator/amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
interval: 10s
timeout: 15s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.132 ipv4_address: 192.168.71.132
oai-smf: oai-smf:
container_name: "rfsim5g-oai-smf" container_name: "rfsim5g-oai-smf"
image: oai-smf:august-dev image: oaisoftwarealliance/oai-smf:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_N4=eth0
- SMF_INTERFACE_NAME_FOR_SBI=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0
- SMF_INTERFACE_PORT_FOR_SBI=80
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- SMF_API_VERSION=v1
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
- AMF_IPV4_ADDRESS=0.0.0.0 - AMF_IPV4_ADDRESS=192.168.71.132
- AMF_PORT=80
- AMF_API_VERSION=v1
- AMF_FQDN=oai-amf - AMF_FQDN=oai-amf
- UDM_IPV4_ADDRESS=127.0.0.1
- UDM_PORT=80
- UDM_API_VERSION=v1
- UDM_FQDN=localhost
- UPF_IPV4_ADDRESS=192.168.71.134 - UPF_IPV4_ADDRESS=192.168.71.134
- UPF_FQDN_0=oai-spgwu - UPF_FQDN_0=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
- REGISTER_NRF=yes - REGISTER_NRF=yes
- DISCOVER_UPF=yes - DISCOVER_UPF=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- USE_LOCAL_SUBSCRIPTION_INFO=yes
- UE_MTU=1500
# Only one slice is defined (1, 0xFFFFFF)
- DNN_NI0=oai - DNN_NI0=oai
- TYPE0=IPv4 - TYPE0=IPv4
- DNN_RANGE0=12.1.1.2 - 12.1.1.127 - DNN_RANGE0=12.1.1.2 - 12.1.1.127
- NSSAI_SST0=1 - NSSAI_SST0=1
- NSSAI_SD0=0xFFFFFF
- SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_UL0=200Mbps
- SESSION_AMBR_DL0=400Mbps - SESSION_AMBR_DL0=400Mbps
- DNN_NI2=oai.ipv4 - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
- ENABLE_USAGE_REPORTING=no
depends_on: depends_on:
- oai-nrf - oai-nrf
- oai-amf - oai-amf
volumes:
- ../5g_rfsimulator/smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.133 ipv4_address: 192.168.71.133
oai-spgwu: oai-spgwu:
container_name: "rfsim5g-oai-spgwu" container_name: "rfsim5g-oai-spgwu"
image: oai-spgwu-tiny:august-dev image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- PID_DIRECTORY=/var/run
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
- SGW_INTERFACE_NAME_FOR_SX=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0
- PGW_INTERFACE_NAME_FOR_SGI=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0
- NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_NAT_OPTION=yes
- NETWORK_UE_IP=12.1.1.0/24 - NETWORK_UE_IP=12.1.1.0/24
- SPGWC0_IP_ADDRESS=192.168.71.133
- BYPASS_UL_PFCP_RULES=no
- MCC=208
- MNC=99
- MNC03=099
- TAC=1
- GTP_EXTENSION_HEADER_PRESENT=yes
- GW_ID=1
- REALM=openairinterface.org
- ENABLE_5G_FEATURES=yes - ENABLE_5G_FEATURES=yes
- REGISTER_NRF=yes - REGISTER_NRF=yes
- USE_FQDN_NRF=yes - USE_FQDN_NRF=yes
- UPF_FQDN_5G=oai-spgwu - UPF_FQDN_5G=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
# Only one slice is defined (1, 0xFFFFFF)
- NSSAI_SST_0=1 - NSSAI_SST_0=1
- NSSAI_SD_0=0xffffff - NSSAI_SD_0=0xffffff
- DNN_0=oai - DNN_0=oai
...@@ -204,25 +140,16 @@ services: ...@@ -204,25 +140,16 @@ services:
cap_drop: cap_drop:
- ALL - ALL
privileged: true privileged: true
volumes:
- ../5g_rfsimulator/spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.134 ipv4_address: 192.168.71.134
traffic_net: traffic_net:
ipv4_address: 192.168.72.134 ipv4_address: 192.168.72.134
oai-ext-dn: oai-ext-dn:
image: ubuntu:bionic
privileged: true privileged: true
container_name: rfsim5g-oai-ext-dn container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
entrypoint: /bin/bash -c \ entrypoint: /bin/bash -c \
"apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
depends_on: depends_on:
...@@ -235,9 +162,8 @@ services: ...@@ -235,9 +162,8 @@ services:
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-gnb: oai-gnb:
image: oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-gnb container_name: rfsim5g-oai-gnb
environment: environment:
...@@ -256,9 +182,8 @@ services: ...@@ -256,9 +182,8 @@ services:
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-nr-ue: oai-nr-ue:
image: oai-nr-ue:develop image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true privileged: true
container_name: rfsim5g-oai-nr-ue container_name: rfsim5g-oai-nr-ue
environment: environment:
......
...@@ -2,28 +2,16 @@ version: '3.8' ...@@ -2,28 +2,16 @@ version: '3.8'
services: services:
oai-nrf: oai-nrf:
container_name: "rfsim5g-oai-nrf" container_name: "rfsim5g-oai-nrf"
image: oai-nrf:august-dev image: oaisoftwarealliance/oai-nrf:v1.5.0
environment: environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0 - NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80 - TZ=Europe/Paris
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- NRF_API_VERSION=v1
- INSTANCE=0
- PID_DIRECTORY=/var/run
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.130 ipv4_address: 192.168.71.130
volumes:
- ../5g_rfsimulator/nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
mysql: mysql:
container_name: "rfsim5g-mysql" container_name: "rfsim5g-mysql"
image: mysql:5.7 image: mysql:8.0
volumes: volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh - ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
...@@ -37,18 +25,15 @@ services: ...@@ -37,18 +25,15 @@ services:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh" test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 30
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.131 ipv4_address: 192.168.71.131
oai-amf: oai-amf:
container_name: "rfsim5g-oai-amf" container_name: "rfsim5g-oai-amf"
image: oai-amf:august-dev image: oaisoftwarealliance/oai-amf:v1.5.0
environment: environment:
- TZ=Europe/paris - TZ=Europe/paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- MCC=208 - MCC=208
- MNC=99 - MNC=99
- REGION_ID=128 - REGION_ID=128
...@@ -64,134 +49,85 @@ services: ...@@ -64,134 +49,85 @@ services:
- PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MCC=208
- PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_MNC=99
- PLMN_SUPPORT_TAC=0x0001 - PLMN_SUPPORT_TAC=0x0001
# Only one slice is defined (1, 0xFFFFFF).
- SST_0=1 - SST_0=1
- SD_0=0xffffff
- SST_1=1
- SD_1=1
- AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_NGAP=eth0
- AMF_INTERFACE_NAME_FOR_N11=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0
# One single SMF instance
- SMF_INSTANCE_ID_0=1 - SMF_INSTANCE_ID_0=1
- SMF_FQDN_0=oai-smf - SMF_FQDN_0=oai-smf
- SMF_IPV4_ADDR_0=0.0.0.0 - SMF_IPV4_ADDR_0=192.168.71.133
- SMF_HTTP_VERSION_0=v1
- SELECTED_0=true - SELECTED_0=true
- SMF_INSTANCE_ID_1=2 # mysql definition in AMF is mandatory in mini deployment.
- SMF_FQDN_1=oai-smf
- SMF_IPV4_ADDR_1=0.0.0.0
- SMF_HTTP_VERSION_1=v1
- SELECTED_1=false
- MYSQL_SERVER=192.168.71.131 - MYSQL_SERVER=192.168.71.131
- MYSQL_USER=root - MYSQL_USER=root
- MYSQL_PASS=linux - MYSQL_PASS=linux
- MYSQL_DB=oai_db - MYSQL_DB=oai_db
- OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 # NF registration
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80 - NRF_FQDN=oai-nrf
- NF_REGISTRATION=yes - NF_REGISTRATION=yes
- SMF_SELECTION=yes - SMF_SELECTION=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- NRF_API_VERSION=v1 - USE_HTTP2=no
- NRF_FQDN=oai-nrf
- EXTERNAL_AUSF=no
- AUSF_IPV4_ADDRESS=0.0.0.0
- AUSF_PORT=80
- AUSF_API_VERSION=v1
- AUSF_FQDN=localhost
depends_on: depends_on:
- oai-nrf - oai-nrf
- mysql - mysql
volumes:
- ../5g_rfsimulator/amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
interval: 10s
timeout: 15s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.132 ipv4_address: 192.168.71.132
oai-smf: oai-smf:
container_name: "rfsim5g-oai-smf" container_name: "rfsim5g-oai-smf"
image: oai-smf:august-dev image: oaisoftwarealliance/oai-smf:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_N4=eth0
- SMF_INTERFACE_NAME_FOR_SBI=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0
- SMF_INTERFACE_PORT_FOR_SBI=80
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- SMF_API_VERSION=v1
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
- AMF_IPV4_ADDRESS=0.0.0.0 - AMF_IPV4_ADDRESS=192.168.71.132
- AMF_PORT=80
- AMF_API_VERSION=v1
- AMF_FQDN=oai-amf - AMF_FQDN=oai-amf
- UDM_IPV4_ADDRESS=127.0.0.1
- UDM_PORT=80
- UDM_API_VERSION=v1
- UDM_FQDN=localhost
- UPF_IPV4_ADDRESS=192.168.71.134 - UPF_IPV4_ADDRESS=192.168.71.134
- UPF_FQDN_0=oai-spgwu - UPF_FQDN_0=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
- REGISTER_NRF=yes - REGISTER_NRF=yes
- DISCOVER_UPF=yes - DISCOVER_UPF=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- USE_LOCAL_SUBSCRIPTION_INFO=yes
- UE_MTU=1500
# Only one slice is defined (1, 0xFFFFFF)
- DNN_NI0=oai - DNN_NI0=oai
- TYPE0=IPv4 - TYPE0=IPv4
- DNN_RANGE0=12.1.1.2 - 12.1.1.127 - DNN_RANGE0=12.1.1.2 - 12.1.1.127
- NSSAI_SST0=1 - NSSAI_SST0=1
- NSSAI_SD0=0xFFFFFF
- SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_UL0=200Mbps
- SESSION_AMBR_DL0=400Mbps - SESSION_AMBR_DL0=400Mbps
- DNN_NI2=oai.ipv4 - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
- ENABLE_USAGE_REPORTING=no
depends_on: depends_on:
- oai-nrf - oai-nrf
- oai-amf - oai-amf
volumes:
- ../5g_rfsimulator/smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.133 ipv4_address: 192.168.71.133
oai-spgwu: oai-spgwu:
container_name: "rfsim5g-oai-spgwu" container_name: "rfsim5g-oai-spgwu"
image: oai-spgwu-tiny:august-dev image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- PID_DIRECTORY=/var/run
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
- SGW_INTERFACE_NAME_FOR_SX=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0
- PGW_INTERFACE_NAME_FOR_SGI=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0
- NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_NAT_OPTION=yes
- NETWORK_UE_IP=12.1.1.0/24 - NETWORK_UE_IP=12.1.1.0/24
- SPGWC0_IP_ADDRESS=192.168.71.133
- BYPASS_UL_PFCP_RULES=no
- MCC=208
- MNC=99
- MNC03=099
- TAC=1
- GTP_EXTENSION_HEADER_PRESENT=yes
- GW_ID=1
- REALM=openairinterface.org
- ENABLE_5G_FEATURES=yes - ENABLE_5G_FEATURES=yes
- REGISTER_NRF=yes - REGISTER_NRF=yes
- USE_FQDN_NRF=yes - USE_FQDN_NRF=yes
- UPF_FQDN_5G=oai-spgwu - UPF_FQDN_5G=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
# Only one slice is defined (1, 0xFFFFFF)
- NSSAI_SST_0=1 - NSSAI_SST_0=1
- NSSAI_SD_0=0xffffff - NSSAI_SD_0=0xffffff
- DNN_0=oai - DNN_0=oai
...@@ -204,25 +140,16 @@ services: ...@@ -204,25 +140,16 @@ services:
cap_drop: cap_drop:
- ALL - ALL
privileged: true privileged: true
volumes:
- ../5g_rfsimulator/spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.134 ipv4_address: 192.168.71.134
traffic_net: traffic_net:
ipv4_address: 192.168.72.134 ipv4_address: 192.168.72.134
oai-ext-dn: oai-ext-dn:
image: ubuntu:bionic
privileged: true privileged: true
container_name: rfsim5g-oai-ext-dn container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
entrypoint: /bin/bash -c \ entrypoint: /bin/bash -c \
"apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
depends_on: depends_on:
...@@ -235,9 +162,8 @@ services: ...@@ -235,9 +162,8 @@ services:
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-gnb: oai-gnb:
image: oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-gnb container_name: rfsim5g-oai-gnb
environment: environment:
...@@ -258,7 +184,7 @@ services: ...@@ -258,7 +184,7 @@ services:
retries: 5 retries: 5
oai-nr-ue: oai-nr-ue:
image: oai-nr-ue:develop image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true privileged: true
container_name: rfsim5g-oai-nr-ue container_name: rfsim5g-oai-nr-ue
environment: environment:
......
...@@ -2,28 +2,16 @@ version: '3.8' ...@@ -2,28 +2,16 @@ version: '3.8'
services: services:
oai-nrf: oai-nrf:
container_name: "rfsim5g-oai-nrf" container_name: "rfsim5g-oai-nrf"
image: oai-nrf:august-dev image: oaisoftwarealliance/oai-nrf:v1.5.0
environment: environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0 - NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80 - TZ=Europe/Paris
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- NRF_API_VERSION=v1
- INSTANCE=0
- PID_DIRECTORY=/var/run
networks: networks:
core_net: core_net:
ipv4_address: 192.168.71.130 ipv4_address: 192.168.71.130
volumes:
- ../5g_rfsimulator/nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
mysql: mysql:
container_name: "rfsim5g-mysql" container_name: "rfsim5g-mysql"
image: mysql:5.7 image: mysql:8.0
volumes: volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh - ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
...@@ -37,18 +25,15 @@ services: ...@@ -37,18 +25,15 @@ services:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh" test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 30
networks: networks:
core_net: core_net:
ipv4_address: 192.168.71.131 ipv4_address: 192.168.71.131
oai-amf: oai-amf:
container_name: "rfsim5g-oai-amf" container_name: "rfsim5g-oai-amf"
image: oai-amf:august-dev image: oaisoftwarealliance/oai-amf:v1.5.0
environment: environment:
- TZ=Europe/paris - TZ=Europe/paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- MCC=208 - MCC=208
- MNC=99 - MNC=99
- REGION_ID=128 - REGION_ID=128
...@@ -64,134 +49,85 @@ services: ...@@ -64,134 +49,85 @@ services:
- PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MCC=208
- PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_MNC=99
- PLMN_SUPPORT_TAC=0x0001 - PLMN_SUPPORT_TAC=0x0001
# Only one slice is defined (1, 0xFFFFFF).
- SST_0=1 - SST_0=1
- SD_0=0xffffff
- SST_1=1
- SD_1=1
- AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_NGAP=eth0
- AMF_INTERFACE_NAME_FOR_N11=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0
# One single SMF instance
- SMF_INSTANCE_ID_0=1 - SMF_INSTANCE_ID_0=1
- SMF_FQDN_0=oai-smf - SMF_FQDN_0=oai-smf
- SMF_IPV4_ADDR_0=0.0.0.0 - SMF_IPV4_ADDR_0=192.168.71.133
- SMF_HTTP_VERSION_0=v1
- SELECTED_0=true - SELECTED_0=true
- SMF_INSTANCE_ID_1=2 # mysql definition in AMF is mandatory in mini deployment.
- SMF_FQDN_1=oai-smf
- SMF_IPV4_ADDR_1=0.0.0.0
- SMF_HTTP_VERSION_1=v1
- SELECTED_1=false
- MYSQL_SERVER=192.168.71.131 - MYSQL_SERVER=192.168.71.131
- MYSQL_USER=root - MYSQL_USER=root
- MYSQL_PASS=linux - MYSQL_PASS=linux
- MYSQL_DB=oai_db - MYSQL_DB=oai_db
- OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 # NF registration
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80 - NRF_FQDN=oai-nrf
- NF_REGISTRATION=yes - NF_REGISTRATION=yes
- SMF_SELECTION=yes - SMF_SELECTION=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- NRF_API_VERSION=v1 - USE_HTTP2=no
- NRF_FQDN=oai-nrf
- EXTERNAL_AUSF=no
- AUSF_IPV4_ADDRESS=0.0.0.0
- AUSF_PORT=80
- AUSF_API_VERSION=v1
- AUSF_FQDN=localhost
depends_on: depends_on:
- oai-nrf - oai-nrf
- mysql - mysql
volumes:
- ../5g_rfsimulator/amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
interval: 10s
timeout: 15s
retries: 5
networks: networks:
core_net: core_net:
ipv4_address: 192.168.71.132 ipv4_address: 192.168.71.132
oai-smf: oai-smf:
container_name: "rfsim5g-oai-smf" container_name: "rfsim5g-oai-smf"
image: oai-smf:august-dev image: oaisoftwarealliance/oai-smf:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_N4=eth0
- SMF_INTERFACE_NAME_FOR_SBI=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0
- SMF_INTERFACE_PORT_FOR_SBI=80
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- SMF_API_VERSION=v1
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
- AMF_IPV4_ADDRESS=0.0.0.0 - AMF_IPV4_ADDRESS=192.168.71.132
- AMF_PORT=80
- AMF_API_VERSION=v1
- AMF_FQDN=oai-amf - AMF_FQDN=oai-amf
- UDM_IPV4_ADDRESS=127.0.0.1
- UDM_PORT=80
- UDM_API_VERSION=v1
- UDM_FQDN=localhost
- UPF_IPV4_ADDRESS=192.168.71.134 - UPF_IPV4_ADDRESS=192.168.71.134
- UPF_FQDN_0=oai-spgwu - UPF_FQDN_0=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
- REGISTER_NRF=yes - REGISTER_NRF=yes
- DISCOVER_UPF=yes - DISCOVER_UPF=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- USE_LOCAL_SUBSCRIPTION_INFO=yes
- UE_MTU=1500
# Only one slice is defined (1, 0xFFFFFF)
- DNN_NI0=oai - DNN_NI0=oai
- TYPE0=IPv4 - TYPE0=IPv4
- DNN_RANGE0=12.1.1.2 - 12.1.1.127 - DNN_RANGE0=12.1.1.2 - 12.1.1.127
- NSSAI_SST0=1 - NSSAI_SST0=1
- NSSAI_SD0=0xFFFFFF
- SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_UL0=200Mbps
- SESSION_AMBR_DL0=400Mbps - SESSION_AMBR_DL0=400Mbps
- DNN_NI2=oai.ipv4 - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
- ENABLE_USAGE_REPORTING=no
depends_on: depends_on:
- oai-nrf - oai-nrf
- oai-amf - oai-amf
volumes:
- ../5g_rfsimulator/smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
core_net: core_net:
ipv4_address: 192.168.71.133 ipv4_address: 192.168.71.133
oai-spgwu: oai-spgwu:
container_name: "rfsim5g-oai-spgwu" container_name: "rfsim5g-oai-spgwu"
image: oai-spgwu-tiny:august-dev image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- PID_DIRECTORY=/var/run
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
- SGW_INTERFACE_NAME_FOR_SX=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0
- PGW_INTERFACE_NAME_FOR_SGI=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0
- NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_NAT_OPTION=yes
- NETWORK_UE_IP=12.1.1.0/24 - NETWORK_UE_IP=12.1.1.0/24
- SPGWC0_IP_ADDRESS=192.168.71.133
- BYPASS_UL_PFCP_RULES=no
- MCC=208
- MNC=99
- MNC03=099
- TAC=1
- GTP_EXTENSION_HEADER_PRESENT=yes
- GW_ID=1
- REALM=openairinterface.org
- ENABLE_5G_FEATURES=yes - ENABLE_5G_FEATURES=yes
- REGISTER_NRF=yes - REGISTER_NRF=yes
- USE_FQDN_NRF=yes - USE_FQDN_NRF=yes
- UPF_FQDN_5G=oai-spgwu - UPF_FQDN_5G=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
# Only one slice is defined (1, 0xFFFFFF)
- NSSAI_SST_0=1 - NSSAI_SST_0=1
- NSSAI_SD_0=0xffffff - NSSAI_SD_0=0xffffff
- DNN_0=oai - DNN_0=oai
...@@ -204,13 +140,6 @@ services: ...@@ -204,13 +140,6 @@ services:
cap_drop: cap_drop:
- ALL - ALL
privileged: true privileged: true
volumes:
- ../5g_rfsimulator/spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
core_net: core_net:
ipv4_address: 192.168.71.134 ipv4_address: 192.168.71.134
...@@ -218,11 +147,10 @@ services: ...@@ -218,11 +147,10 @@ services:
ipv4_address: 192.168.73.134 ipv4_address: 192.168.73.134
oai-ext-dn: oai-ext-dn:
image: ubuntu:bionic
privileged: true privileged: true
container_name: rfsim5g-oai-ext-dn container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
entrypoint: /bin/bash -c \ entrypoint: /bin/bash -c \
"apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.73.134 dev eth0; sleep infinity" "ip route add 12.1.1.0/24 via 192.168.73.134 dev eth0; sleep infinity"
depends_on: depends_on:
...@@ -237,7 +165,7 @@ services: ...@@ -237,7 +165,7 @@ services:
retries: 5 retries: 5
oai-cucp: oai-cucp:
image: oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-cucp container_name: rfsim5g-oai-cucp
environment: environment:
...@@ -259,7 +187,7 @@ services: ...@@ -259,7 +187,7 @@ services:
retries: 5 retries: 5
oai-cuup: oai-cuup:
image: oai-nr-cuup:develop image: oaisoftwarealliance/oai-nr-cuup:develop
privileged: true privileged: true
container_name: rfsim5g-oai-cuup container_name: rfsim5g-oai-cuup
environment: environment:
...@@ -282,7 +210,7 @@ services: ...@@ -282,7 +210,7 @@ services:
retries: 5 retries: 5
oai-du: oai-du:
image: oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-du container_name: rfsim5g-oai-du
environment: environment:
...@@ -301,7 +229,7 @@ services: ...@@ -301,7 +229,7 @@ services:
retries: 5 retries: 5
oai-nr-ue: oai-nr-ue:
image: oai-nr-ue:develop image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true privileged: true
container_name: rfsim5g-oai-nr-ue container_name: rfsim5g-oai-nr-ue
environment: environment:
......
version: '3.8' version: '3.8'
services: services:
oai-gnb: oai-gnb:
image: oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-gnb container_name: rfsim5g-oai-gnb
environment: environment:
...@@ -21,7 +21,7 @@ services: ...@@ -21,7 +21,7 @@ services:
retries: 5 retries: 5
oai-nr-ue: oai-nr-ue:
image: oai-nr-ue:develop image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true privileged: true
container_name: rfsim5g-oai-nr-ue container_name: rfsim5g-oai-nr-ue
environment: environment:
......
version: '3.8' version: '3.8'
services: services:
oai-gnb: oai-gnb:
image: oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-gnb container_name: rfsim5g-oai-gnb
environment: environment:
...@@ -21,7 +21,7 @@ services: ...@@ -21,7 +21,7 @@ services:
retries: 5 retries: 5
oai-nr-ue: oai-nr-ue:
image: oai-nr-ue:develop image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true privileged: true
container_name: rfsim5g-oai-nr-ue container_name: rfsim5g-oai-nr-ue
environment: environment:
......
version: '3.8' version: '3.8'
services: services:
oai-gnb: oai-gnb:
image: oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-gnb container_name: rfsim5g-oai-gnb
environment: environment:
...@@ -21,7 +21,7 @@ services: ...@@ -21,7 +21,7 @@ services:
retries: 5 retries: 5
oai-nr-ue: oai-nr-ue:
image: oai-nr-ue:develop image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true privileged: true
container_name: rfsim5g-oai-nr-ue container_name: rfsim5g-oai-nr-ue
environment: environment:
......
...@@ -2,28 +2,16 @@ version: '3.8' ...@@ -2,28 +2,16 @@ version: '3.8'
services: services:
oai-nrf: oai-nrf:
container_name: "rfsim5g-oai-nrf" container_name: "rfsim5g-oai-nrf"
image: oai-nrf:august-dev image: oaisoftwarealliance/oai-nrf:v1.5.0
environment: environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0 - NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80 - TZ=Europe/Paris
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- NRF_API_VERSION=v1
- INSTANCE=0
- PID_DIRECTORY=/var/run
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.130 ipv4_address: 192.168.71.130
volumes:
- ../5g_rfsimulator/nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
mysql: mysql:
container_name: "rfsim5g-mysql" container_name: "rfsim5g-mysql"
image: mysql:5.7 image: mysql:8.0
volumes: volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh - ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
...@@ -37,18 +25,15 @@ services: ...@@ -37,18 +25,15 @@ services:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh" test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 30
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.131 ipv4_address: 192.168.71.131
oai-amf: oai-amf:
container_name: "rfsim5g-oai-amf" container_name: "rfsim5g-oai-amf"
image: oai-amf:august-dev image: oaisoftwarealliance/oai-amf:v1.5.0
environment: environment:
- TZ=Europe/paris - TZ=Europe/paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- MCC=208 - MCC=208
- MNC=99 - MNC=99
- REGION_ID=128 - REGION_ID=128
...@@ -64,134 +49,85 @@ services: ...@@ -64,134 +49,85 @@ services:
- PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MCC=208
- PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_MNC=99
- PLMN_SUPPORT_TAC=0x0001 - PLMN_SUPPORT_TAC=0x0001
# Only one slice is defined (1, 0xFFFFFF).
- SST_0=1 - SST_0=1
- SD_0=0xffffff
- SST_1=1
- SD_1=1
- AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_NGAP=eth0
- AMF_INTERFACE_NAME_FOR_N11=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0
# One single SMF instance
- SMF_INSTANCE_ID_0=1 - SMF_INSTANCE_ID_0=1
- SMF_FQDN_0=oai-smf - SMF_FQDN_0=oai-smf
- SMF_IPV4_ADDR_0=0.0.0.0 - SMF_IPV4_ADDR_0=192.168.71.133
- SMF_HTTP_VERSION_0=v1
- SELECTED_0=true - SELECTED_0=true
- SMF_INSTANCE_ID_1=2 # mysql definition in AMF is mandatory in mini deployment.
- SMF_FQDN_1=oai-smf
- SMF_IPV4_ADDR_1=0.0.0.0
- SMF_HTTP_VERSION_1=v1
- SELECTED_1=false
- MYSQL_SERVER=192.168.71.131 - MYSQL_SERVER=192.168.71.131
- MYSQL_USER=root - MYSQL_USER=root
- MYSQL_PASS=linux - MYSQL_PASS=linux
- MYSQL_DB=oai_db - MYSQL_DB=oai_db
- OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 # NF registration
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80 - NRF_FQDN=oai-nrf
- NF_REGISTRATION=yes - NF_REGISTRATION=yes
- SMF_SELECTION=yes - SMF_SELECTION=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- NRF_API_VERSION=v1 - USE_HTTP2=no
- NRF_FQDN=oai-nrf
- EXTERNAL_AUSF=no
- AUSF_IPV4_ADDRESS=0.0.0.0
- AUSF_PORT=80
- AUSF_API_VERSION=v1
- AUSF_FQDN=localhost
depends_on: depends_on:
- oai-nrf - oai-nrf
- mysql - mysql
volumes:
- ../5g_rfsimulator/amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
interval: 10s
timeout: 15s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.132 ipv4_address: 192.168.71.132
oai-smf: oai-smf:
container_name: "rfsim5g-oai-smf" container_name: "rfsim5g-oai-smf"
image: oai-smf:august-dev image: oaisoftwarealliance/oai-smf:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- INSTANCE=0
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_N4=eth0
- SMF_INTERFACE_NAME_FOR_SBI=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0
- SMF_INTERFACE_PORT_FOR_SBI=80
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
- SMF_API_VERSION=v1
- DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
- AMF_IPV4_ADDRESS=0.0.0.0 - AMF_IPV4_ADDRESS=192.168.71.132
- AMF_PORT=80
- AMF_API_VERSION=v1
- AMF_FQDN=oai-amf - AMF_FQDN=oai-amf
- UDM_IPV4_ADDRESS=127.0.0.1
- UDM_PORT=80
- UDM_API_VERSION=v1
- UDM_FQDN=localhost
- UPF_IPV4_ADDRESS=192.168.71.134 - UPF_IPV4_ADDRESS=192.168.71.134
- UPF_FQDN_0=oai-spgwu - UPF_FQDN_0=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
- REGISTER_NRF=yes - REGISTER_NRF=yes
- DISCOVER_UPF=yes - DISCOVER_UPF=yes
- USE_FQDN_DNS=yes - USE_FQDN_DNS=yes
- USE_LOCAL_SUBSCRIPTION_INFO=yes
- UE_MTU=1500
# Only one slice is defined (1, 0xFFFFFF)
- DNN_NI0=oai - DNN_NI0=oai
- TYPE0=IPv4 - TYPE0=IPv4
- DNN_RANGE0=12.1.1.2 - 12.1.1.127 - DNN_RANGE0=12.1.1.2 - 12.1.1.127
- NSSAI_SST0=1 - NSSAI_SST0=1
- NSSAI_SD0=0xFFFFFF
- SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_UL0=200Mbps
- SESSION_AMBR_DL0=400Mbps - SESSION_AMBR_DL0=400Mbps
- DNN_NI2=oai.ipv4 - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
- ENABLE_USAGE_REPORTING=no
depends_on: depends_on:
- oai-nrf - oai-nrf
- oai-amf - oai-amf
volumes:
- ../5g_rfsimulator/smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.133 ipv4_address: 192.168.71.133
oai-spgwu: oai-spgwu:
container_name: "rfsim5g-oai-spgwu" container_name: "rfsim5g-oai-spgwu"
image: oai-spgwu-tiny:august-dev image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
environment: environment:
- TZ=Europe/Paris - TZ=Europe/Paris
- PID_DIRECTORY=/var/run
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
- SGW_INTERFACE_NAME_FOR_SX=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0
- PGW_INTERFACE_NAME_FOR_SGI=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0
- NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_NAT_OPTION=yes
- NETWORK_UE_IP=12.1.1.0/24 - NETWORK_UE_IP=12.1.1.0/24
- SPGWC0_IP_ADDRESS=192.168.71.133
- BYPASS_UL_PFCP_RULES=no
- MCC=208
- MNC=99
- MNC03=099
- TAC=1
- GTP_EXTENSION_HEADER_PRESENT=yes
- GW_ID=1
- REALM=openairinterface.org
- ENABLE_5G_FEATURES=yes - ENABLE_5G_FEATURES=yes
- REGISTER_NRF=yes - REGISTER_NRF=yes
- USE_FQDN_NRF=yes - USE_FQDN_NRF=yes
- UPF_FQDN_5G=oai-spgwu - UPF_FQDN_5G=oai-spgwu
- NRF_IPV4_ADDRESS=192.168.71.130 - NRF_IPV4_ADDRESS=192.168.71.130
- NRF_PORT=80
- NRF_API_VERSION=v1
- NRF_FQDN=oai-nrf - NRF_FQDN=oai-nrf
# Only one slice is defined (1, 0xFFFFFF)
- NSSAI_SST_0=1 - NSSAI_SST_0=1
- NSSAI_SD_0=0xffffff - NSSAI_SD_0=0xffffff
- DNN_0=oai - DNN_0=oai
...@@ -204,25 +140,16 @@ services: ...@@ -204,25 +140,16 @@ services:
cap_drop: cap_drop:
- ALL - ALL
privileged: true privileged: true
volumes:
- ../5g_rfsimulator/spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
healthcheck:
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks: networks:
public_net: public_net:
ipv4_address: 192.168.71.134 ipv4_address: 192.168.71.134
traffic_net: traffic_net:
ipv4_address: 192.168.72.134 ipv4_address: 192.168.72.134
oai-ext-dn: oai-ext-dn:
image: ubuntu:bionic
privileged: true privileged: true
container_name: rfsim5g-oai-ext-dn container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
entrypoint: /bin/bash -c \ entrypoint: /bin/bash -c \
"apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
depends_on: depends_on:
...@@ -235,9 +162,8 @@ services: ...@@ -235,9 +162,8 @@ services:
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
oai-gnb: oai-gnb:
image: oai-gnb:develop image: oaisoftwarealliance/oai-gnb:develop
privileged: true privileged: true
container_name: rfsim5g-oai-gnb container_name: rfsim5g-oai-gnb
environment: environment:
...@@ -258,7 +184,7 @@ services: ...@@ -258,7 +184,7 @@ services:
retries: 5 retries: 5
oai-nr-ue: oai-nr-ue:
image: oai-nr-ue:develop image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true privileged: true
container_name: rfsim5g-oai-nr-ue container_name: rfsim5g-oai-nr-ue
environment: environment:
......
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