Adding rockcraft.yaml for RO 93/13793/5
authorgatici <gulsum.atici@canonical.com>
Mon, 31 Jul 2023 13:02:17 +0000 (16:02 +0300)
committeraticig <gulsum.atici@canonical.com>
Wed, 9 Aug 2023 13:38:59 +0000 (15:38 +0200)
Runs with Python 3.10 using Ubuntu22.04 base image

Change-Id: Ibabd0d1630078af9ff6a0af81d37ced2a0c2793b
Signed-off-by: gatici <gulsum.atici@canonical.com>
releasenotes/notes/adding_rockcraft.yaml-7e1b90cb7ff078e4.yaml [new file with mode: 0644]
rockcraft.yaml [new file with mode: 0644]

diff --git a/releasenotes/notes/adding_rockcraft.yaml-7e1b90cb7ff078e4.yaml b/releasenotes/notes/adding_rockcraft.yaml-7e1b90cb7ff078e4.yaml
new file mode 100644 (file)
index 0000000..a4ce9df
--- /dev/null
@@ -0,0 +1,22 @@
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# 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.
+#######################################################################################
+---
+other:
+  - |
+    Adding rockcraft.yaml for RO.    
+    Runs with Python 3.10 using Ubuntu22.04 base image.
+
diff --git a/rockcraft.yaml b/rockcraft.yaml
new file mode 100644 (file)
index 0000000..424b9ee
--- /dev/null
@@ -0,0 +1,91 @@
+# 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.
+########################################################################################
+name: resource-orchestrator
+summary: An image for OSM RO
+description: |
+  OSM Resource Orchestrator image.
+version: master_beta_1 # version format: <upstream-version>_<base-version>_<version>
+license: Apache-2.0
+base: ubuntu:22.04
+platforms:
+  amd64:
+
+parts:
+  non-root-user:
+    plugin: nil
+    overlay-script: |
+      chroot ${CRAFT_OVERLAY}
+      mkdir -p /app/osm_ro
+      mkdir -p /app/storage/kafka
+      mkdir -p /app/log
+      groupadd -g 1001 appuser
+      useradd -u 1001 -g 1001 -d /app appuser
+      chown -R appuser:appuser /app
+
+  common:
+    source: https://osm.etsi.org/gerrit/osm/common.git
+    source-branch: master
+    plugin: python
+    python-requirements:
+      - requirements.txt
+    stage-packages:
+      - python3.10-venv
+    build-environment:
+      - PYTHONDONTWRITEBYTECODE: "1" # This does not work as expected, there is a bug and still not fixed.
+    # Workaround for conflicts related with the bug of PYTHONDONTWRITEBYTECODE
+    override-build: |
+      craftctl default
+      find "$CRAFT_PART_INSTALL" -name '*.pyc' -exec rm {} \;
+    stage:
+      - -bin/activate
+      - -bin/activate.csh
+      - -bin/activate.fish
+      - -lib/python3.10/site-packages/pip-23.2.1.dist-info/RECORD
+      - -lib/python3.10/site-packages/wheel-0.41.0.dist-info/RECORD
+      - -lib/python3.10/site-packages/charset_normalizer-3.1.0.dist-info/RECORD
+
+  ro:
+    plugin: python
+    source: https://osm.etsi.org/gerrit/osm/RO.git
+    source-tag: master
+    python-requirements:
+      - requirements.txt
+    stage-packages:
+      - python3.10-venv
+    python-packages:
+      - pip
+      - setuptools
+      - wheel
+      - ./NG-RO
+      - ./RO-plugin
+      - ./RO-VIM-vmware
+      - ./RO-VIM-openstack
+      - ./RO-VIM-openvim
+      - ./RO-VIM-aws
+      - ./RO-VIM-azure
+      - ./RO-SDN-dynpac
+      - ./RO-SDN-ietfl2vpn
+      - ./RO-SDN-onos_vpls
+      - ./RO-SDN-onos_openflow
+      - ./RO-SDN-odl_openflow
+      - ./RO-SDN-floodlight_openflow
+      - ./RO-SDN-arista_cloudvision
+      - ./RO-SDN-juniper_contrail
+      - ./RO-VIM-gcp
+      - ./RO-SDN-tapi
+    build-packages:
+      - wget
+      - genisoimage
+      - netbase
+