Skip to content

Commit

Permalink
Start vector log-shipping later, once env var is configured (#28)
Browse files Browse the repository at this point in the history
Since we have to restart it in the cloud-init anyway (once we know which
region we are in) I have disabled it in the packer build scripts so it
doesn't try to start up on boot too early
  • Loading branch information
ashb committed May 17, 2021
1 parent 82bd926 commit d64610a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 25 deletions.
4 changes: 4 additions & 0 deletions github-runner-ami/packer/files/install-dependencies.sh
Expand Up @@ -40,3 +40,7 @@ apt-get install -yq --no-install-recommends -o Dpkg::Options::="--force-confold"
python3-wheel \
yarn \
vector


# Re-enabled in clout-init once AWS_DEFAULT_REGION env var is set
systemctl disable vector
3 changes: 1 addition & 2 deletions github-runner-ami/packer/files/install-files.sh
Expand Up @@ -18,7 +18,7 @@

set -eu -o pipefail

mkdir /etc/iptables/ /etc/vector /etc/systemd/system/vector.service.d
mkdir /etc/iptables/ /etc/vector

install --owner root --mode=0644 --target-directory "/etc/systemd/system/" "/tmp/etc-systemd-system/"*
install --owner root --mode=0755 --target-directory "/usr/local/sbin" "/tmp/usr-local-sbin/"*
Expand All @@ -27,4 +27,3 @@ install --owner root --mode=0644 --target-directory "/etc/iptables" "/tmp/etc-ip
install --owner root --mode=0644 --target-directory "/etc/cron.d" "/tmp/etc-cron.d/"*
install --owner root --mode=0644 --target-directory "/etc/sudoers.d" "/tmp/etc-sudoers.d/"*
install --owner root --mode=0644 --target-directory "/etc/vector/" "/tmp/etc-vector/"*
install --owner root --mode=0644 --target-directory "/etc/systemd/system/vector.service.d/" "/tmp/etc-systemd-system-vector.service.d/"*
19 changes: 0 additions & 19 deletions github-runner-ami/packer/files/vector.service.d.override.conf

This file was deleted.

4 changes: 0 additions & 4 deletions github-runner-ami/packer/ubuntu2004.pkr.hcl
Expand Up @@ -136,10 +136,6 @@ build {
destination = "/tmp/etc-vector/vector.toml"
source = "./files/vector.toml"
}
provisioner "file" {
destination = "/tmp/etc-systemd-system-vector.service.d/override.conf"
source = "./files/vector.service.d.override.conf"
}
provisioner "shell" {
scripts = [
"./files/install-files.sh",
Expand Down

0 comments on commit d64610a

Please sign in to comment.