diff --git a/configure.ac b/configure.ac index 32f608b4..c8108f27 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. # this defines the CORE version number, must be static for AC_INIT -AC_INIT(core, 9.0.1) +AC_INIT(core, 9.0.2) # autoconf and automake initialization AC_CONFIG_SRCDIR([netns/version.h.in]) diff --git a/daemon/pyproject.toml b/daemon/pyproject.toml index 67d50401..48a3590b 100644 --- a/daemon/pyproject.toml +++ b/daemon/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "core" -version = "9.0.1" +version = "9.0.2" description = "CORE Common Open Research Emulator" authors = ["Boeing Research and Technology"] license = "BSD-2-Clause" diff --git a/dockerfiles/Dockerfile.centos-optimal b/dockerfiles/Dockerfile.centos-optimal new file mode 100644 index 00000000..c8e8982b --- /dev/null +++ b/dockerfiles/Dockerfile.centos-optimal @@ -0,0 +1,76 @@ +# syntax=docker/dockerfile:1 +FROM centos:7 +LABEL Description="CORE Docker CentOS Image" + +ARG PREFIX=/usr +ARG BRANCH=master +ENV LANG en_US.UTF-8 +ARG PROTOC_VERSION=3.19.6 +ARG VENV_PATH=/opt/core/venv +ENV PATH="$PATH:${VENV_PATH}/bin" +WORKDIR /opt + +# install system dependencies +RUN yum -y update && \ + yum install -y \ + git \ + sudo \ + wget \ + tzdata \ + unzip \ + libpcap-devel \ + libpcre3-devel \ + libxml2-devel \ + protobuf-devel \ + unzip \ + uuid-devel \ + tcpdump \ + make && \ + yum-builddep -y python3 && \ + yum autoremove -y + +# install python3.9 +RUN wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz && \ + tar xf Python-3.9.15.tgz && \ + cd Python-3.9.15 && \ + ./configure --enable-optimizations --with-ensurepip=install && \ + make -j$(nproc) altinstall && \ + python3.9 -m pip install --upgrade pip && \ + cd /opt && \ + rm -rf Python-3.9.15 + +# install core +RUN git clone https://github.com/coreemu/core && \ + cd core && \ + git checkout ${BRANCH} && \ + PYTHON=/usr/local/bin/python3.9 ./setup.sh && \ + . /root/.bashrc && PYTHON=/usr/local/bin/python3.9 inv install -v -p ${PREFIX} --no-python + +# install emane +RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz && \ + tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz && \ + cd emane-1.3.3-release-1/rpms/el7/x86_64 && \ + yum install -y epel-release && \ + yum install -y ./openstatistic*.rpm ./emane*.rpm ./python3-emane_*.rpm && \ + cd ../../../.. && \ + rm emane-1.3.3-release-1.el7.x86_64.tar.gz && \ + rm -rf emane-1.3.3-release-1 + +# install emane python bindings +RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ + mkdir protoc && \ + unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d protoc && \ + git clone https://github.com/adjacentlink/emane.git && \ + cd emane && \ + git checkout v1.3.3 && \ + ./autogen.sh && \ + PYTHON=${VENV_PATH}/bin/python ./configure --prefix=/usr && \ + cd src/python && \ + PATH=/opt/protoc/bin:$PATH make && \ + ${VENV_PATH}/bin/python -m pip install . && \ + cd /opt && \ + rm -rf protoc && \ + rm -rf emane && \ + rm -f protoc-${PROTOC_VERSION}-linux-x86_64.zip + +WORKDIR /root diff --git a/dockerfiles/Dockerfile.centos-package-optimal b/dockerfiles/Dockerfile.centos-package-optimal new file mode 100644 index 00000000..5c2366ed --- /dev/null +++ b/dockerfiles/Dockerfile.centos-package-optimal @@ -0,0 +1,87 @@ +# syntax=docker/dockerfile:1 +FROM centos:7 +LABEL Description="CORE CentOS Image" + +ENV LANG en_US.UTF-8 +ARG PROTOC_VERSION=3.19.6 +ARG VENV_PATH=/opt/core/venv +ENV PATH="$PATH:${VENV_PATH}/bin" +WORKDIR /opt + +# install basic dependencies +RUN yum -y update && \ + yum install -y \ + git \ + sudo \ + wget \ + tzdata \ + unzip \ + libpcap-devel \ + libpcre3-devel \ + libxml2-devel \ + protobuf-devel \ + unzip \ + uuid-devel \ + tcpdump \ + automake \ + gawk \ + libreadline-devel \ + libtool \ + pkg-config \ + make && \ + yum-builddep -y python3 && \ + yum autoremove -y + +# install python3.9 +RUN wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz && \ + tar xf Python-3.9.15.tgz && \ + cd Python-3.9.15 && \ + ./configure --enable-optimizations --with-ensurepip=install && \ + make -j$(nproc) altinstall && \ + python3.9 -m pip install --upgrade pip && \ + cd /opt && \ + rm -rf Python-3.9.15 + +# install core +COPY core_*.rpm . +RUN PYTHON=/usr/local/bin/python3.9 yum install -y ./core_*.rpm && \ + rm -f core_*.rpm + +# install ospf mdr +RUN git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git && \ + cd ospf-mdr && \ + ./bootstrap.sh && \ + ./configure --disable-doc --enable-user=root --enable-group=root \ + --with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \ + --localstatedir=/var/run/quagga && \ + make -j$(nproc) && \ + make install && \ + cd /opt && \ + rm -rf ospf-mdr + + # install emane +RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz && \ + tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz && \ + cd emane-1.3.3-release-1/rpms/el7/x86_64 && \ + yum install -y epel-release && \ + yum install -y ./openstatistic*.rpm ./emane*.rpm ./python3-emane_*.rpm && \ + cd ../../../.. && \ + rm emane-1.3.3-release-1.el7.x86_64.tar.gz && \ + rm -rf emane-1.3.3-release-1 + +# install emane python bindings +RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ + mkdir protoc && \ + unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d protoc && \ + git clone https://github.com/adjacentlink/emane.git && \ + cd emane && \ + git checkout v1.3.3 && \ + ./autogen.sh && \ + PYTHON=${VENV_PATH}/bin/python ./configure --prefix=/usr && \ + cd src/python && \ + PATH=/opt/protoc/bin:$PATH make && \ + ${VENV_PATH}/bin/python -m pip install . && \ + cd /opt && \ + rm -rf protoc && \ + rm -rf emane && \ + rm -f protoc-${PROTOC_VERSION}-linux-x86_64.zip diff --git a/dockerfiles/Dockerfile.ubuntu-optimal b/dockerfiles/Dockerfile.ubuntu-optimal new file mode 100644 index 00000000..9762fd05 --- /dev/null +++ b/dockerfiles/Dockerfile.ubuntu-optimal @@ -0,0 +1,62 @@ +# syntax=docker/dockerfile:1 +FROM ubuntu:22.04 +LABEL Description="CORE Docker Ubuntu Image" + +ARG PREFIX=/usr/local +ARG BRANCH=master +ARG PROTOC_VERSION=3.19.6 +ARG VENV_PATH=/opt/core/venv +ENV DEBIAN_FRONTEND=noninteractive +ENV PATH="$PATH:${VENV_PATH}/bin" +WORKDIR /opt + +# install system dependencies +RUN apt-get update -y && \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + git \ + sudo \ + wget \ + tzdata \ + libpcap-dev \ + libpcre3-dev \ + libprotobuf-dev \ + libxml2-dev \ + protobuf-compiler \ + unzip \ + uuid-dev \ + iproute2 \ + iputils-ping \ + tcpdump && \ + apt-get autoremove -y + +# install core +RUN git clone https://github.com/coreemu/core && \ + cd core && \ + git checkout ${BRANCH} && \ + ./setup.sh && \ + . /root/.bashrc && \ + inv install -v -p ${PREFIX} && \ + cd /opt && \ + rm -rf ospf-mdr + +# install emane +RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ + mkdir protoc && \ + unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d protoc && \ + git clone https://github.com/adjacentlink/emane.git && \ + cd emane && \ + ./autogen.sh && \ + ./configure --prefix=/usr && \ + make -j$(nproc) && \ + make install && \ + cd src/python && \ + make clean && \ + PATH=/opt/protoc/bin:$PATH make && \ + ${VENV_PATH}/bin/python -m pip install . && \ + cd /opt && \ + rm -rf protoc && \ + rm -rf emane && \ + rm -f protoc-${PROTOC_VERSION}-linux-x86_64.zip + +WORKDIR /root diff --git a/dockerfiles/Dockerfile.ubuntu-package-optimal b/dockerfiles/Dockerfile.ubuntu-package-optimal new file mode 100644 index 00000000..b8f66165 --- /dev/null +++ b/dockerfiles/Dockerfile.ubuntu-package-optimal @@ -0,0 +1,75 @@ +# syntax=docker/dockerfile:1 +FROM ubuntu:22.04 +LABEL Description="CORE Docker Ubuntu Image" + +ENV DEBIAN_FRONTEND=noninteractive +ARG PROTOC_VERSION=3.19.6 +ARG VENV_PATH=/opt/core/venv +ENV PATH="$PATH:${VENV_PATH}/bin" +WORKDIR /opt + +# install basic dependencies +RUN apt-get update -y && \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + python3 \ + python3-tk \ + python3-pip \ + python3-venv \ + libpcap-dev \ + libpcre3-dev \ + libprotobuf-dev \ + libxml2-dev \ + protobuf-compiler \ + unzip \ + uuid-dev \ + automake \ + gawk \ + git \ + wget \ + libreadline-dev \ + libtool \ + pkg-config \ + g++ \ + make \ + iputils-ping \ + tcpdump && \ + apt-get autoremove -y + +# install core +COPY core_*.deb . +RUN apt-get install -y ./core_*.deb && \ + rm -f core_*.deb + +# install ospf mdr +RUN git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git && \ + cd ospf-mdr && \ + ./bootstrap.sh && \ + ./configure --disable-doc --enable-user=root --enable-group=root \ + --with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \ + --localstatedir=/var/run/quagga && \ + make -j$(nproc) && \ + make install && \ + cd /opt && \ + rm -rf ospf-mdr + +# install emane +RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ + mkdir protoc && \ + unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d protoc && \ + git clone https://github.com/adjacentlink/emane.git && \ + cd emane && \ + ./autogen.sh && \ + ./configure --prefix=/usr && \ + make -j$(nproc) && \ + make install && \ + cd src/python && \ + make clean && \ + PATH=/opt/protoc/bin:$PATH make && \ + ${VENV_PATH}/bin/python -m pip install . && \ + cd /opt && \ + rm -rf protoc && \ + rm -rf emane && \ + rm -f protoc-${PROTOC_VERSION}-linux-x86_64.zip + +WORKDIR /root