Container Images – Best Practices & Tools ARM, Amdocs, Huawei,Orange, Red Hat Adolfo Perez-Duran ARM 2018-06-21
This project will deliver re-usable artifacts & tooling to help ONAP projects simplify the development of vendor-agnostic container images using build templates that implement industry best practices.
CONTAINER IMAGE A vehicle to pack, ship, store, and deliver applications. Immutable, self-contained piece of software. Can be built by commands contained in a file.
149 Dockerfiles
Opportunities to simplify image builds and save time. Variability. Low re-usability. Opportunities to simplify image builds and save time.
908 MB FROM python:2.7 COPY . /app WORKDIR /app RUN pip install –r requirements.txt ENTRYPOINT ["python"] CMD ["app.py"]
399 MB FROM ubuntu:latest RUN apt-get update -y && \ apt-get install -y --no-install-recommends \ python-pip python-dev build-essential COPY . /app WORKDIR /app RUN pip install --upgrade setuptools && \ pip install -r requirements.txt ENTRYPOINT ["python"] CMD ["app.py"] 399 MB
85 MB FROM python:2.7-alpine COPY . /app WORKDIR /app RUN pip install –r requirements.txt ENTRYPOINT ["python"] CMD ["app.py"]
LARGE IMAGES WASTE TIME AND RESOURCES Take longer to build and debug. Take longer to pull. Consume more disk space bandwidth and memory.
BASE IMAGES IMPACT DEPLOYABILITY* Operators should choose their infrastructure/cloud provider. Container image specification supports multi-cpu architecture layers. ONAP images do not support multi-cpu architecture (yet).
Architecture Principles ONAP IS VENDOR-AGNOSTIC Charter 1.b. ONAP will include product / service / resource agnostic platform modules for lifecycle management Architecture Principles All components should be software-based with no dependency on hardware platform. ..the cloud platform implementation should be pluggable and transparent to the ONAP components. The ability for ONAP to be used by various users worldwide dictates the need to avoid dependency on any single supplier(s).
BEST PRACTICES
OCI Container Testing Verification arm Intel
OCI Container Testing Verification Dockerfile.dev arm Dockerfile.arm Intel Dockerfile.intel
Local Build Or CI Pipeline OCI Container Testing Verification Dockerfile.dev Template arm Dockerfile.arm Intel Dockerfile.intel Variables
Best Practices Local Build Or CI Pipeline OCI Container Testing Verification Dockerfile.dev* Template arm Dockerfile.arm* Intel Dockerfile.intel* Variables