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/07 15:01:48 UTC
[airflow-ci-infra] branch logs-to-same-region created (now ffda049)
This is an automated email from the ASF dual-hosted git repository.
ash pushed a change to branch logs-to-same-region
in repository https://gitbox.apache.org/repos/asf/airflow-ci-infra.git.
at ffda049 Send logs to Cloudwatch in the same region, not always to Frankfurt
This branch includes the following new commits:
new ffda049 Send logs to Cloudwatch in the same region, not always to Frankfurt
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[airflow-ci-infra] 01/01: Send logs to Cloudwatch in the same
region, not always to Frankfurt
Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ash pushed a commit to branch logs-to-same-region
in repository https://gitbox.apache.org/repos/asf/airflow-ci-infra.git
commit ffda04930882bd32ef7cde8289e86bb5c297145f
Author: Ash Berlin-Taylor <as...@firemirror.com>
AuthorDate: Fri May 7 15:43:47 2021 +0100
Send logs to Cloudwatch in the same region, not always to Frankfurt
---
github-runner-ami/packer/files/install-files.sh | 3 ++-
.../{install-files.sh => vector.service.d.override.conf} | 14 ++------------
github-runner-ami/packer/files/vector.toml | 2 +-
github-runner-ami/packer/ubuntu2004.pkr.hcl | 6 +++++-
4 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/github-runner-ami/packer/files/install-files.sh b/github-runner-ami/packer/files/install-files.sh
index 9c726f6..bacde4e 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
+mkdir /etc/iptables/ /etc/vector /etc/systemd/system/vector.service.d
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,3 +27,4 @@ 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/install-files.sh b/github-runner-ami/packer/files/vector.service.d.override.conf
similarity index 52%
copy from github-runner-ami/packer/files/install-files.sh
copy to github-runner-ami/packer/files/vector.service.d.override.conf
index 9c726f6..899e86c 100644
--- a/github-runner-ami/packer/files/install-files.sh
+++ b/github-runner-ami/packer/files/vector.service.d.override.conf
@@ -1,4 +1,3 @@
-#!/usr/bin/env bash
# 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
@@ -16,14 +15,5 @@
# specific language governing permissions and limitations
# under the License.
-set -eu -o pipefail
-
-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/"*
-install --owner root --mode=0755 --target-directory "/usr/local/bin" "/tmp/usr-local-bin/"*
-install --owner root --mode=0644 --target-directory "/etc/iptables" "/tmp/etc-iptables/"*
-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/"*
+[Service]
+EnvironmentFile=/etc/environment
diff --git a/github-runner-ami/packer/files/vector.toml b/github-runner-ami/packer/files/vector.toml
index 05db414..07da3a0 100644
--- a/github-runner-ami/packer/files/vector.toml
+++ b/github-runner-ami/packer/files/vector.toml
@@ -95,4 +95,4 @@ create_missing_group = false
create_missing_stream = true
group_name = "GitHubRunners"
stream_name = "{{ host }}"
-region = "eu-central-1"
+region = "${AWS_DEFAULT_REGION}"
diff --git a/github-runner-ami/packer/ubuntu2004.pkr.hcl b/github-runner-ami/packer/ubuntu2004.pkr.hcl
index fbc8897..4341966 100644
--- a/github-runner-ami/packer/ubuntu2004.pkr.hcl
+++ b/github-runner-ami/packer/ubuntu2004.pkr.hcl
@@ -85,7 +85,7 @@ build {
# in to place with the approriate permissions via install-files.sh provisioner step
provisioner "shell" {
inline = [
- "mkdir -p /tmp/etc-systemd-system /tmp/usr-local-sbin /tmp/usr-local-bin /tmp/etc-sudoers.d /tmp/etc-iptables /tmp/etc-cron.d /tmp/etc-vector"
+ "mkdir -p /tmp/etc-systemd-system /tmp/usr-local-sbin /tmp/usr-local-bin /tmp/etc-sudoers.d /tmp/etc-iptables /tmp/etc-cron.d /tmp/etc-vector /tmp/etc-systemd-system-vector.service.d"
]
}
provisioner "file" {
@@ -132,6 +132,10 @@ 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",