Add debian package for stx-rook-ceph
Add debian packaging infrastructure for stx-rook-ceph to build a debian package. Test Plan: PASS: Built package PASS: Built iso PASS: Installed controller Story: 2009101 Task: 44119 Signed-off-by: Ramon Gazoni Lacerda <Ramon.GazoniLacerda@windriver.com> Change-Id: Ib66a19e16205c84aae3c6610f86523632b123b01
This commit is contained in:
parent
521f4d8f2f
commit
ea5e4d315e
5
stx-rook-ceph/debian/deb_folder/changelog
Normal file
5
stx-rook-ceph/debian/deb_folder/changelog
Normal file
@ -0,0 +1,5 @@
|
||||
stx-rook-ceph (1.0-1) unstable; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Ramon Gazoni Lacerda <Ramon.GazoniLacerda@windriver.com> Tue, 30 Nov 2021 16:21:57 -0300
|
19
stx-rook-ceph/debian/deb_folder/control
Normal file
19
stx-rook-ceph/debian/deb_folder/control
Normal file
@ -0,0 +1,19 @@
|
||||
Source: stx-rook-ceph
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
helm,
|
||||
openstack-helm-infra,
|
||||
chartmuseum,
|
||||
python3-k8sapp-rook,
|
||||
python3-k8sapp-rook-wheels,
|
||||
procps
|
||||
Standards-Version: 4.1.2
|
||||
Homepage: https://www.starlingx.io
|
||||
|
||||
Package: stx-rook-ceph
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: StarlingX K8S application: Rook Ceph
|
||||
The StarlingX K8S application for Rook Ceph
|
43
stx-rook-ceph/debian/deb_folder/copyright
Normal file
43
stx-rook-ceph/debian/deb_folder/copyright
Normal file
@ -0,0 +1,43 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: stx-rook-ceph
|
||||
Source: https://opendev.org/starlingx/rook-ceph/
|
||||
|
||||
Files: *
|
||||
Copyright:
|
||||
(c) 2013-2021 Wind River Systems, Inc
|
||||
(c) Others (See individual files for more details)
|
||||
License: Apache-2
|
||||
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
|
||||
.
|
||||
https://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.
|
||||
.
|
||||
On Debian-based systems the full text of the Apache version 2.0 license
|
||||
can be found in `/usr/share/common-licenses/Apache-2.0'.
|
||||
|
||||
# If you want to use GPL v2 or later for the /debian/* files use
|
||||
# the following clauses, or change it to suit. Delete these two lines
|
||||
Files: debian/*
|
||||
Copyright: 2021 Wind River Systems, Inc
|
||||
License: Apache-2
|
||||
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
|
||||
.
|
||||
https://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.
|
||||
.
|
||||
On Debian-based systems the full text of the Apache version 2.0 license
|
||||
can be found in `/usr/share/common-licenses/Apache-2.0'.
|
74
stx-rook-ceph/debian/deb_folder/rules
Executable file
74
stx-rook-ceph/debian/deb_folder/rules
Executable file
@ -0,0 +1,74 @@
|
||||
#!/usr/bin/make -f
|
||||
export DH_VERBOSE = 1
|
||||
|
||||
export ROOT = debian/tmp
|
||||
export APP_FOLDER = $(ROOT)/usr/local/share/applications/helm
|
||||
export INITRD_DIR = $(ROOT)/etc/rc.d/init.d
|
||||
|
||||
export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
|
||||
export MAJOR = $(shell echo $(DEB_VERSION) | cut -f 1 -d '.')
|
||||
export MINOR_PATCH = $(shell echo $(DEB_VERSION) | cut -f 2 -d '.')
|
||||
|
||||
export APP_NAME = rook-ceph-apps
|
||||
export APP_VERSION = $(MAJOR).$(MINOR_PATCH)
|
||||
export APP_TARBALL = $(APP_NAME)-$(APP_VERSION).tgz
|
||||
|
||||
export HELM_REPO = stx-platform
|
||||
export STAGING = staging
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
|
||||
# Host a server for the helm charts.
|
||||
chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="./helm-charts" &
|
||||
sleep 2
|
||||
helm repo add local http://localhost:8879/charts
|
||||
|
||||
# Make the charts. These produce a tgz file
|
||||
cd helm-charts && \
|
||||
make rook-operator && \
|
||||
make rook-ceph && \
|
||||
make rook-ceph-provisioner
|
||||
|
||||
# Terminate the helm chart server.
|
||||
pkill chartmuseum
|
||||
|
||||
# Setup staging
|
||||
mkdir -p $(STAGING)
|
||||
cp files/metadata.yaml $(STAGING)
|
||||
cp manifests/manifest.yaml $(STAGING)
|
||||
mkdir -p $(STAGING)/charts
|
||||
cp helm-charts/*.tgz $(STAGING)/charts
|
||||
cd $(STAGING)
|
||||
|
||||
# Populate metadata
|
||||
sed -i 's/@APP_NAME@/$(APP_NAME)/g' $(STAGING)/metadata.yaml
|
||||
sed -i 's/@APP_VERSION@/$(APP_VERSION)/g' $(STAGING)/metadata.yaml
|
||||
sed -i 's/@HELM_REPO@/$(HELM_REPO)/g' $(STAGING)/metadata.yaml
|
||||
|
||||
# Copy the plugins: installed in the buildroot
|
||||
mkdir -p $(STAGING)/plugins
|
||||
cp /plugins/$(APP_NAME)/*.whl $(STAGING)/plugins
|
||||
|
||||
# Package it up
|
||||
find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
|
||||
tar -zcf $(APP_TARBALL) -C $(STAGING)/ .
|
||||
|
||||
# Cleanup staging
|
||||
rm -fr $(STAGING)
|
||||
|
||||
override_dh_auto_install:
|
||||
# Install the app tar file
|
||||
install -d -m 755 $(APP_FOLDER)
|
||||
install -d -m 755 $(INITRD_DIR)
|
||||
install -p -D -m 755 $(APP_TARBALL) $(APP_FOLDER)
|
||||
install -m 750 files/rook-mon-exit.sh $(INITRD_DIR)/rook-mon-exit
|
||||
|
||||
# Prevents dh_fixperms from changing the permissions defined in this file
|
||||
override_dh_fixperms:
|
||||
dh_fixperms --exclude etc/rc.d/init.d/rook-mon-exit
|
||||
|
||||
override_dh_usrlocal:
|
||||
echo "do nothing"
|
1
stx-rook-ceph/debian/deb_folder/source/format
Normal file
1
stx-rook-ceph/debian/deb_folder/source/format
Normal file
@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
2
stx-rook-ceph/debian/deb_folder/stx-rook-ceph.install
Normal file
2
stx-rook-ceph/debian/deb_folder/stx-rook-ceph.install
Normal file
@ -0,0 +1,2 @@
|
||||
usr/local/share/applications/helm/*
|
||||
etc/rc.d/init.d/rook-mon-exit
|
9
stx-rook-ceph/debian/meta_data.yaml
Normal file
9
stx-rook-ceph/debian/meta_data.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
debname: stx-rook-ceph
|
||||
debver: 1.0-1
|
||||
src_path: stx-rook-ceph
|
||||
src_files:
|
||||
- files
|
||||
revision:
|
||||
dist: $STX_DIST
|
||||
PKG_GITREVCOUNT: true
|
Loading…
x
Reference in New Issue
Block a user