Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GEN-11027] chore: reserve a fixed amount of blocks for the data volume; remove ansible pkg + ppa #1295

Merged
merged 4 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common-nix.vars.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
postgres-version = "15.6.1.135"
postgres-version = "15.6.1.136"
5 changes: 5 additions & 0 deletions ebssurrogate/scripts/surrogate-bootstrap-nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ function format_and_mount_rootfs {
fi

mkfs.ext4 /dev/xvdh

# Explicitly reserving 100MiB worth of blocks for the data volume
RESERVED_DATA_VOLUME_BLOCK_COUNT=$((100 * 1024 * 1024 / 4096))
tune2fs -r $RESERVED_DATA_VOLUME_BLOCK_COUNT /dev/xvdh

mkdir -p /mnt/data
mount -o defaults,discard /dev/xvdh /mnt/data
}
Expand Down
5 changes: 4 additions & 1 deletion scripts/90-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ elif [ -n "$(command -v apt-get)" ]; then
libicu-dev \
libcgal-dev \
libgcc-9-dev \
libgcc-8-dev
libgcc-8-dev \
ansible

add-apt-repository --yes --remove ppa:ansible/ansible

source /etc/os-release
apt-get -y remove --purge linux-headers-5.11.0-1021-aws
Expand Down
6 changes: 5 additions & 1 deletion scripts/nix-provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ EOF
$ARGS
}

function cleanup_packages {
apt-get -y remove --purge ansible
add-apt-repository --yes --remove ppa:ansible/ansible
}

install_packages
install_nix
execute_stage2_playbook

cleanup_packages
Loading