From 5f20511d3bcec92b352c8a09b1c727df95cb5a3d Mon Sep 17 00:00:00 2001 From: gatici Date: Mon, 31 Jul 2023 16:02:17 +0300 Subject: [PATCH] Adding rockcraft.yaml for RO Runs with Python 3.10 using Ubuntu22.04 base image Change-Id: Ibabd0d1630078af9ff6a0af81d37ced2a0c2793b Signed-off-by: gatici --- ...dding_rockcraft.yaml-7e1b90cb7ff078e4.yaml | 22 +++++ rockcraft.yaml | 91 +++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 releasenotes/notes/adding_rockcraft.yaml-7e1b90cb7ff078e4.yaml create mode 100644 rockcraft.yaml diff --git a/releasenotes/notes/adding_rockcraft.yaml-7e1b90cb7ff078e4.yaml b/releasenotes/notes/adding_rockcraft.yaml-7e1b90cb7ff078e4.yaml new file mode 100644 index 00000000..a4ce9df1 --- /dev/null +++ b/releasenotes/notes/adding_rockcraft.yaml-7e1b90cb7ff078e4.yaml @@ -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 index 00000000..424b9ee4 --- /dev/null +++ b/rockcraft.yaml @@ -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: __ +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 + -- 2.25.1