mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 13:53:15 +00:00
PR#2 of the AWS migration. deploy/ami/: Packer template (Ubuntu 24.04 arm64, uv+py3.12, nginx, awscli v2, CW agent; no swapfile), provisioning-only user-data (userDataCausesReplacement rationale), systemd unit + nginx + CW templates. Incorporates T5 /sh-security-review fixes: langgraph binds 127.0.0.1 (not 0.0.0.0); nginx is the sole ingress proxying only /dashboard/api/ + /webhooks/; ExecStartPre runs fetch-config as root (+) and passes the env arg; the app runs as the unprivileged openswe user reading an openswe-owned 0600 .env. packer validate clean.
55 lines
1.5 KiB
JSON
55 lines
1.5 KiB
JSON
{
|
|
"agent": {
|
|
"metrics_collection_interval": 60,
|
|
"run_as_user": "root"
|
|
},
|
|
"metrics": {
|
|
"namespace": "open-swe/@@OPENSWE_ENV@@",
|
|
"append_dimensions": {
|
|
"InstanceId": "${aws:InstanceId}"
|
|
},
|
|
"metrics_collected": {
|
|
"mem": { "measurement": ["mem_used_percent"] },
|
|
"disk": {
|
|
"measurement": ["used_percent"],
|
|
"resources": ["/"]
|
|
}
|
|
}
|
|
},
|
|
"logs": {
|
|
"logs_collected": {
|
|
"files": {
|
|
"collect_list": [
|
|
{
|
|
"file_path": "/var/log/open-swe/app.log",
|
|
"log_group_name": "/open-swe/@@OPENSWE_ENV@@/app",
|
|
"log_stream_name": "{instance_id}",
|
|
"retention_in_days": 30,
|
|
"timezone": "UTC"
|
|
},
|
|
{
|
|
"file_path": "/var/log/open-swe-user-data.log",
|
|
"log_group_name": "/open-swe/@@OPENSWE_ENV@@/user-data",
|
|
"log_stream_name": "{instance_id}",
|
|
"retention_in_days": 30,
|
|
"timezone": "UTC"
|
|
},
|
|
{
|
|
"file_path": "/var/log/nginx/access.log",
|
|
"log_group_name": "/open-swe/@@OPENSWE_ENV@@/nginx-access",
|
|
"log_stream_name": "{instance_id}",
|
|
"retention_in_days": 30,
|
|
"timezone": "UTC"
|
|
},
|
|
{
|
|
"file_path": "/var/log/nginx/error.log",
|
|
"log_group_name": "/open-swe/@@OPENSWE_ENV@@/nginx-error",
|
|
"log_stream_name": "{instance_id}",
|
|
"retention_in_days": 30,
|
|
"timezone": "UTC"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|