Commit 326994f1 authored by Ophélie Gagnard's avatar Ophélie Gagnard

generation: Separate MCA and plugin package.

parent afc304cc
...@@ -8,8 +8,10 @@ PROJECT_DIR=$GIT_ROOT ...@@ -8,8 +8,10 @@ PROJECT_DIR=$GIT_ROOT
## Packages ## Packages
MCA_PACKAGE_NAME=mca--static MCA_PACKAGE_NAME=mca--static
FLB_PACKAGE_NAME=fluent-bit FLB_PACKAGE_NAME=fluent-bit
PLG_PACKAGE_NAME=plugin-fluentbit-to-wendelin
MCA_VERSION=0.3.1+0.2+1.0.293+dep-1 MCA_VERSION=0.3.1+0.2+1.0.293+dep-1
FLB_VERSION=1.9.7+1.0.279+dep-1 FLB_VERSION=1.9.7+1.0.279+dep-1
PLG_VERSION=0.2+1.0.293+nodep-1
SIGNING_KEY_NAME=db.key SIGNING_KEY_NAME=db.key
...@@ -17,9 +19,13 @@ SIGNING_KEY_NAME=db.key ...@@ -17,9 +19,13 @@ SIGNING_KEY_NAME=db.key
# used mainly in dracut.module/configure # used mainly in dracut.module/configure
MCA_NAME_AND_VERSION=${MCA_PACKAGE_NAME}_${MCA_VERSION} MCA_NAME_AND_VERSION=${MCA_PACKAGE_NAME}_${MCA_VERSION}
FLB_NAME_AND_VERSION=${FLB_PACKAGE_NAME}_${FLB_VERSION} FLB_NAME_AND_VERSION=${FLB_PACKAGE_NAME}_${FLB_VERSION}
PLG_NAME_AND_VERSION=${PLG_PACKAGE_NAME}_${PLG_VERSION}
MCA_PACKAGE_FILE=${MCA_NAME_AND_VERSION}_amd64.deb MCA_PACKAGE_FILE=${MCA_NAME_AND_VERSION}_amd64.deb
FLB_PACKAGE_FILE=${FLB_NAME_AND_VERSION}_amd64.deb FLB_PACKAGE_FILE=${FLB_NAME_AND_VERSION}_amd64.deb
PLG_PACKAGE_FILE=${PLG_NAME_AND_VERSION}_amd64.deb
URL_PATTERN="https://download.opensuse.org/repositories/home:VIFIBnexedi/Debian_11/amd64/" URL_PATTERN="https://download.opensuse.org/repositories/home:VIFIBnexedi/Debian_11/amd64/"
TMP_URL_PATTERN="https://download.opensuse.org/repositories/home:oph.nxd/Debian_11/amd64/"
MCA_PACKAGE_URL=${URL_PATTERN}/${MCA_PACKAGE_FILE} MCA_PACKAGE_URL=${URL_PATTERN}/${MCA_PACKAGE_FILE}
FLB_PACKAGE_URL=${URL_PATTERN}/${FLB_PACKAGE_FILE} FLB_PACKAGE_URL=${URL_PATTERN}/${FLB_PACKAGE_FILE}
PLG_PACKAGE_URL=${TMP_URL_PATTERN}/${PLG_PACKAGE_FILE}
...@@ -19,13 +19,16 @@ apt -y install dracut-core dracut dracut-network sbsigntool pip ...@@ -19,13 +19,16 @@ apt -y install dracut-core dracut dracut-network sbsigntool pip
pip install slapos.libnetworkcache pip install slapos.libnetworkcache
rm -f *"$MCA_PACKAGE_NAME"* rm -f *"$MCA_PACKAGE_NAME"*
rm -f *"$FLB_PACKAGE_NAME"* rm -f *"$FLB_PACKAGE_NAME"*
apt -y remove "$MCA_PACKAGE_NAME" "$FLB_PACKAGE_NAME" || true rm -f *"$PLG_PACKAGE_NAME"*
apt -y remove "$MCA_PACKAGE_NAME" "$FLB_PACKAGE_NAME" "$PLG_PACKAGE_NAME" || true
wget "$MCA_PACKAGE_URL" wget "$MCA_PACKAGE_URL"
wget "$FLB_PACKAGE_URL" wget "$FLB_PACKAGE_URL"
wget "$PLG_PACKAGE_URL"
apt -y install ./"$MCA_PACKAGE_FILE" apt -y install ./"$MCA_PACKAGE_FILE"
apt -y install ./"$FLB_PACKAGE_FILE" apt -y install ./"$FLB_PACKAGE_FILE"
apt -y install ./"$PLG_PACKAGE_FILE"
MCA_CONF_PATH="/opt/${MCA_PACKAGE_NAME}/etc" FLB_CONF_PATH="/opt/${PLG_PACKAGE_NAME}/etc"
CONF_REGEX="s|%WENDELIN_URL%|${WENDELIN_URL}|g;s|%WENDELIN_PWD%|${WENDELIN_PWD}|g" CONF_REGEX="s|%WENDELIN_URL%|${WENDELIN_URL}|g;s|%WENDELIN_PWD%|${WENDELIN_PWD}|g"
sed "$CONF_REGEX" "${MCA_CONF_PATH}/flb.conf.in" > "${MCA_CONF_PATH}/flb.conf" sed "$CONF_REGEX" "${FLB_CONF_PATH}/flb.conf.in" > "${FLB_CONF_PATH}/flb.conf"
echo "Created ${MCA_CONF_PATH}/flb.conf from template ${MCA_CONF_PATH}/flb.conf.in" echo "Created ${FLB_CONF_PATH}/flb.conf from template ${FLB_CONF_PATH}/flb.conf.in"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment