Initial commit to populate repo
Change-Id: Ic74d9808c0de92c46b14d3c15cca87b32148d760
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..2d64e14
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,9 @@
+# SPDX-FileCopyrightText: 2020 Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+[gerrit]
+host=gerrit.opencord.org
+port=29418
+project=aether-helm-charts.git
+defaultremote=origin
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f2ad546
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,209 @@
+SHELL := /bin/bash
+BUILD ?= /tmp/build
+M ?= $(BUILD)/milestones
+MAKEDIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+SCRIPTDIR := $(MAKEDIR)../scripts
+RESOURCEDIR := $(MAKEDIR)/resources
+WORKSPACE ?= $(HOME)
+VENV ?= $(BUILD)/venv/ciab
+CIABVALUES ?= $(MAKEDIR)/comac-in-a-box-values.yaml
+
+KUBESPRAY_VERSION ?= release-2.11
+DOCKER_VERSION ?= 18.09
+K8S_VERSION ?= v1.15.3
+HELM_VERSION ?= v2.16.1
+
+# used to start logging/monitoring and other infrastructure charts
+INFRA_CHARTS ?=
+INFRA_PREREQS = $(foreach chart,$(INFRA_CHARTS),$(M)/$(chart))
+
+KAFKA_CHART_VERSION ?= 0.13.3
+KAFKA_POD := "pod/cord-kafka-0"
+
+HELM_GLOBAL_ARGS ?=
+HELM_NEM_ARGS ?= $(HELM_GLOBAL_ARGS)
+HELM_ONOS_ARGS ?= $(HELM_GLOBAL_ARGS)
+
+cpu_family := $(shell lscpu | grep 'CPU family:' | awk '{print $$3}')
+cpu_model := $(shell lscpu | grep 'Model:' | awk '{print $$2}')
+os_vendor := $(shell lsb_release -i -s)
+os_release := $(shell lsb_release -r -s)
+
+ciab: $(M)/system-check $(M)/omec
+oaisim: $(M)/oaisim
+
+.PHONY: ciab oaisim test reset-test clean
+
+$(M):
+ mkdir -p $(M)
+
+$(M)/system-check: | $(M)
+ @if [[ $(cpu_family) -eq 6 ]]; then \
+ if [[ $(cpu_model) -lt 60 ]]; then \
+ echo "FATAL: haswell CPU or newer is required."; \
+ exit 1; \
+ fi \
+ else \
+ echo "FATAL: unsupported CPU family."; \
+ exit 1; \
+ fi
+ @if [[ $(os_vendor) =~ (Ubuntu) ]]; then \
+ if [[ ! $(os_release) =~ (16.04) ]]; then \
+ echo "WARN: $(os_vendor) $(os_release) has not been tested."; \
+ fi; \
+ if dpkg --compare-versions 4.15 gt $(shell uname -r); then \
+ echo "FATAL: kernel 4.15 or later is required."; \
+ echo "Please upgrade your kernel by running" \
+ "apt install --install-recommends linux-generic-hwe-$(os_release)"; \
+ exit 1; \
+ fi \
+ else \
+ echo "FAIL: unsupported OS."; \
+ exit 1; \
+ fi
+ touch $@
+
+$(M)/setup: | $(M)
+ sudo $(SCRIPTDIR)/cloudlab-disksetup.sh
+ sudo apt update; sudo apt install -y software-properties-common python-pip jq httpie ipvsadm
+ touch $@
+
+$(BUILD)/kubespray: | $(M)/setup
+ mkdir -p $(BUILD)
+ cd $(BUILD); git clone https://github.com/kubernetes-incubator/kubespray.git -b $(KUBESPRAY_VERSION)
+
+$(VENV)/bin/activate: | $(M)/setup
+ sudo pip install virtualenv
+ virtualenv $(VENV)
+
+$(M)/kubespray-requirements: $(BUILD)/kubespray | $(VENV)/bin/activate
+ source "$(VENV)/bin/activate" && \
+ pip install -r $(BUILD)/kubespray/requirements.txt
+ touch $@
+
+$(M)/k8s-ready: | $(M)/setup $(BUILD)/kubespray $(VENV)/bin/activate $(M)/kubespray-requirements
+ source "$(VENV)/bin/activate" && cd $(BUILD)/kubespray; \
+ ansible-playbook -b -i inventory/local/hosts.ini \
+ -e "{'override_system_hostname' : False, 'disable_swap' : True}" \
+ -e "{'docker_version' : $(DOCKER_VERSION)}" \
+ -e "{'docker_iptables_enabled' : True}" \
+ -e "{'kube_version' : $(K8S_VERSION)}" \
+ -e "{'kube_network_plugin_multus' : True, 'multus_version' : v3.2}" \
+ -e "{'kube_proxy_metrics_bind_address' : 0.0.0.0:10249}" \
+ -e "{'kube_pods_subnet' : 192.168.0.0/17, 'kube_service_addresses' : 192.168.128.0/17}" \
+ -e "{'kube_apiserver_node_port_range' : 2000-36767}" \
+ -e "{'kubeadm_enabled': True}" \
+ -e "{'kube_feature_gates' : [SCTPSupport=True]}" \
+ -e "{'kubelet_custom_flags' : [--allowed-unsafe-sysctls=net.*]}" \
+ -e "{'dns_min_replicas' : 1}" \
+ -e "{'helm_enabled' : True, 'helm_version' : $(HELM_VERSION)}" \
+ cluster.yml
+ mkdir -p $(HOME)/.kube
+ sudo cp -f /etc/kubernetes/admin.conf $(HOME)/.kube/config
+ sudo chown $(shell id -u):$(shell id -g) $(HOME)/.kube/config
+ kubectl wait pod -n kube-system --for=condition=Ready --all
+ touch $@
+
+$(M)/helm-ready: | $(M)/k8s-ready
+ helm init --wait --client-only
+ helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
+ helm repo add cord https://charts.opencord.org
+ touch $@
+
+/opt/cni/bin/simpleovs: | $(M)/k8s-ready
+ sudo cp $(RESOURCEDIR)/simpleovs /opt/cni/bin/
+
+/opt/cni/bin/static: | $(M)/k8s-ready
+ mkdir -p $(BUILD)/cni-plugins; cd $(BUILD)/cni-plugins; \
+ wget https://github.com/containernetworking/plugins/releases/download/v0.8.2/cni-plugins-linux-amd64-v0.8.2.tgz && \
+ tar xvfz cni-plugins-linux-amd64-v0.8.2.tgz
+ sudo cp $(BUILD)/cni-plugins/static /opt/cni/bin/
+
+# TODO: need to connect ONOS
+$(M)/fabric: | $(M)/setup /opt/cni/bin/simpleovs /opt/cni/bin/static
+ sudo apt install -y openvswitch-switch
+ sudo ovs-vsctl --may-exist add-br br-enb-net
+ sudo ovs-vsctl --may-exist add-port br-enb-net enb -- set Interface enb type=internal
+ sudo ip addr add 192.168.251.4/24 dev enb || true
+ sudo ip link set enb up
+ sudo ethtool --offload enb tx off
+ sudo ip route replace 192.168.252.0/24 via 192.168.251.1 dev enb
+ kubectl apply -f $(RESOURCEDIR)/router.yaml
+ kubectl wait pod -n default --for=condition=Ready -l app=router --timeout=300s
+ kubectl -n default exec router ip route add 10.250.0.0/16 via 192.168.250.3
+ kubectl delete net-attach-def sgi-net
+ touch $@
+
+$(M)/omec: | $(M)/helm-ready /opt/cni/bin/simpleovs /opt/cni/bin/static $(M)/fabric
+ helm repo update
+ helm upgrade --install $(HELM_GLOBAL_ARGS) \
+ --namespace omec \
+ --values $(CIABVALUES) \
+ omec-control-plane \
+ cord/omec-control-plane && \
+ kubectl rollout status -n omec statefulset spgwc && \
+ helm upgrade --install $(HELM_GLOBAL_ARGS) \
+ --namespace omec \
+ --values $(CIABVALUES) \
+ omec-user-plane \
+ cord/omec-user-plane && \
+ kubectl rollout status -n omec statefulset spgwu
+ touch $@
+
+# UE images includes kernel module, ue_ip.ko
+# which should be built in the exactly same kernel version of the host machine
+$(BUILD)/openairinterface: | $(M)/setup
+ mkdir -p $(BUILD)
+ cd $(BUILD); git clone https://github.com/opencord/openairinterface.git
+
+$(M)/ue-image: | $(M)/k8s-ready $(BUILD)/openairinterface
+ cd $(BUILD)/openairinterface; \
+ sudo docker build . --target lte-uesoftmodem \
+ --build-arg build_base=omecproject/oai-base:1.0.0 \
+ --file Dockerfile.ue \
+ --tag omecproject/lte-uesoftmodem:1.0.0
+ touch $@
+
+$(M)/oaisim: | $(M)/ue-image $(M)/omec
+ sudo ip addr add 127.0.0.2/8 dev lo || true
+ $(eval mme_iface=$(shell ip -4 route list default | awk -F 'dev' '{ print $$2; exit }' | awk '{ print $$1 }'))
+ helm upgrade --install $(HELM_GLOBAL_ARGS) --namespace omec oaisim cord/oaisim -f $(CIABVALUES) \
+ --set config.enb.networks.s1_mme.interface=$(mme_iface)
+ kubectl rollout status -n omec statefulset ue
+ @timeout 60s bash -c \
+ "until ip addr show oip1 | grep -q inet; \
+ do \
+ echo 'Waiting for UE 1 gets IP address'; \
+ sleep 3; \
+ done"
+ touch $@
+
+test: | $(M)/fabric $(M)/omec $(M)/oaisim
+ @sleep 5
+ @echo "Test1: ping from UE to SGI network gateway"
+ ping -I oip1 192.168.250.1 -c 3
+ @echo "Test2: ping from UE to 8.8.8.8"
+ ping -I oip1 8.8.8.8 -c 3
+ ping -I oip1 google.com -c 3
+ @echo "Finished to test"
+
+reset-test:
+ helm delete --purge oaisim || true
+ helm delete --purge omec-control-plane || true
+ helm delete --purge omec-user-plane || true
+ cd $(M); rm -f oaisim omec
+
+clean: reset-test
+ helm delete --purge $(shell helm ls -q) || true
+ kubectl delete po router || true
+ kubectl delete net-attach-def sgi-net || true
+ sudo ovs-vsctl del-br br-s1u-net || true
+ sudo ovs-vsctl del-br br-sgi-net || true
+ sudo apt remove --purge openvswitch-switch -y
+ source "$(VENV)/bin/activate" && cd $(BUILD)/kubespray; \
+ ansible-playbook -b -i inventory/local/hosts.ini reset.yml
+ @if [ -d /usr/local/etc/emulab ]; then \
+ mount | grep /mnt/extra/kubelet/pods | cut -d" " -f3 | sudo xargs umount; \
+ sudo rm -rf /mnt/extra/kubelet; \
+ fi
+ rm -rf $(M)
diff --git a/comac-in-a-box-values.yaml b/comac-in-a-box-values.yaml
new file mode 100644
index 0000000..3ed828a
--- /dev/null
+++ b/comac-in-a-box-values.yaml
@@ -0,0 +1,83 @@
+# Copyright 2019-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+images:
+ tags:
+ init: docker.io/omecproject/pod-init:1.0.0
+ depCheck: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
+ hssdb: docker.io/omecproject/c3po-hssdb:master-2c49778
+ hss: docker.io/omecproject/c3po-hss:master-2c49778
+ mme: docker.io/omecproject/openmme:master-ab37a71
+ mmeExporter: docker.io/omecproject/mme-exporter:paging-latest
+ spgwc: docker.io/omecproject/ngic-cp:central-cp-multi-upfs-e8257e7
+ bess: docker.io/omecproject/upf-epc-bess:master-554b670
+ cpiface: docker.io/omecproject/upf-epc-cpiface:master-554b670
+ pullPolicy: IfNotPresent
+
+# cassandra values
+cassandra:
+ config:
+ cluster_size: 1
+ seed_size: 1
+
+resources:
+ enabled: false
+
+config:
+ spgwu:
+ mode: "af_packet"
+ name: "oaisim"
+ sriov:
+ enabled: false
+ hugepage:
+ enabled: false
+ cniPlugin: simpleovs
+ ipam: static
+ mme:
+ cfgFiles:
+ config.json:
+ mme:
+ mcc:
+ dig1: 2
+ dig2: 0
+ dig3: 8
+ mnc:
+ dig1: 0
+ dig2: 1
+ dig3: -1
+ hss:
+ bootstrap:
+ key: "465b5ce8b199b49faa5f0a2ee238a6bc"
+ opc: "d4416644f6154936193433dd20a0ace0"
+ users:
+ - imsiStart: "208014567891201"
+ msisdnStart: "1122334455"
+ count: 10
+ # oaisim values
+ enb:
+ mme:
+ address: 127.0.0.1
+ networks:
+ s1u:
+ interface: enb
+ plmn:
+ mcc: "208"
+ mnc: "01"
+ mnc_length: 2
+ ue:
+ sim:
+ msin: "4567891201"
+ api_key: "465b5ce8b199b49faa5f0a2ee238a6bc"
+ opc: "d4416644f6154936193433dd20a0ace0"
+ msisdn: "1122334456"
diff --git a/resources/router.yaml b/resources/router.yaml
new file mode 100644
index 0000000..1c01919
--- /dev/null
+++ b/resources/router.yaml
@@ -0,0 +1,80 @@
+# Copyright 2019-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+---
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+ name: sgi-net
+spec:
+ config: '{
+ "type": "simpleovs",
+ "ipam": {
+ "type": "static"
+ }
+ }'
+---
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+ name: s1u-net
+spec:
+ config: '{
+ "type": "simpleovs",
+ "ipam": {
+ "type": "static"
+ }
+ }'
+---
+apiVersion: "k8s.cni.cncf.io/v1"
+kind: NetworkAttachmentDefinition
+metadata:
+ name: enb-net
+spec:
+ config: '{
+ "type": "simpleovs",
+ "ipam": {
+ "type": "static"
+ }
+ }'
+---
+apiVersion: v1
+kind: Pod
+metadata:
+ name: router
+ labels:
+ app: router
+ annotations:
+ k8s.v1.cni.cncf.io/networks: '[
+ { "name": "sgi-net", "interface": "sgi-rtr", "ips": "192.168.250.1/24" },
+ { "name": "enb-net", "interface": "enb-rtr", "ips": "192.168.251.1/24" },
+ { "name": "s1u-net", "interface": "s1u-rtr", "ips": "192.168.252.1/24" }
+ ]'
+spec:
+ containers:
+ - name: quagga
+ command: ["/bin/bash", "-c"]
+ args:
+ - >
+ sysctl -w net.ipv4.ip_forward=1;
+ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;
+ trap : TERM INT; sleep infinity & wait
+ image: opencord/quagga
+ securityContext:
+ privileged: true
+ capabilities:
+ add:
+ - NET_ADMIN
+ ports:
+ - containerPort: 2601
diff --git a/resources/simpleovs b/resources/simpleovs
new file mode 100755
index 0000000..f43b8a1
--- /dev/null
+++ b/resources/simpleovs
@@ -0,0 +1,77 @@
+#!/bin/bash -x
+#
+# Copyright 2019-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -o errexit
+set -o pipefail
+set -o nounset
+
+exec 3>&1
+exec &>>/var/log/simple-ovs-cni.log
+
+PATH="$CNI_PATH:$(dirname "${BASH_SOURCE[0]}"):$PATH"
+CNI_CONF=$(cat /dev/stdin)
+
+get_bridge() {
+ echo "br-$(echo $CNI_CONF | jq -r '.name')"
+}
+
+ipam() {
+ local plugin=$(echo $CNI_CONF | jq -r '.ipam.type')
+ local res=$(echo $"$CNI_CONF" | "$plugin" | jq -c '.')
+ echo $res
+}
+
+add_br_and_port() {
+ mkdir -p /var/run/netns/
+ ln -sfT $CNI_NETNS /var/run/netns/$CNI_CONTAINERID
+
+ local bridge=$(get_bridge)
+ local ip=$1
+
+ ovs-vsctl --may-exist add-br $bridge
+ ovs-vsctl add-port $bridge $CNI_IFNAME -- set Interface $CNI_IFNAME type=internal
+
+ ip link set $CNI_IFNAME netns $CNI_CONTAINERID
+ ip netns exec $CNI_CONTAINERID ip addr add $ip dev $CNI_IFNAME
+ ip netns exec $CNI_CONTAINERID ip link set $CNI_IFNAME up
+}
+
+delete_br_and_port() {
+ local bridge="br-$(echo $CNI_CONF | jq -r '.name')"
+ ovs-vsctl del-port $CNI_IFNAME
+ if [ -z "$(ovs-vsctl list-ports $bridge)" ]; then
+ ovs-vsctl del-br $bridge
+ fi
+}
+
+case $CNI_COMMAND in
+ADD)
+ res=$(ipam)
+ ip=$(echo $res | jq -r '.ip4.ip')
+ add_br_and_port $ip
+ echo '{"cniVersion":"0.2.0"}' | jq -c --arg ip $ip '.ip4.ip = $ip' >&3
+ ;;
+DEL)
+ set +o errexit
+ ipam
+ delete_br_and_port
+ set -o errexit
+ ;;
+*)
+ echo "CNI_COMMAND=[ADD|DEL] only supported"
+ exit 1
+ ;;
+esac
diff --git a/scripts/cloudlab-disksetup.sh b/scripts/cloudlab-disksetup.sh
new file mode 100755
index 0000000..518b3f6
--- /dev/null
+++ b/scripts/cloudlab-disksetup.sh
@@ -0,0 +1,80 @@
+#!/usr/bin/env bash
+
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+###############################################
+# Disk setup and symlinks for a CloudLab node #
+###############################################
+
+# Don't do anything if not a CloudLab node
+[ ! -d /usr/local/etc/emulab ] && exit 0
+
+# The watchdog will sometimes reset groups, turn it off
+if [ -e /usr/local/etc/emulab/watchdog ]
+then
+ sudo /usr/bin/perl -w /usr/local/etc/emulab/watchdog stop
+ sudo mv /usr/local/etc/emulab/watchdog /usr/local/etc/emulab/watchdog-disabled
+fi
+
+# Mount extra space, if haven't already
+if [ ! -d /mnt/extra ]
+then
+ sudo mkdir -p /mnt/extra
+
+ # for NVME SSD on Utah m510, not supported by mkextrafs
+ if df | grep -q nvme0n1p1 && [ -e /usr/testbed/bin/mkextrafs ]
+ then
+ # set partition type of 4th partition to Linux, ignore errors
+ echo -e "t\\n4\\n82\\np\\nw\\nq" | sudo fdisk /dev/nvme0n1 || true
+
+ sudo mkfs.ext4 /dev/nvme0n1p4
+ echo "/dev/nvme0n1p4 /mnt/extra/ ext4 defaults 0 0" | sudo tee -a /etc/fstab
+ sudo mount /mnt/extra
+ mount | grep nvme0n1p4 || (echo "ERROR: NVME mkfs/mount failed, exiting!" && exit 1)
+
+ elif [ -e /usr/testbed/bin/mkextrafs ] && [ -b /dev/sdb ] # if on Clemson/Wisconsin Cloudlab
+ then
+ # Sometimes this command fails on the first try
+ sudo /usr/testbed/bin/mkextrafs -s 1 -r /dev/sdb -qf "/mnt/extra/" || sudo /usr/testbed/bin/mkextrafs -s 1 -r /dev/sdb -qf "/mnt/extra/"
+
+ # Check that the mount succeeded (sometimes mkextrafs succeeds but device not mounted)
+ mount | grep sdb || (echo "ERROR: mkextrafs failed, exiting!" && exit 1)
+
+ elif [ -e /usr/testbed/bin/mkextrafs ] && [ -b /dev/sda4 ] # if on Utah xl170
+ then
+ # set partition type of 4th partition to Linux, ignore errors
+ printf "t\\n4\\n83\\np\\nw\\nq" | sudo fdisk /dev/sda || true
+
+ sudo mkfs.ext4 /dev/sda4
+ echo "/dev/sda4 /mnt/extra/ ext4 defaults 0 0" | sudo tee -a /etc/fstab
+ sudo mount /mnt/extra
+ mount | grep sda4 || (echo "ERROR: mkfs/mount failed, exiting!" && exit 1)
+ fi
+fi
+
+# prepare for creating the libvirt/images symlink
+sudo mkdir -p /var/lib/libvirt
+sudo rm -rf /var/lib/libvirt/images
+
+# create symlinks to /mnt/extra partition
+for DIR in docker kubelet openstack-helm nova libvirt/images
+do
+ sudo mkdir -p "/mnt/extra/$DIR"
+ sudo chmod -R a+rwx "/mnt/extra/$DIR"
+ if [ ! -e "/var/lib/$DIR" ]
+ then
+ sudo ln -s "/mnt/extra/$DIR" "/var/lib/$DIR"
+ fi
+done
diff --git a/scripts/portcheck.sh b/scripts/portcheck.sh
new file mode 100755
index 0000000..2d57f4e
--- /dev/null
+++ b/scripts/portcheck.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#Below are the list of ports which are required to be free, for the SEBA services to use. If any new services get added into SEBA, Update the required node ports below and also add it to the arrray portlist.
+
+#Service name : node Port number
+#onos-debugger: 30555
+#onos-openflow: 31653
+#onos-ssh: 30115
+#onos-ui: 30120
+#xos-chameleon: 30006
+#xos-core: 30010, 30011
+#xos-core-prometheus: 30009
+#xos-gui: 30001
+#xos-tosca: 30007
+#xos-ws: 30008
+#ingress-nginx: 30080, 30443
+#vcli: 30110
+#voltha: 30125, 30613, 32443, 31390
+#kpi-exporter: 31080
+#logging-elasticsearch-client: 31636
+#logging-kibana: 30601
+#nem-monitoring-grafana: 31300
+#nem-monitoring-prometheus-server: 31301
+
+declare -a portlist=("30555" "31653" "30115" "30120" "30006" "30010" "30011" "30009" "30001" "30007" "30008" "30080" "30443" "30110" "30125" "30613" "32443" "31390" "31080" "31636" "30601" "31300" "31301")
+
+number_of_ports_in_use=0
+
+#Below loop is to check whether any port in the list is already being used
+for port in "${portlist[@]}"
+do
+ if netstat -lntp | grep :":$port" > /dev/null ; then
+ used_process=$(netstat -lntp | grep :":$port" | tr -s ' ' | cut -f7 -d' ')
+ echo "ERROR: Process with PID/Program_name $used_process is already listening on port: $port needed by SEBA"
+ number_of_ports_in_use=$((number_of_ports_in_use+1))
+ fi
+done
+
+#If any of the ports are already used then the user will be notified to kill the running services before installing SEBA
+if [ $number_of_ports_in_use -gt 0 ]
+ then
+ echo "Kill the running services mentioned above before proceeding to install SEBA"
+ echo "Terminating make"
+ exit 1
+fi
+
+#The ports that are required by SEBA components will be added to the reserved port list
+var=$(printf '%s,' "${portlist[@]}")
+echo "$var" > /proc/sys/net/ipv4/ip_local_reserved_ports
+echo "SUCCESS: Added ports required for SEBA services to ip_local_reserved_ports"
+
diff --git a/scripts/shcheck.sh b/scripts/shcheck.sh
new file mode 100755
index 0000000..2abe89c
--- /dev/null
+++ b/scripts/shcheck.sh
@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# shcheck.sh - check shell scripts with shellcheck
+
+set +e -u -o pipefail
+fail_shellcheck=0
+
+# verify that we have shellcheck-lint installed
+command -v shellcheck >/dev/null 2>&1 || { echo "shellcheck not found, please install it" >&2; exit 1; }
+
+# when not running under Jenkins, use current dir as workspace
+WORKSPACE=${WORKSPACE:-.}
+
+echo "=> Linting shell script with $(shellcheck --version)"
+
+while IFS= read -r -d '' sf
+do
+ echo "==> CHECKING: ${sf}"
+ shellcheck "${sf}"
+ rc=$?
+ if [[ $rc != 0 ]]; then
+ echo "==> LINTING FAIL: ${sf}"
+ fail_shellcheck=1
+ fi
+done < <(find "${WORKSPACE}" \( -name "*.sh" -o -name "*.bash" \) -print0)
+
+exit ${fail_shellcheck}
+