@@ -85,6 +85,27 @@ variables:
8585 type : number
8686 required : false
8787 default : 18003
88+ oci :
89+ registry :
90+ description : " Package registry url"
91+ type : string
92+ required : false
93+ default : docker.io
94+ variants :
95+ ac_config_field : " oci_registry_urls"
96+ values : [ "docker.io" ]
97+ repository :
98+ description : " Package repository name"
99+ type : string
100+ required : false
101+ default : newrelic/infrastructure-agent-artifacts
102+ variants :
103+ ac_config_field : " oci_repository_urls"
104+ values : [ "newrelic/infrastructure-agent-artifacts" ]
105+ version :
106+ description : " Agent version"
107+ type : string
108+ required : true
88109 k8s :
89110 # HelmChart based sub agents should always have `chart_values`.
90111 chart_values :
@@ -197,6 +218,7 @@ deployment:
197218 NRIA_AGENT_DIR : " ${nr-sub:filesystem_agent_dir}\\ newrelic-infra"
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