Comment out block/chainistate volume mounting.
This commit is contained in:
parent
7a710d0916
commit
8251d552a2
@ -33,11 +33,11 @@ else
|
|||||||
# TODO move this sovereign-stack-base construction VM to separate dedicated IP
|
# TODO move this sovereign-stack-base construction VM to separate dedicated IP
|
||||||
lxc config set "$BASE_IMAGE_VM_NAME"
|
lxc config set "$BASE_IMAGE_VM_NAME"
|
||||||
|
|
||||||
for CHAIN in mainnet testnet; do
|
# for CHAIN in mainnet testnet; do
|
||||||
for DATA in blocks chainstate; do
|
# for DATA in blocks chainstate; do
|
||||||
lxc storage volume attach ss-base "$CHAIN-$DATA" "$BASE_IMAGE_VM_NAME" "/home/ubuntu/.ss/cache/bitcoin/$CHAIN/$DATA"
|
# lxc storage volume attach ss-base "$CHAIN-$DATA" "$BASE_IMAGE_VM_NAME" "/home/ubuntu/bitcoin/$DATA"
|
||||||
done
|
# done
|
||||||
done
|
# done
|
||||||
|
|
||||||
lxc start "$BASE_IMAGE_VM_NAME"
|
lxc start "$BASE_IMAGE_VM_NAME"
|
||||||
|
|
||||||
@ -49,27 +49,27 @@ else
|
|||||||
# ensure the ssh service is listening at localhost
|
# ensure the ssh service is listening at localhost
|
||||||
lxc exec "$BASE_IMAGE_VM_NAME" -- wait-for-it -t 100 127.0.0.1:22
|
lxc exec "$BASE_IMAGE_VM_NAME" -- wait-for-it -t 100 127.0.0.1:22
|
||||||
|
|
||||||
# If we have any chaninstate or blocks in our SSME, let's push them to the
|
# # If we have any chaninstate or blocks in our SSME, let's push them to the
|
||||||
# remote host as a zfs volume that way deployments can share a common history
|
# # remote host as a zfs volume that way deployments can share a common history
|
||||||
# of chainstate/blocks.
|
# # of chainstate/blocks.
|
||||||
for CHAIN in testnet mainnet; do
|
# for CHAIN in testnet mainnet; do
|
||||||
for DATA in blocks chainstate; do
|
# for DATA in blocks chainstate; do
|
||||||
# if the storage snapshot doesn't yet exist, create it.
|
# # if the storage snapshot doesn't yet exist, create it.
|
||||||
if ! lxc storage volume list ss-base -q --format csv -c n | grep -q "$CHAIN-$DATA/snap0"; then
|
# if ! lxc storage volume list ss-base -q --format csv -c n | grep -q "$CHAIN-$DATA/snap0"; then
|
||||||
DATA_PATH="/home/ubuntu/.ss/cache/bitcoin/$CHAIN/$DATA"
|
# DATA_PATH="/home/ubuntu/.ss/cache/bitcoin/$CHAIN/$DATA"
|
||||||
if [ -d "$DATA_PATH" ]; then
|
# if [ -d "$DATA_PATH" ]; then
|
||||||
COMPLETE_FILE_PATH="$DATA_PATH/complete"
|
# COMPLETE_FILE_PATH="$DATA_PATH/complete"
|
||||||
if lxc exec "$BASE_IMAGE_VM_NAME" -- [ ! -f "$COMPLETE_FILE_PATH" ]; then
|
# if lxc exec "$BASE_IMAGE_VM_NAME" -- [ ! -f "$COMPLETE_FILE_PATH" ]; then
|
||||||
lxc file push --recursive --project=default "$DATA_PATH/" "$BASE_IMAGE_VM_NAME""$DATA_PATH/"
|
# lxc file push --recursive --project=default "$DATA_PATH/" "$BASE_IMAGE_VM_NAME""$DATA_PATH/"
|
||||||
lxc exec "$BASE_IMAGE_VM_NAME" -- su ubuntu - bash -c "echo $(date) > $COMPLETE_FILE_PATH"
|
# lxc exec "$BASE_IMAGE_VM_NAME" -- su ubuntu - bash -c "echo $(date) > $COMPLETE_FILE_PATH"
|
||||||
lxc exec "$BASE_IMAGE_VM_NAME" -- chown -R 999:999 "$DATA_PATH/$DATA"
|
# lxc exec "$BASE_IMAGE_VM_NAME" -- chown -R 999:999 "$DATA_PATH/$DATA"
|
||||||
else
|
# else
|
||||||
echo "INFO: it appears as though $CHAIN/$DATA has already been initialized. Continuing."
|
# echo "INFO: it appears as though $CHAIN/$DATA has already been initialized. Continuing."
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
done
|
# done
|
||||||
done
|
# done
|
||||||
|
|
||||||
# stop the VM and get a snapshot.
|
# stop the VM and get a snapshot.
|
||||||
lxc stop "$BASE_IMAGE_VM_NAME"
|
lxc stop "$BASE_IMAGE_VM_NAME"
|
||||||
@ -83,12 +83,12 @@ lxc publish --public "$BASE_IMAGE_VM_NAME/$UBUNTU_BASE_IMAGE_NAME" --project=def
|
|||||||
echo "INFO: Success creating the base image. Deleting artifacts from the build process."
|
echo "INFO: Success creating the base image. Deleting artifacts from the build process."
|
||||||
lxc delete -f "$BASE_IMAGE_VM_NAME"
|
lxc delete -f "$BASE_IMAGE_VM_NAME"
|
||||||
|
|
||||||
# now let's get a snapshot of each of the blocks/chainstate directories.
|
# # now let's get a snapshot of each of the blocks/chainstate directories.
|
||||||
for CHAIN in testnet mainnet; do
|
# for CHAIN in testnet mainnet; do
|
||||||
for DATA in blocks chainstate; do
|
# for DATA in blocks chainstate; do
|
||||||
if ! lxc storage volume list ss-base -q --format csv -c n | grep -q "$CHAIN-$DATA/snap0"; then
|
# if ! lxc storage volume list ss-base -q --format csv -c n | grep -q "$CHAIN-$DATA/snap0"; then
|
||||||
echo "INFO: Creating a snapshot 'ss-base/$CHAIN-$DATA/snap0'."
|
# echo "INFO: Creating a snapshot 'ss-base/$CHAIN-$DATA/snap0'."
|
||||||
lxc storage volume snapshot ss-base --project=default "$CHAIN-$DATA"
|
# lxc storage volume snapshot ss-base --project=default "$CHAIN-$DATA"
|
||||||
fi
|
# fi
|
||||||
done
|
# done
|
||||||
done
|
# done
|
||||||
|
Loading…
Reference in New Issue
Block a user