diff --git a/linux/debian/essentials/config b/linux/debian/essentials/config index acbf1b4c72c41408e10f9458b4af17561159472b..c42114c2333e1a10afb190d2b41f019c4ed4415a 100755 --- a/linux/debian/essentials/config +++ b/linux/debian/essentials/config @@ -30,6 +30,12 @@ reconfigure|configure) db_go || true db_input critical cellframe-node/kelvin_testnet_node_type || true + db_go || true + + db_input critical cellframe-node/subzero_enabled || true + db_go || true + + db_input critical cellframe-node/subzero_node_type || true db_go || true ;; diff --git a/linux/debian/essentials/templates b/linux/debian/essentials/templates index 2aaf3d010feb2eaa6f83d5c6911245e2295c177f..73061945b147e6fb9fe7cecb005fb15d0b449cb2 100755 --- a/linux/debian/essentials/templates +++ b/linux/debian/essentials/templates @@ -71,3 +71,21 @@ Description: Kelvin Testnet: Node role archive - Sync all the network root - Special predefined root nodes, usualy produces zerochain and act like archive as well +Template: cellframe-node/subzero_enabled +Default: true +Choices: true, false +Type: select +Description: SubZero: Enable network + Kelvin Testnet: Enable network auto load on start + +Template: cellframe-node/subzero_node_type +Type: select +Default: full +Choices: full, light, master, archive, root +Description: SubZero: Node role + Select node role:. + Light - syncronize only local wallets + full - sync all its cell + master - allow to store values in chains and take comission, sync all shards that will need to be synced + archive - Sync all the network + root - Special predefined root nodes, usualy produces zerochain and act like archive as well diff --git a/linux/debian/scripts/deploy.sh b/linux/debian/scripts/deploy.sh index ab0bdfd2db2b0c9fe122367d25120738b718423d..c564f1af20a21bd339974adb08fdcba07470d942 100755 --- a/linux/debian/scripts/deploy.sh +++ b/linux/debian/scripts/deploy.sh @@ -7,48 +7,47 @@ CELLFRAME_REPO_CREDS="admin@debian.pub.demlabs.net" CELLFRAME_REPO_KEY="~/.ssh/demlabs_publish" CELLFRAME_REPO_PATH="~/web/debian.pub.demlabs.net/public_html" REPO_PORT=34768 -CELLFRAME_FILESERVER_CREDS="admin@pub.cellframe.net" -CELLFRAME_FILESERVER_PATH="~/web/pub.cellframe.net/public_html/linux" +CELLFRAME_PUB_CREDS="admin@pub.cellframe.net" +CELLFRAME_PUB_PATH="~/web/pub.cellframe.net/public_html/linux" +CELLFRAME_PVT_CREDS="admin@pvt.demlabs.net" +CELLFRAME_PVT_PATH="~/web/public" pwd cd packages PKGFILES=$(ls . | grep .deb) -MOD=$(echo $MOD | sed 's/-\?static-\?//') && [ ! $MOD = "" ] && MOD="-$MOD" -#cd .. [[ -v CI_COMMIT_REF_NAME ]] && [[ $CI_COMMIT_REF_NAME != "master" ]] && SUBDIR="${CI_COMMIT_REF_NAME}" || SUBDIR="" #echo "We have $DISTR_CODENAME there" #echo "On path $REPO_DIR_SRC we have debian files." for pkgfile in $PKGFILES; do + if [[ $(echo $pkgfile | grep "pgsql") == "" ]]; then + CELLFRAME_FILESERVER_CREDS=$CELLFRAME_PUB_CREDS + CELLFRAME_FILESERVER_PATH=$CELLFRAME_PUB_PATH + else + CELLFRAME_FILESERVER_CREDS=$CELLFRAME_PVT_CREDS + CELLFRAME_FILESERVER_PATH=$CELLFRAME_PVT_PATH + fi pkgname=$(echo $pkgfile | sed 's/.deb$//') pkgname_public=$(echo $pkgname | cut -d '-' -f1-4,7-) #cutting away Debian-9.12 pkgname_weblink="$(echo $pkgname | cut -d '-' -f2,8 )-latest" #leaving only necessary entries echo "Package name for public is $pkgname_public" - mv $pkgfile $wd/$PACKAGE_PATH/$pkgname$MOD.deb || { echo "[ERR] Something went wrong in publishing the package. Now aborting."; exit -4; } + mv $pkgfile $wd/$PACKAGE_PATH/$pkgname.deb || { echo "[ERR] Something went wrong in publishing the package. Now aborting."; exit -4; } CODENAME=$(echo $pkgname | rev | cut -d '-' -f1 | rev) cp -r ../prod_build/general/essentials/weblink-latest ../prod_build/general/essentials/$pkgname_weblink - sed -i "/document/s/cellframe.*deb/$pkgname_public$MOD.deb/" ../prod_build/general/essentials/$pkgname_weblink/index.html -# if [[ $(echo $CI_COMMIT_REF_NAME | grep "master\|^release\|^pubtest") != "" ]]; then - echo "REF_NAME is $CI_COMMIT_REF_NAME" - ssh -i $CELLFRAME_REPO_KEY "$CELLFRAME_FILESERVER_CREDS" "mkdir -p $CELLFRAME_FILESERVER_PATH/$SUBDIR" - scp -i $CELLFRAME_REPO_KEY $wd/$PACKAGE_PATH/$pkgname$MOD.deb "$CELLFRAME_FILESERVER_CREDS:$CELLFRAME_FILESERVER_PATH/$SUBDIR/$pkgname_public$MOD.deb" - if [[ $(echo $pkgname | grep "pgsql\|dbg") == "" ]]; then - scp -r -i $CELLFRAME_REPO_KEY ../prod_build/general/essentials/$pkgname_weblink "$CELLFRAME_FILESERVER_CREDS:$CELLFRAME_FILESERVER_PATH/$SUBDIR/" - if [[ $CI_COMMIT_REF_NAME == "master" ]]; then - set -x - scp -P $REPO_PORT -i $CELLFRAME_REPO_KEY $wd/$PACKAGE_PATH/$pkgname$MOD.deb "$CELLFRAME_REPO_CREDS:~/aptly/repo_update/$pkgname_public$MOD.deb" - ssh -p $REPO_PORT -i $CELLFRAME_REPO_KEY "$CELLFRAME_REPO_CREDS" -- "~/aptly/repo_update.sh" - set +x - fi - fi -# ssh -i $CELLFRAME_REPO_KEY "$CELLFRAME_FILESERVER_CREDS" "ln -sf $CELLFRAME_FILESERVER_PATH/$pkgname$MOD.deb $CELLFRAME_FILESERVER_PATH/$pkgname$MOD-latest.deb" + sed -i "/document/s/cellframe.*deb/$pkgname_public.deb/" ../prod_build/general/essentials/$pkgname_weblink/index.html + echo "REF_NAME is $CI_COMMIT_REF_NAME" + ssh -i $CELLFRAME_REPO_KEY "$CELLFRAME_FILESERVER_CREDS" "mkdir -p $CELLFRAME_FILESERVER_PATH/$SUBDIR" + scp -i $CELLFRAME_REPO_KEY $wd/$PACKAGE_PATH/$pkgname.deb "$CELLFRAME_FILESERVER_CREDS:$CELLFRAME_FILESERVER_PATH/$SUBDIR/$pkgname_public.deb" + if [[ $CI_COMMIT_REF_NAME == "master" && $(echo $pkgname | grep "dbg") == "" ]]; then + scp -r -i $CELLFRAME_REPO_KEY ../prod_build/general/essentials/$pkgname_weblink "$CELLFRAME_FILESERVER_CREDS:$CELLFRAME_FILESERVER_PATH/$SUBDIR/" + scp -P $REPO_PORT -i $CELLFRAME_REPO_KEY $wd/$PACKAGE_PATH/$pkgname.deb "$CELLFRAME_REPO_CREDS:~/aptly/repo_update/$pkgname_public.deb" + ssh -p $REPO_PORT -i $CELLFRAME_REPO_KEY "$CELLFRAME_REPO_CREDS" -- "~/aptly/repo_update.sh" + fi - # fi rm -r ../prod_build/general/essentials/$pkgname_weblink done -# export -n "UPDVER" cd .. exit 0 #symlink name-actual to the latest version.