Compare commits

...

10 Commits

Author SHA1 Message Date
b3fba8f4ee feat: use emissary 2024.3.13-stable.821.cec5c78
All checks were successful
arcad/emissary-firmware/pipeline/head This commit looks good
2024-03-13 08:26:54 +00:00
e216c0ddbf feat: use emissary 2024.3.12-stable.1525.b5c36f1
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2024-03-12 15:30:55 +00:00
ede2142b9f feat(x86): use random uuid to generate machine id
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2024-03-08 20:15:11 +01:00
c9bedc3bf8 feat: use emissary 2024.3.4-stable.1803.0b34b48
All checks were successful
arcad/emissary-firmware/pipeline/head This commit looks good
2024-03-04 18:08:24 +00:00
df8872064a feat: use emissary 2024.3.4-stable.1752.ab08d30
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2024-03-04 17:57:14 +00:00
af6c9cfbe6 feat: use emissary 2024.3.4-stable.809.4a1a434
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2024-03-04 08:14:37 +00:00
73159308d1 feat: use emissary 2024.3.3-stable.1740.7671872
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2024-03-03 17:45:41 +00:00
158ef63f36 feat: add configurable agent and claim url for status page
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
ref arcad/emissary#21
2024-03-01 13:24:51 +01:00
64ef4a1b5c feat: use emissary 2024.3.1-stable.1041.8f21313
All checks were successful
arcad/emissary-firmware/pipeline/head This commit looks good
2024-03-01 10:46:27 +00:00
70a31262ee feat: use emissary 2024.2.29-stable.1433.eee7e60
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2024-02-29 15:14:38 +00:00
5 changed files with 10 additions and 5 deletions

View File

@ -1 +1 @@
2024.1.12-stable.1306.79f5301
2024.3.13-stable.821.cec5c78

View File

@ -33,6 +33,8 @@ install-emissary-files: tools/yq/bin/yq tools/upx/bin/upx
tools/yq/bin/yq -i '.agent.controllers.app.downloadDir = "/data/emissary/apps/bundles"' files/etc/emissary/agent.yml
tools/yq/bin/yq -i '.sentry.dsn = "$${EMISSARY_SENTRY_DSN}"' files/etc/emissary/agent.yml
tools/yq/bin/yq -i '.sentry.environment = "$${EMISSARY_SENTRY_ENVIRONMENT}"' files/etc/emissary/agent.yml
tools/yq/bin/yq -i '.agent.controllers.status.claimURL = "$${EMISSARY_CONTROLLERS_STATUS_CLAIM_URL}"' files/etc/emissary/agent.yml
tools/yq/bin/yq -i '.agent.controllers.status.agentURL = "$${EMISSARY_CONTROLLERS_STATUS_AGENT_URL}"' files/etc/emissary/agent.yml
# Copy emissary binary
mkdir -p files/usr/local/bin

View File

@ -3,5 +3,7 @@ package emissary
config main 'agent'
option reconciliation_interval '60'
option server_url 'https://emissary.cadol.es'
option claim_url 'https://emissary.cadol.es/hq/claim/%v'
option agent_url 'https://emissary.cadol.es/hq/agents/%v'
option sentry_dsn ''
option sentry_environment ''

View File

@ -12,12 +12,14 @@ start_service() {
config_get emissary_reconciliation_interval agent 'reconciliation_interval' "60"
config_get emissary_server_url agent 'server_url' "https://emissary.cadol.es"
config_get emissary_agent_claim_url agent 'claim_url' "https://emissary.cadol.es/hq/claim/%v"
config_get emissary_agent_url agent 'agent_url' "https://emissary.cadol.es/hq/agents/%v"
config_get emissary_sentry_dsn agent 'sentry_dsn' ""
config_get emissary_sentry_environment agent 'sentry_environment' ""
local config_file="/etc/emissary/agent.yml"
procd_open_instance emissary-agent
procd_set_param env EMISSARY_SERVER_URL="$emissary_server_url" EMISSARY_RECONCILIATION_INTERVAL="$emissary_reconciliation_interval" EMISSARY_SENTRY_DSN="$emissary_sentry_dsn" EMISSARY_SENTRY_ENVIRONMENT="$emissary_sentry_environment"
procd_set_param env EMISSARY_SERVER_URL="$emissary_server_url" EMISSARY_RECONCILIATION_INTERVAL="$emissary_reconciliation_interval" EMISSARY_SENTRY_DSN="$emissary_sentry_dsn" EMISSARY_SENTRY_ENVIRONMENT="$emissary_sentry_environment" EMISSARY_CONTROLLERS_STATUS_CLAIM_URL="$emissary_agent_claim_url" EMISSARY_CONTROLLERS_STATUS_AGENT_URL="$emissary_agent_url"
procd_set_param command /usr/local/bin/emissary
procd_append_param command --workdir /usr/share/emissary
procd_append_param command --config "$config_file"

View File

@ -11,14 +11,13 @@ main() {
fi
# Accumulate data to create unique machine id
local mac_addresses=$(cat /sys/class/net/*/address | uniq | sort)
local device_uuid=$(dmidecode | grep UUID)
local random_uuid=$(cat /proc/sys/kernel/random/uuid)
# Ensure destination directory
mkdir -p "$(dirname "$machine_id_file")"
# Generate SHA256 hash of data and save it to $machine_id_file
echo "$mac_adresses $device_uuid" | sha256sum | cut -d ' ' -f1 > "$machine_id_file"
echo "$random_uuid" | sha256sum | cut -d ' ' -f1 > "$machine_id_file"
}
main