@@ -80,6 +80,27 @@ variables:
8080 type : number
8181 required : false
8282 default : 18003
83+ oci :
84+ registry :
85+ description : " Package registry url"
86+ type : string
87+ required : false
88+ default : docker.io
89+ variants :
90+ ac_config_field : " oci_registry_urls"
91+ values : [ "docker.io" ]
92+ repository :
93+ description : " Package repository name"
94+ type : string
95+ required : false
96+ default : newrelic/infrastructure-agent-artifacts
97+ variants :
98+ ac_config_field : " oci_repository_urls"
99+ values : [ "newrelic/infrastructure-agent-artifacts" ]
100+ version :
101+ description : " Agent version"
102+ type : string
103+ required : true
83104 k8s :
84105 # HelmChart based sub agents should always have `chart_values`.
85106 chart_values :
@@ -197,6 +218,7 @@ deployment:
197218 NRIA_LOG_ROTATE_MAX_FILES : " 5"
198219 NRIA_CUSTOM_PLUGIN_INSTALLATION_DIR : " ${nr-sub:packages.infra-agent.dir}\\ integrations"
199220 NRIA_SAFE_BIN_DIR : " ${nr-sub:packages.infra-agent.dir}\\ integrations"
221+ # Config folders where integrations and logging configs parsed from local/remote values are stored and looked for.
200222 NRIA_PLUGIN_DIR : " ${nr-sub:filesystem_agent_dir}\\ integrations.d"
201223 NRIA_LOGGING_CONFIGS_DIR : " ${nr-sub:filesystem_agent_dir}\\ logging.d"
202224 NRIA_FLUENT_BIT_EXE_PATH : " ${nr-sub:packages.infra-agent.dir}\\ logging\\ fluent-bit.exe"
@@ -218,6 +240,14 @@ deployment:
218240 http :
219241 path : " /v1/status/health"
220242 port : ${nr-var:health_port}
243+ packages :
244+ infra-agent :
245+ type : tar
246+ download :
247+ oci :
248+ registry : ${nr-var:oci.registry}
249+ repository : ${nr-var:oci.repository}
250+ version : ${nr-var:version}
221251 version :
222252 path : /usr/bin/newrelic-infra
223253 args :
@@ -231,13 +261,24 @@ deployment:
231261 logging.d : ${nr-var:config_logging}
232262 executables :
233263 - id : newrelic-infra
234- path : /usr/bin /newrelic-infra
264+ path : ${nr-sub:packages.infra-agent.dir} /newrelic-infra
235265 args :
236266 - --config
237267 - ${nr-sub:filesystem_agent_dir}/config/newrelic-infra.yaml
238268 env :
269+ # NRIA_AGENT_DIR is needed in order to change the root directory for the agent data on Linux.
270+ # This is useful to make sure that all the data generated by the agent is stored inside the AC managed filesystem directory.
271+ # Otherwise, a user could write data to a folder with lower permissions and potentially escalate privileges.
272+ # For the same reason we are also changing the location of the integration binaries.
273+ NRIA_AGENT_DIR : " ${nr-sub:filesystem_agent_dir}/newrelic-infra"
274+ NRIA_CUSTOM_PLUGIN_INSTALLATION_DIR : " ${nr-sub:packages.infra-agent.dir}/integrations"
275+ NRIA_SAFE_BIN_DIR : " ${nr-sub:packages.infra-agent.dir}/integrations"
276+ # Config folders where integrations and logging configs parsed from local/remote values are stored and looked for.
239277 NRIA_PLUGIN_DIR : " ${nr-sub:filesystem_agent_dir}/integrations.d"
240278 NRIA_LOGGING_CONFIGS_DIR : " ${nr-sub:filesystem_agent_dir}/logging.d"
279+ NRIA_FLUENT_BIT_EXE_PATH : " ${nr-sub:packages.infra-agent.dir}/logging/fluent-bit"
280+ NRIA_FLUENT_BIT_PARSERS_PATH : " ${nr-sub:packages.infra-agent.dir}/logging/parsers.conf"
281+ NRIA_FLUENT_BIT_NR_LIB_PATH : " ${nr-sub:packages.infra-agent.dir}/logging/out_newrelic.so"
241282 NRIA_STATUS_SERVER_ENABLED : true
242283 NRIA_STATUS_SERVER_PORT : " ${nr-var:health_port}"
243284 NR_HOST_ID : " ${nr-ac:host_id}"
0 commit comments