From 09721aa67086fde4f3cfd05d13b7ba1c4b05d379 Mon Sep 17 00:00:00 2001 From: Samuel Karp Date: Wed, 8 Jul 2020 11:18:35 -0700 Subject: [PATCH] bottlerocket: default filesystem locations Signed-off-by: Sean P. Kelly --- agent/config/config.go | 6 +++--- agent/config/config_unix.go | 6 +++--- agent/ecscni/plugin_linux.go | 2 +- agent/ecscni/plugin_unsupported.go | 2 +- agent/utils/license.go | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/agent/config/config.go b/agent/config/config.go index 38f0d0f..acebb26 100644 --- a/agent/config/config.go +++ b/agent/config/config.go @@ -51,7 +51,7 @@ const ( AgentPrometheusExpositionPort = 51680 // defaultConfigFileName is the default (json-formatted) config file - defaultConfigFileName = "/etc/ecs_container_agent/config.json" + defaultConfigFileName = "/etc/ecs/ecs.config.json" // DefaultClusterName is the name of the default cluster. DefaultClusterName = "default" @@ -118,13 +118,13 @@ const ( minimumNumImagesToDeletePerCycle = 1 // defaultCNIPluginsPath is the default path where cni binaries are located - defaultCNIPluginsPath = "/amazon-ecs-cni-plugins" + defaultCNIPluginsPath = "/usr/libexec/amazon-ecs-agent" // DefaultMinSupportedCNIVersion denotes the minimum version of cni spec required DefaultMinSupportedCNIVersion = "0.3.0" // pauseContainerTarball is the path to the pause container tarball - pauseContainerTarballPath = "/images/amazon-ecs-pause.tar" + pauseContainerTarballPath = "/usr/lib/amazon-ecs-agent/amazon-ecs-pause.tar" // DefaultTaskMetadataSteadyStateRate is set as 40. This is arrived from our benchmarking // results where task endpoint can handle 4000 rps effectively. Here, 100 containers diff --git a/agent/config/config_unix.go b/agent/config/config_unix.go index 6c1254d..3adefaa 100644 --- a/agent/config/config_unix.go +++ b/agent/config/config_unix.go @@ -29,10 +29,10 @@ const ( // AgentCredentialsAddress is used to serve the credentials for tasks. AgentCredentialsAddress = "" // this is left blank right now for net=bridge // defaultAuditLogFile specifies the default audit log filename - defaultCredentialsAuditLogFile = "/log/audit.log" + defaultCredentialsAuditLogFile = "/var/log/ecs/audit.log" // defaultRuntimeStatsLogFile stores the path where the golang runtime stats are periodically logged - defaultRuntimeStatsLogFile = `/log/agent-runtime-stats.log` + defaultRuntimeStatsLogFile = `/var/log/ecs/agent-runtime-stats.log` // DefaultTaskCgroupV1Prefix is default cgroup v1 prefix for ECS tasks DefaultTaskCgroupV1Prefix = "/ecs" @@ -63,7 +63,7 @@ func DefaultConfig() Config { DockerEndpoint: "unix:///var/run/docker.sock", ReservedPorts: []uint16{SSHPort, DockerReservedPort, DockerReservedSSLPort, AgentIntrospectionPort, AgentCredentialsPort}, ReservedPortsUDP: []uint16{}, - DataDir: "/data/", + DataDir: "/var/lib/ecs/data", DataDirOnHost: "/var/lib/ecs", DisableMetrics: BooleanDefaultFalse{Value: ExplicitlyDisabled}, ReservedMemory: 0, diff --git a/agent/ecscni/plugin_linux.go b/agent/ecscni/plugin_linux.go index cb13d41..4acf042 100644 --- a/agent/ecscni/plugin_linux.go +++ b/agent/ecscni/plugin_linux.go @@ -33,7 +33,7 @@ import ( const ( vpcCNIPluginInterfaceType = "vlan" // vpcCNIPluginPath is the path of the cni plugin's log file. - vpcCNIPluginPath = "/log/vpc-branch-eni.log" + vpcCNIPluginPath = "/var/log/ecs/vpc-branch-eni.log" ) // newCNIGuard returns a new instance of CNI guard for the CNI client. diff --git a/agent/ecscni/plugin_unsupported.go b/agent/ecscni/plugin_unsupported.go index e156b75..55d1a3c 100644 --- a/agent/ecscni/plugin_unsupported.go +++ b/agent/ecscni/plugin_unsupported.go @@ -26,7 +26,7 @@ import ( const ( // vpcCNIPluginPath is the path of the cni plugin's log file. - vpcCNIPluginPath = "/log/vpc-branch-eni.log" + vpcCNIPluginPath = "/var/log/ecs/vpc-branch-eni.log" ) // newCNIGuard returns a new instance of CNI guard for the CNI client. diff --git a/agent/utils/license.go b/agent/utils/license.go index 6eccff6..324307c 100644 --- a/agent/utils/license.go +++ b/agent/utils/license.go @@ -24,9 +24,9 @@ type LicenseProvider interface { type licenseProvider struct{} const ( - licenseFile = "LICENSE" - noticeFile = "NOTICE" - thirdPartyFile = "THIRD-PARTY" + licenseFile = "/usr/share/licenses/ecs-agent/LICENSE" + noticeFile = "/usr/share/licenses/ecs-agent/NOTICE" + thirdPartyFile = "/usr/share/licenses/ecs-agent/THIRD-PARTY" ) var readFile = ioutil.ReadFile -- 2.40.1