| Daniel Arndt | 11cd93f | 2023-08-10 15:10:02 -0300 | [diff] [blame^] | 1 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 2 | # you may not use this file except in compliance with the License. |
| 3 | # You may obtain a copy of the License at |
| 4 | # |
| 5 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | # |
| 7 | # Unless required by applicable law or agreed to in writing, software |
| 8 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 9 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 10 | # implied. |
| 11 | # See the License for the specific language governing permissions and |
| 12 | # limitations under the License. |
| 13 | ######################################################################################## |
| 14 | |
| 15 | name: life-cycle-manager |
| 16 | summary: An image for OSM LCM |
| 17 | description: | |
| 18 | OSM Life Cycle Manager image. |
| 19 | version: master_beta_1 # version format: <upstream-version>_<base-version>_<version> |
| 20 | license: Apache-2.0 |
| 21 | base: ubuntu:22.04 |
| 22 | platforms: |
| 23 | amd64: |
| 24 | |
| 25 | package-repositories: |
| 26 | - type: apt |
| 27 | components: [main] |
| 28 | suites: [kubernetes-xenial] |
| 29 | # curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --import-options show-only --import | grep "^pub" -A1 | head -n2 | tail -1 | xargs |
| 30 | key-id: A362B822F6DEDC652817EA46B53DC80D13EDEF05 |
| 31 | url: https://apt.kubernetes.io/ |
| 32 | |
| 33 | parts: |
| 34 | non-root-user: |
| 35 | plugin: nil |
| 36 | overlay-script: | |
| 37 | chroot ${CRAFT_OVERLAY} |
| 38 | mkdir -p /app/osm_lcm |
| 39 | mkdir -p /app/storage/kafka |
| 40 | mkdir -p /app/log |
| 41 | groupadd -g 1001 appuser |
| 42 | useradd -u 1001 -g 1001 -d /app appuser |
| 43 | chown -R appuser:appuser /app |
| 44 | |
| 45 | common: |
| 46 | source: https://osm.etsi.org/gerrit/osm/common.git |
| 47 | source-branch: master |
| 48 | plugin: python |
| 49 | python-requirements: |
| 50 | - requirements.txt |
| 51 | stage-packages: |
| 52 | - python3.10-venv |
| 53 | build-environment: |
| 54 | - PYTHONDONTWRITEBYTECODE: "1" # This does not work as expected, there is a bug and still not fixed. |
| 55 | stage: |
| 56 | - -bin/activate |
| 57 | - -bin/activate.csh |
| 58 | - -bin/activate.fish |
| 59 | - -lib/python3.10/site-packages/*/RECORD |
| 60 | # Workaround for conflicts related with the bug of PYTHONDONTWRITEBYTECODE |
| 61 | - -**/__pycache__/ |
| 62 | |
| 63 | helm: |
| 64 | plugin: dump |
| 65 | source: https://get.helm.sh/helm-v2.17.0-linux-amd64.tar.gz |
| 66 | organize: |
| 67 | helm: usr/local/bin/helm |
| 68 | stage: |
| 69 | - usr/local/bin/helm |
| 70 | |
| 71 | helm3: |
| 72 | plugin: dump |
| 73 | source: https://get.helm.sh/helm-v3.11.3-linux-amd64.tar.gz |
| 74 | organize: |
| 75 | helm: usr/local/bin/helm3 |
| 76 | stage: |
| 77 | - usr/local/bin/helm3 |
| 78 | |
| 79 | n2vc: |
| 80 | source: https://osm.etsi.org/gerrit/osm/N2VC.git |
| 81 | source-branch: master |
| 82 | plugin: python |
| 83 | python-requirements: |
| 84 | - requirements.txt |
| 85 | stage-packages: |
| 86 | - python3.10-venv |
| 87 | - kubectl=1.26.5-00 # TODO: Do we need to lock the version of kubectl? |
| 88 | - openssh-client |
| 89 | # NOTE: `ca-certificates` needs to be in overlay-packages for some reason. See: |
| 90 | # https://github.com/canonical/rockcraft/issues/334 |
| 91 | overlay-packages: |
| 92 | - ca-certificates |
| 93 | build-environment: |
| 94 | - PYTHONDONTWRITEBYTECODE: "1" # This does not work as expected, there is a bug and still not fixed. |
| 95 | stage: |
| 96 | - -bin/activate |
| 97 | - -bin/activate.csh |
| 98 | - -bin/activate.fish |
| 99 | - -lib/python3.10/site-packages/*/RECORD |
| 100 | # Workaround for conflicts related with the bug of PYTHONDONTWRITEBYTECODE |
| 101 | - -**/__pycache__/ |
| 102 | |
| 103 | lcm: |
| 104 | plugin: python |
| 105 | source: https://osm.etsi.org/gerrit/osm/LCM.git |
| 106 | source-branch: master |
| 107 | python-requirements: |
| 108 | - requirements.txt |
| 109 | stage-packages: |
| 110 | - python3.10-venv |
| 111 | - kubectl=1.26.5-00 |
| 112 | build-packages: |
| 113 | - wget |
| 114 | - genisoimage |
| 115 | - netbase |