You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by as...@apache.org on 2021/05/17 08:28:42 UTC
[airflow-ci-infra] 01/01: Start vector log-shipping later,
once env var is configured
This is an automated email from the ASF dual-hosted git repository.
ash pushed a commit to branch fix-logs
in repository https://gitbox.apache.org/repos/asf/airflow-ci-infra.git
commit 56df80d54f8ff5ad6bff38cbce72a6e05126f6ed
Author: Ash Berlin-Taylor <as...@firemirror.com>
AuthorDate: Mon May 17 09:27:15 2021 +0100
Start vector log-shipping later, once env var is configured
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
---
.../packer/files/install-dependencies.sh | 4 ++++
github-runner-ami/packer/files/install-files.sh | 3 +--
.../packer/files/vector.service.d.override.conf | 19 -------------------
github-runner-ami/packer/ubuntu2004.pkr.hcl | 4 ----
4 files changed, 5 insertions(+), 25 deletions(-)
diff --git a/github-runner-ami/packer/files/install-dependencies.sh b/github-runner-ami/packer/files/install-dependencies.sh
index a62a85c..81d1663 100644
--- a/github-runner-ami/packer/files/install-dependencies.sh
+++ b/github-runner-ami/packer/files/install-dependencies.sh
@@ -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
diff --git a/github-runner-ami/packer/files/install-files.sh b/github-runner-ami/packer/files/install-files.sh
index bacde4e..9c726f6 100644
--- a/github-runner-ami/packer/files/install-files.sh
+++ b/github-runner-ami/packer/files/install-files.sh
@@ -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/"*
@@ -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/"*
diff --git a/github-runner-ami/packer/files/vector.service.d.override.conf b/github-runner-ami/packer/files/vector.service.d.override.conf
deleted file mode 100644
index 899e86c..0000000
--- a/github-runner-ami/packer/files/vector.service.d.override.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-[Service]
-EnvironmentFile=/etc/environment
diff --git a/github-runner-ami/packer/ubuntu2004.pkr.hcl b/github-runner-ami/packer/ubuntu2004.pkr.hcl
index acc654b..4ffd1c9 100644
--- a/github-runner-ami/packer/ubuntu2004.pkr.hcl
+++ b/github-runner-ami/packer/ubuntu2004.pkr.hcl
@@ -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",