+++ /dev/null
-# vim: ts=4 sw=4 noet:
-
-# -------------------------------------------------------------------------------
-# Copyright (c) 2018-2019 AT&T Intellectual Property.
-#
-# 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.
-# -------------------------------------------------------------------------------
-
-# CAUTION: This file eventually should exist in the ci directory, however until
-# this can be confirmed, and the .yaml file(s) in the ci project changed
-# to indicaate that ci/Dockerfile should be used, this is here with minor
-# changes needed to exist at the root.
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-# CI to verify the MC application components
-# Inherits C toolchain from buildpack-deps:stretch then adds cmake and better shell(s).
-
-# It is assumed that this docker file is used with a build command run at the
-# root level of the repo (directory containing the ci directory). E.g.
-# docker build -f ci/Dockerfile .
-
-FROM buildpack-deps:stretch
-
-RUN apt-get update && apt-get -q -y install cmake ksh
-
-# stuff our repo things into a scratch area
-RUN mkdir /playpen
-ADD . /playpen
-
-
-# add any unit test scripts that need to be driven, e.g.
-# RUN ksh test/mcl_unit_test.ksh
-
-# This is a final/only script which might print useful things to the log and ALWAYS succeeds.
-RUN ksh /playpen/ci/stats.ksh
-
-# there is no cmd; the build/verification assumes that if the image is created
-# successfully, e.g. none of the previous run commands fail, that the environment
-# is successfully vetted.
--- /dev/null
+ -------------------------------------------------------------------------------
+ Copyright (c) 2018-2019 AT&T Intellectual Property.
+
+ 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.
+ -------------------------------------------------------------------------------
+
+Miscellaneous Notes about the repository, organisation etc.
+
+
+Continuous Integration
+
+The CI process is managed via several Jenkins jobs which are triggered
+at various times during the commit, review and merge process. These
+jobs are managed in the gerrit.o-ran-sc.org ci_management repo. Specifically,
+the information in the jjb/ric-app-mc are of interest to this project.
+At a high level, each image that is created from this repo has a "project"
+description in the .yaml file which defines several key items about how
+and when the job(s) are executed.
+
+Currently the CI process is applied to the mc-core and sidecars/listener
+directorys. A docker image is built for each, and is only built when there
+are changes to the respective subdirectory. Images are built using the
+Dockerfile at the top level of each subdirectory, e.g. mc-core/Dockerfile.
+The image version, or tag, is applied by reading the container-tag.yaml
+file in the same directory as the Dockerfile.
+
+There is a specific "template" for each project which actually defines
+the Jenkins jobs. At the moment these are black box things and maintained
+by the CI group. In order to add another "project," (i.e. generate another
+image), a related set of these templates must be created before the .yaml
+file in the CI repo can be modified.
+
+The basic steps to add a new project:
+ - Create the subdirectory and add a docker and tag file
+ - Contact the CI maintainers to add the templates
+ - Modify the MC .yaml file in the ci-management repo to add the project
+++ /dev/null
-# vim: ts=4 sw=4 noet:
-
-### 2019 November 11th
-### This file is deprecated and can be removed once the ci-managment repo has been
-### changed to use the docker files in the subdiretories
-###
-
-# -------------------------------------------------------------------------------
-# Copyright (c) 2018-2019 AT&T Intellectual Property.
-#
-# 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.
-# -------------------------------------------------------------------------------
-
-# CI to verify the MC application components
-# Inherits C toolchain from buildpack-deps:stretch then adds cmake and better shell(s).
-
-# It is assumed that this docker file is used with a build command run at the
-# root level of the repo (directory containing the ci directory). E.g.
-# docker build -f ci/Dockerfile .
-
-FROM buildpack-deps:stretch
-
-RUN apt-get update && apt-get -q -y install cmake ksh
-
-# stuff our repo things into a scratch area
-RUN mkdir /playpen
-ADD . /playpen
-
-
-# add any unit test scripts that need to be driven, e.g.
-# RUN ksh test/mcl_unit_test.ksh
-
-# This is a final/only script which might print useful things to the log and ALWAYS succeeds.
-RUN ksh /playpen/ci/stats.ksh
-
-# there is no cmd; the build/verification assumes that if the image is created
-# successfully, e.g. none of the previous run commands fail, that the environment
-# is successfully vetted.
+++ /dev/null
- -------------------------------------------------------------------------------
- Copyright (c) 2018-2019 AT&T Intellectual Property.
-
- 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.
- -------------------------------------------------------------------------------
-
-These files are needed to support the continuous integration process
-which verifies code on commit and might build images for the application.
-
-There are multiple containers built from this repo. For each container built
-there is a subdirectory here:
-
- listener -- the mc_listener application which ingests RMR messages to feed
- the core MC xAPP.
-
- mc_core -- The core MC xAPP.
-
-
-The builds are kicked off based on the yaml files in the ci-management project
- ssh://<some-user>@gerrit.o-ran-sc.org:29418/ci-management
-
-Specifically controlled by ric-app-mc.yaml.
-
-
-Image Versioning
-Docker image tags are applied based on the contents of the container-tag.yaml
-file in each of the directories listed above. Specifically the "tag" field as
-illustrated in the following example:
-
- tag: '1.2.1'
-
-
+++ /dev/null
-# vim: ts=4 sw=4 noet:
-#==================================================================================
-# Copyright (c) 2018-2019 AT&T Intellectual Property.
-#
-# 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.
-#==================================================================================
-
-
-# Mnemonic: Dockerfile (listener)
-# Abstract: Build file which creaes a runtime image for the listener.
-# Building should be as simple as:
-#
-# docker build -f ci/listener/Dockerfile -t mc_listener:xx.xx .
-#
-# The build MUST be run from the repo root as it is impossible to
-# reference the needed source from inside of this directory.
-#
-# Running the image in a container:
-# The fifo output directory needs to be mounted to the container
-# e.g. -v /exports/mcl/fifos:/tmp/mcl/fifos. The internal
-# directory can be supplied on the command line using -d path, but
-# should not be needed.
-#
-# The RMR listen port must be properly exposed to the container. The
-# internal default is 4560, and can be changed with the -p port option
-# on the command line (needed if running from docker-compose). Typical
-# exposure might be -p <host-port>:4560 on the docker run command.
-#
-# The MC listener application does NOT need route table updates and thus
-# there is NO need to expose the route table generator port on this
-# container.
-#
-# Date: 22 August 2019
-# Author: E. Scott Daniels
-
-
-FROM ubuntu:18.04 as buildenv
-RUN mkdir /playpen
-
-RUN apt-get update && apt-get install -y cmake gcc make git g++ wget
-
-RUN mkdir /playpen/bin /playpen/src
-ARG SRC=sidecars/listener
-COPY ${SRC}/build_dev_env.sh /playpen/bin/
-COPY ${SRC}/Makefile ${SRC}/*.h ${SRC}/*.c /playpen/src/
-
-ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib
-ENV C_INCLUDE_PATH=/usr/local/include
-RUN bash /playpen/bin/build_dev_env.sh
-RUN cd /playpen/src/; make -B mc_listener sender pipe_reader
-
-# ----- final, smaller image ----------------------------------
-FROM ubuntu:18.04
-
-# obtusely this uses the previous value
-ARG SRC
-
-RUN mkdir -p /playpen/bin
-COPY --from=buildenv /usr/local/lib/* /usr/local/lib/
-COPY --from=buildenv /playpen/src/mc_listener /playpen/src/sender /playpen/src/pipe_reader /playpen/bin/
-COPY ${SRC}/verify.sh /playpen/bin
-
-ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib
-ENV C_INCLUDE_PATH=/usr/local/include
-
-CMD [ "/playpen/bin/mc_listener" ]
+++ /dev/null
----
-tag: '1.2.1'
+++ /dev/null
-# -------------------------------------------------------------------------------
-# Copyright (c) 2018-2019 AT&T Intellectual Property.
-#
-# 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.
-# -------------------------------------------------------------------------------
-
-# Mnemonic: Dockerfile (mc_core)
-# Abstract: Build file which creaes a runtime image for the MC-xAPP core process.
-# Building should be as simple as:
-#
-# docker build -f ci/mc_core/Dockerfile -t mcxapp .
-#
-# The build MUST be run from the repo root as it is impossible to
-# reference the needed source from inside of this directory.
-#
-
-ARG STAGE_DIR=/mc
-ARG SRC=mc-core
-
-FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu16-c-go:2-u16.04-nng AS project-build
-# Update & installation of linux packages
-RUN apt-get update -y && \
- apt-get install -y curl && \
- apt-get install -y procps && \
- apt-get install -y python-pip
-
-ARG STAGE_DIR
-ARG SRC
-
-COPY ${SRC}/mc ${STAGE_DIR}
-WORKDIR ${STAGE_DIR}
-RUN git clone https://github.com/protocolbuffers/protobuf.git
-WORKDIR ${STAGE_DIR}/protobuf
-RUN ./autogen.sh
-RUN ./configure
-RUN make clean
-RUN make
-RUN make install
-RUN ldconfig
-WORKDIR ${STAGE_DIR}
-RUN git clone https://github.com/protobuf-c/protobuf-c.git
-WORKDIR protobuf-c
-RUN ./autogen.sh
-ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
-RUN ./configure
-RUN make
-RUN make install
-RUN ldconfig
-RUN pip install protobuf
-WORKDIR ${STAGE_DIR}
-RUN git clone https://gerrit.o-ran-sc.org/r/com/gs-lite
-WORKDIR ${STAGE_DIR}/gs-lite
-COPY ${SRC}/mc/cfg ${STAGE_DIR}/gs-lite/cfg
-COPY ${SRC}/mc/local_datasource ${STAGE_DIR}/gs-lite/src/lib/gscprts/local_datasource
-COPY ${SRC}/mc/local ${STAGE_DIR}/gs-lite/include/lfta/local
-COPY ${SRC}/mc/queries ${STAGE_DIR}/gs-lite/demo/queries
-RUN ./build_and_install.sh
-WORKDIR ${STAGE_DIR}/gs-lite/demo/queries
-ENV GSLITE_ROOT ${STAGE_DIR}/gs-lite
-RUN bash ${STAGE_DIR}/gs-lite/bin/buildit
-
-
-# now install the binaries and libraries into smaller docker image
-FROM ubuntu:16.04
-
-ARG STAGE_DIR
-
-COPY --from=project-build ${STAGE_DIR}/gs-lite/demo/queries /mc/gs-lite/demo/queries
-COPY --from=project-build ${STAGE_DIR}/gs-lite/bin /mc/gs-lite/bin
-COPY --from=project-build ${STAGE_DIR}/data_gen /mc/data_gen
-COPY --from=project-build ${STAGE_DIR}/mc_deployment.json /mc/
-COPY --from=project-build ${STAGE_DIR}/extract_params.py /mc/
-COPY --from=project-build /usr/local/lib/libproto* /usr/local/lib/
-
-RUN apt-get update && \
- apt-get install -y curl python python-pip && \
- apt-get clean
-
-RUN ldconfig
-RUN pip install protobuf
-
-ENV XAPP_DESCRIPTOR_PATH /mc/mc_deployment.json
-WORKDIR /mc/gs-lite/demo/queries
-ENV GSLITE_ROOT /mc/gs-lite
-CMD ["./runall"]
+++ /dev/null
----
-tag: '1.0.1'
+++ /dev/null
-
-# vim: ts=4 sw=4 noet:
-
-# -------------------------------------------------------------------------------
-# Copyright (c) 2018-2019 AT&T Intellectual Property.
-#
-# 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.
-# -------------------------------------------------------------------------------
-
-# -------------------------------------------------------------------------------
-# Mnemonic: stats.ksh
-# Abstract: This script is run as the last vetting script during the CI
-# process to possibly provide some stats about the verification.
-# The script may be run as the only verification script during
-# initial development. The script MUST always finish successfully
-# Date: 24 August 2019
-# -------------------------------------------------------------------------------
-
-
-echo "$(date) finished verification and/or build"