Commit b5eb008c authored by Ophélie Gagnard's avatar Ophélie Gagnard

generation: Tweak libnetworkcache usage.

parent b8631644
......@@ -10,7 +10,7 @@ MCA_PACKAGE_NAME=mca--static
FLB_PACKAGE_NAME=fluent-bit
PLG_PACKAGE_NAME=plugin-fluentbit-to-wendelin
MCA_VERSION=0.3.1+1.0.293+nodep-1
FLB_VERSION=1.9.8+1.0.293+nodep-1
FLB_VERSION=1.9.8+1.0.293-1
PLG_VERSION=0.2.1+1.0.293+nodep-1
SIGNING_KEY_NAME=db.key
......
......@@ -17,16 +17,17 @@ git config --local user.name "Ophelie Gagnard"
# building initramfs
apt -y install dracut-core dracut dracut-network sbsigntool pip
#pip install slapos.libnetworkcache
NC_DIR=identifier_slapos.libnetworkcache
if [ ! -d slapos.libnetworkcache ]; then
cd ..
NC_DIR=strategies_slapos.libnetworkcache
cd ..
if [ ! -d "$NC_DIR" ]; then
git clone https://lab.nexedi.com/Ophelie/slapos.libnetworkcache.git "$NC_DIR"
cd "$NC_DIR"
git checkout identifier
git checkout strategies
cd ..
pip install -e "$NC_DIR"
cd generation
fi
pip install packaging
cd generation
rm -f *"$MCA_PACKAGE_NAME"*
rm -f *"$FLB_PACKAGE_NAME"*
rm -f *"$PLG_PACKAGE_NAME"*
......@@ -42,3 +43,5 @@ FLB_CONF_PATH="/opt/${PLG_PACKAGE_NAME}/etc"
CONF_REGEX="s|%WENDELIN_URL%|${WENDELIN_URL}|g;s|%WENDELIN_PWD%|${WENDELIN_PWD}|g"
sed "$CONF_REGEX" "${FLB_CONF_PATH}/flb.conf.in" > "${FLB_CONF_PATH}/flb.conf"
echo "Created ${FLB_CONF_PATH}/flb.conf from template ${FLB_CONF_PATH}/flb.conf.in"
echo -e "\nDependencies successfully installed!\n"
......@@ -13,7 +13,7 @@ uefi_image_name="$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -r)_${MCA_NAME
sha_list=installation/images-sha512.list
hash_comment="# off + dummy ips, rd.neednet=1 LABEL=Root"
networkcache-upload --conf ../tls-access-to-shacache/test.cfg --id river --file "$uefi_image_name" "server-group=$SERVER_GROUP" "kernel-release=$(uname -r)" "mca-version=$MCA_VERSION" "flb-version=$FLB_VERSION" "plg-version=$PLG_VERSION" "upload-date=$(date)" "comment=$hash_comment"
networkcache-upload --conf ../tls-access-to-shacache/test.cfg --id river --file "$uefi_image_name" "server-group=$SERVER_GROUP" "kernel-version=$(uname -v | cut -d' ' -f4)" "mca-version=$MCA_VERSION" "flb-version=$FLB_VERSION" "plg-version=$PLG_VERSION" "timestamp=$(date +%s)" "comment=$hash_comment"
echo $(sha512sum "$uefi_image_name" | cut -d' ' -f1) "$hash_comment" >> "$sha_list"
git add "$sha_list"
......
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