Preparation for Storage Volumes.
This commit is contained in:
parent
657b68f9cb
commit
06341c8842
@ -27,6 +27,12 @@ else
|
||||
# TODO move this sovereign-stack-base construction VM to separate dedicated IP
|
||||
lxc config set "$BASE_IMAGE_VM_NAME"
|
||||
|
||||
# for CHAIN in mainnet testnet; do
|
||||
# for DATA in blocks chainstate; do
|
||||
# lxc storage volume attach ss-base "$CHAIN-$DATA" "$BASE_IMAGE_VM_NAME" "/home/ubuntu/$CHAIN/$DATA"
|
||||
# done
|
||||
# done
|
||||
|
||||
lxc start "$BASE_IMAGE_VM_NAME"
|
||||
|
||||
sleep 15
|
||||
@ -39,6 +45,13 @@ else
|
||||
|
||||
sleep 3
|
||||
|
||||
|
||||
# for CHAIN in testnet mainnet; do
|
||||
# for DATA in blocks chainstate; do
|
||||
# lxc file push --recursive --project=default "/home/ubuntu/.ss/cache/bitcoin/$CHAIN/$DATA/" "$BASE_IMAGE_VM_NAME/home/ubuntu/$CHAIN/$DATA/"
|
||||
# done
|
||||
# done
|
||||
|
||||
# stop the VM and get a snapshot.
|
||||
lxc stop "$BASE_IMAGE_VM_NAME"
|
||||
lxc snapshot "$BASE_IMAGE_VM_NAME" "$UBUNTU_BASE_IMAGE_NAME"
|
||||
@ -46,3 +59,5 @@ else
|
||||
fi
|
||||
|
||||
lxc publish --public "$BASE_IMAGE_VM_NAME/$UBUNTU_BASE_IMAGE_NAME" --project=default --alias="$DOCKER_BASE_IMAGE_NAME"
|
||||
|
||||
lxc delete -f "$BASE_IMAGE_VM_NAME"
|
||||
|
@ -40,6 +40,14 @@ config:
|
||||
EOF
|
||||
|
||||
|
||||
if [ "$VIRTUAL_MACHINE" = base ]; then
|
||||
cat >> "$YAML_PATH" <<EOF
|
||||
limits.cpu: 4
|
||||
limits.memory: 4096MB
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "$VIRTUAL_MACHINE" = www ]; then
|
||||
cat >> "$YAML_PATH" <<EOF
|
||||
limits.cpu: "${WWW_SERVER_CPU_COUNT}"
|
||||
|
@ -25,7 +25,7 @@ if ! docker image list --format "{{.Repository}}:{{.Tag}}" | grep -q "$BROWSER_A
|
||||
docker build --build-arg GIT_REPO_URL="$BROWSER_APP_GIT_REPO_URL" \
|
||||
--build-arg VERSION="$BROWSER_APP_GIT_TAG" \
|
||||
-t "$BROWSER_APP_IMAGE_NAME" \
|
||||
$(pwd)/clams/frontend/browser-app/
|
||||
"$(pwd)/clams/frontend/browser-app/"
|
||||
fi
|
||||
|
||||
# If the clams-root volume doesn't exist, we create and seed it.
|
||||
|
Loading…
Reference in New Issue
Block a user