fix 1138 forcing cryptography version 2.5 or higher 95/9395/3
authortierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 10 Jul 2020 10:52:56 +0000 (10:52 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Tue, 14 Jul 2020 07:31:55 +0000 (07:31 +0000)
Some fixing in devops-stages/stage-build
Use US18.04 for Dockerfile used for devops-stages

Change-Id: Ia2cb09e21efe11a22013de48b2404f5ead949a71
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
Dockerfile
NG-RO/debian/python3-osm-ng-ro.postinst
NG-RO/setup.py
RO/Makefile
RO/debian/python3-osm-ro.postinst
RO/setup.py
devops-stages/stage-build.sh
test-docker/Dockerfile-devops
test-docker/test-gen-devops.sh

index ee707b0..9ed97d6 100644 (file)
 #
 # Use Dockerfile-local for running osm/RO in a docker container from source
 
 #
 # Use Dockerfile-local for running osm/RO in a docker container from source
 
-FROM ubuntu:16.04
+FROM ubuntu:18.04
 RUN  apt-get update && \
 RUN  apt-get update && \
-  DEBIAN_FRONTEND=noninteractive apt-get --yes install git tox make python-all python3 python3-pip debhelper wget && \
-  DEBIAN_FRONTEND=noninteractive apt-get --yes install python3-all libssl-dev apt-utils && \
-  DEBIAN_FRONTEND=noninteractive python3 -m pip install -U setuptools setuptools-version-command stdeb && \
-  DEBIAN_FRONTEND=noninteractive apt-get --yes install libmysqlclient-dev mysql-client
-
-  # needed for tests:  libmysqlclient-dev mysql-client tox  
+    DEBIAN_FRONTEND=noninteractive apt-get --yes install git tox make python3 python3-pip debhelper wget \
+      python3-all apt-utils libmysqlclient-dev mysql-client  && \
+    DEBIAN_FRONTEND=noninteractive python3 -m pip install -U setuptools setuptools-version-command stdeb
+    # needed for tests:  libmysqlclient-dev mysql-client tox
 
 
+    # TODO remove apt # libssl-dev
 # TODO py3 comment
 # Uncomment this block to generate automatically a debian package and show info
 # # Set the working directory to /app
 # TODO py3 comment
 # Uncomment this block to generate automatically a debian package and show info
 # # Set the working directory to /app
@@ -33,4 +32,3 @@ RUN  apt-get update && \
 # # Copy the current directory contents into the container at /app
 # ADD . /app
 # CMD /app/devops-stages/stage-build.sh && find deb_dist -name "*.deb" -exec dpkg -I  {} ";"
 # # Copy the current directory contents into the container at /app
 # ADD . /app
 # CMD /app/devops-stages/stage-build.sh && find deb_dist -name "*.deb" -exec dpkg -I  {} ";"
-
index 09b59d2..87416ac 100755 (executable)
@@ -21,5 +21,4 @@ echo "POST INSTALL OSM-RO-NG"
 echo "Installing python dependencies via pip..."
 
 # python3 -m pip install -U pip
 echo "Installing python dependencies via pip..."
 
 # python3 -m pip install -U pip
-python3 -m pip install cherrypy==18.1.2
-
+python3 -m pip install -U "cherrypy==18.1.2"  "cryptography>=2.5"
index a001836..a6cf47a 100644 (file)
@@ -40,7 +40,7 @@ setup(
         'jsonschema',
         'PyYAML',
         'requests',
         'jsonschema',
         'PyYAML',
         'requests',
-        'cryptography',
+        'cryptography',  # >=2.5  installed right version with the debian post-install script
         'osm-im @ git+https://osm.etsi.org/gerrit/osm/IM.git#egg=osm-im',
         "osm-ro-plugin @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin",
     ],
         'osm-im @ git+https://osm.etsi.org/gerrit/osm/IM.git#egg=osm-im',
         "osm-ro-plugin @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin",
     ],
index b41748d..15dce71 100644 (file)
@@ -28,6 +28,7 @@ package:
 #      apt-get install -y python-stdeb
        python3 setup.py --command-packages=stdeb.command sdist_dsc
        cp debian/python3-osm-ro.postinst deb_dist/osm-ro*/debian/
 #      apt-get install -y python-stdeb
        python3 setup.py --command-packages=stdeb.command sdist_dsc
        cp debian/python3-osm-ro.postinst deb_dist/osm-ro*/debian/
+       # cd deb_dist/osm-nbi*/debian && echo "cryptography python3-cryptography (>= 1.9)" > py3dist-overrides
        cd deb_dist/osm-ro*/ && dpkg-buildpackage -rfakeroot -uc -us
        # mkdir -p .build
        # cp build/deb_dist/python-*.deb .build/
        cd deb_dist/osm-ro*/ && dpkg-buildpackage -rfakeroot -uc -us
        # mkdir -p .build
        # cp build/deb_dist/python-*.deb .build/
index 02f356b..877a496 100755 (executable)
@@ -18,4 +18,5 @@
 ##
 
 echo "POST INSTALL OSM-RO"
 ##
 
 echo "POST INSTALL OSM-RO"
-# nothing to do
+# Ensure a proper version of cryptography, needed by paramiko
+python3 -m pip install "cryptography>=2.5" -U
index 4bd2223..836f6f2 100755 (executable)
@@ -36,7 +36,6 @@ _requirements = [
     "jsonschema",
     "paramiko",
     "mysqlclient",
     "jsonschema",
     "paramiko",
     "mysqlclient",
-    #"MySQLdb",
 
     # common to  VIMS
     "requests",
 
     # common to  VIMS
     "requests",
index d14f8d9..5ac3f7a 100755 (executable)
@@ -17,7 +17,7 @@ rm -rf deb_dist/*
 mkdir -p deb_dist
 
 # main RO module
 mkdir -p deb_dist
 
 # main RO module
-make -C RO clean package BRANCH=master
+make -C RO clean package
 cp RO/deb_dist/python3-osm-ro_*.deb deb_dist/
 
 # RO client
 cp RO/deb_dist/python3-osm-ro_*.deb deb_dist/
 
 # RO client
@@ -28,6 +28,10 @@ cp RO-client/deb_dist/python3-osm-roclient_*.deb deb_dist/
 make -C RO-plugin clean package
 cp RO-plugin/deb_dist/python3-osm-ro-plugin_*.deb deb_dist/
 
 make -C RO-plugin clean package
 cp RO-plugin/deb_dist/python3-osm-ro-plugin_*.deb deb_dist/
 
+# NG-RO
+make -C NG-RO clean package
+cp NG-RO/deb_dist/python3-osm-ng-ro_*.deb deb_dist/
+
 # VIM plugings:  vmware, openstack, AWS, fos, azure, Opennebula,
 for vim_plugin in RO-VIM-*
 do
 # VIM plugings:  vmware, openstack, AWS, fos, azure, Opennebula,
 for vim_plugin in RO-VIM-*
 do
index 855ef81..5f094ab 100644 (file)
@@ -24,7 +24,7 @@ RUN apt-get update && apt-get -y install curl software-properties-common git tox
     && python3 -m pip install --upgrade pip && python3 -m pip install pyangbind networking-l2gw
 
 ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
     && python3 -m pip install --upgrade pip && python3 -m pip install pyangbind networking-l2gw
 
 ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
-ARG RELEASE=ReleaseSIX-daily
+ARG RELEASE=ReleaseEIGHT-daily
 ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
 ARG REPOSITORY=testing
 
 ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
 ARG REPOSITORY=testing
 
index a869031..3b85166 100755 (executable)
@@ -26,7 +26,7 @@ Options:
   --no-cache    Use if found problems looking for packages
   --update      Use to update OSM, RO docker with this image" && exit 0
 
   --no-cache    Use if found problems looking for packages
   --update      Use to update OSM, RO docker with this image" && exit 0
 
-[[ "$*" == *--no-cache* ]] && no_cache="--no_cache" || no_cache=""
+[[ "$*" == *--no-cache* ]] && no_cache="--no-cache" || no_cache=""
 [[ "$*" == *--update* ]] && update_osm="k8s" || update_osm=""
 
 HERE=$(dirname $(readlink -f ${BASH_SOURCE[0]}))
 [[ "$*" == *--update* ]] && update_osm="k8s" || update_osm=""
 
 HERE=$(dirname $(readlink -f ${BASH_SOURCE[0]}))