From d6723d8c62f59d8c04ff7e9b7ac5ccee71c3a2bb Mon Sep 17 00:00:00 2001 From: "Lott, Christopher (cl778h)" Date: Mon, 23 Sep 2019 11:43:08 -0400 Subject: [PATCH] Add script to install prereqs on Centos Installs required packages, builds NNG, downloads RMR 1.4.0. Signed-off-by: Lott, Christopher (cl778h) Change-Id: I94796d11bea2f17a92c8c3fa5b409714c484adfc --- jjb/shell/install-deb-nng-rmr.sh | 7 +++++-- jjb/shell/install-rpm-nng-rmr.sh | 43 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 jjb/shell/install-rpm-nng-rmr.sh diff --git a/jjb/shell/install-deb-nng-rmr.sh b/jjb/shell/install-deb-nng-rmr.sh index 7dbf3820..17b237c2 100644 --- a/jjb/shell/install-deb-nng-rmr.sh +++ b/jjb/shell/install-deb-nng-rmr.sh @@ -20,6 +20,8 @@ echo "---> install-deb-nng-rmr.sh" +set -eu + echo "Install packages" sudo apt-get update sudo apt-get install -y \ @@ -35,7 +37,8 @@ git clone --branch v1.1.1 https://github.com/nanomsg/nng.git && ninja \ && sudo ninja install) -ver="1.3.0" +ver="1.4.0" +echo "Download RMR library ${ver}" +wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr_${ver}_amd64.deb/download.deb echo "Install RMR library ${ver}" -wget --content-disposition https://packagecloud.io/o-ran-sc/master/packages/debian/stretch/rmr_${ver}_amd64.deb/download.deb sudo dpkg -i rmr_${ver}_amd64.deb diff --git a/jjb/shell/install-rpm-nng-rmr.sh b/jjb/shell/install-rpm-nng-rmr.sh new file mode 100644 index 00000000..146df4d7 --- /dev/null +++ b/jjb/shell/install-rpm-nng-rmr.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# O-RAN-SC +# +# Copyright (C) 2019 AT&T Intellectual Property and Nokia +# +# 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. + +# Installs NNG from source and RMR from PackageCloud on CentOS + +echo "---> install-rpm-nng-rmr.sh" + +set -eu + +echo "Install packages" +sudo yum install -y \ + cmake3 \ + ninja-build + +echo "Clone and build NNG" +git clone --branch v1.1.1 https://github.com/nanomsg/nng.git +(cd nng \ + && mkdir build \ + && cd build \ + && cmake3 -DBUILD_SHARED_LIBS=1 -G Ninja .. \ + && ninja-build \ + && sudo ninja-build install) + +ver="1.4.0-1" +echo "Download RMR library ${ver}" +wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/el/5/rmr-${ver}.x86_64.rpm/download.rpm +echo "Install RMR library ${ver}" +sudo rpm -vi rmr-${ver}.x86_64.rpm -- 2.16.6