Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

amazon-ssm-agent: re-add dependency to oem-ec2-compat #1162

Merged
merged 3 commits into from
Aug 4, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,25 @@ src_prepare() {
}

src_compile() {
go_export

# this is replication of commands from the vendor makefile
# but without network activity during build phase
local GO_LDFLAGS="-s -w -extldflags=-Wl,-z,now,-z,relro,-z,defs"
export GOPATH="${WORKDIR}/${PN}-${PV}"
export GO111MODULE="off"
# set agent release version
BRAZIL_PACKAGE_VERSION=${PV} go run ./agent/version/versiongenerator/version-gen.go
BRAZIL_PACKAGE_VERSION=${PV} ${EGO} run ./agent/version/versiongenerator/version-gen.go
# build all the tools
go build -v -ldflags "${GO_LDFLAGS}" -buildmode=pie \
${EGO} build -v -ldflags "${GO_LDFLAGS}" -buildmode=pie \
-o bin/amazon-ssm-agent ./agent || die
go build -v -ldflags "${GO_LDFLAGS}" -buildmode=pie \
${EGO} build -v -ldflags "${GO_LDFLAGS}" -buildmode=pie \
-o bin/ssm-cli ./agent/cli-main || die
go build -v -ldflags "${GO_LDFLAGS}" -buildmode=pie \
${EGO} build -v -ldflags "${GO_LDFLAGS}" -buildmode=pie \
-o bin/ssm-document-worker ./agent/framework/processor/executer/outofproc/worker || die
go build -v -ldflags "${GO_LDFLAGS}" -buildmode=pie \
${EGO} build -v -ldflags "${GO_LDFLAGS}" -buildmode=pie \
-o bin/ssm-session-logger ./agent/session/logging || die
go build -v -ldflags "${GO_LDFLAGS}" -buildmode=pie \
${EGO} build -v -ldflags "${GO_LDFLAGS}" -buildmode=pie \
-o bin/ssm-session-worker ./agent/framework/processor/executer/outofproc/sessionworker || die
}

Expand Down
25 changes: 25 additions & 0 deletions coreos-base/oem-ec2-compat/files/base/base-ec2.ign
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@
{
"name": "coreos-metadata-sshkeys@.service",
"enabled": true
},
{
"name": "amazon-ssm-agent.service",
"enabled": true,
"contents": "[Unit]\nDescription=amazon-ssm-agent\nAfter=network-online.target\n\n[Service]\nType=simple\nWorkingDirectory=/usr/share/oem\nExecStart=/usr/share/oem/amazon-ssm-agent\nKillMode=process\nRestart=on-failure\nRestartForceExitStatus=SIGPIPE\nRestartSec=15min\n\n[Install]\nWantedBy=multi-user.target\n"
}
]
},
"storage": {
"files": [
{
"filesystem": "root",
"path": "/etc/amazon/ssm/amazon-ssm-agent.json",
"contents": {
"source": "oem:///ssm/amazon-ssm-agent.json.template"
},
"mode": 292
},
{
"filesystem": "root",
"path": "/etc/amazon/ssm/seelog.xml",
"contents": {
"source": "oem:///ssm/seelog.xml.template"
},
"mode": 292
}
]
}
Expand Down
7 changes: 1 addition & 6 deletions coreos-base/oem-ec2-compat/oem-ec2-compat-0.1.2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,8 @@ KEYWORDS="amd64 arm64 x86"
IUSE="ec2 openstack brightbox aws_pro"
REQUIRED_USE="^^ ( ec2 openstack brightbox aws_pro )"

# TODO: The AWS SSM Agent is currently too big for the OEM partition
# but if it fits, uncomment the following and revert
# b6abb59c544be13e923a3e7240b5c9395c281fca
#RDEPEND="
# ec2? ( app-emulation/amazon-ssm-agent )
#"
RDEPEND="
ec2? ( app-emulation/amazon-ssm-agent )
aws_pro? (
coreos-base/flatcar-eks
x11-drivers/nvidia-drivers
Expand Down