Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

how to utilize script for installation where tenant url not reachable from agent node. so, we downloaded script but unable to utilize #54

Open
mrvikas24pandey opened this issue Apr 19, 2022 · 3 comments

Comments

@mrvikas24pandey
Copy link

We are getting following error after providing tenant url and access token:
Error: Execution of '/bin/curl https://XXXXXXXXXXXXXXXX/api/v1/deployment/installer/agent/unix/default/latest/?Api-Token=XXXXXXXXXXXXXXXXXXXXXXX=all -o /tmp/Dynatrace-OneAgent-Linux-latest.sh_20220418-23561-d3zgud -fsSLg --max-redirs 5' returned 35: curl: (35) TCP connection reset by peer

Actually in our environment , we cant connect with external url and unable to download installer script.
is there any other way to download script and install the oneagent
Following thing i did but script unable to run
file{'/tmp/Dynatrace-OneAgent-Linux-latest.sh':
source => "puppet:///${installer_script}",

}
. kindly help .

@mrvikas24pandey
Copy link
Author

hello,
any one here to help

@costco-kynelson
Copy link

If agents cannot directly reach the Cluster API and can only reach an Environment ActiveGate or Cluster ActiveGate, use the Environment ActiveGate API endpoint for downloading the installer:

tenant_url => 'https://<ActiveGate_IP_Address:9999>/e/{your-environment-id}',

Note that the ActiveGate needs have REST API module enabled.

The Puppet module does not support overriding the download_link parameter, so you cannot specify an alternative source for the installer.

As a workaround, you can possibly do the following:

You will need to download the agent yourself as the module Archive resource and Exec['install_oneagent'] checks if "${install_dir}\\agent\\agent.state" for the creates parameter to determine if the resource. So the easiest way to workaround is to change the check on the module Archive resource so it skips and doesn't attempt to download the installer with a Puppet resource collector.

# Reconstruct the $filename value used in the module
Archive <| title == $filename' |> {
    creates   => "/tmp/Dynatrace-OneAgent-Linux-latest.sh",
}

file { '/tmp/Dynatrace-OneAgent-Linux-latest.sh':
  ensure   => present,
  source   => 'puppet:///modules/dynatrace/Dynatrace-OneAgent-Linux-latest.sh',
  mode     => '0644',
  owner    => 'root',
  group    => 'root',
} -> class { 'dynatraceoneagent':
    tenant_url  => 'https://{your-environment-id}.live.dynatrace.com',
    paas_token  => '{your-paas-token}',
}

This code is not tested.

You may be better off modifying the module directly to support specifying an alternative source for downloading the installer file over the Archive resource.

@bschonec
Copy link

In my environment, I had to make sure that my machines had the Certificate Authority certificates for my internal CA installed before trying to download the agent. /etc/pki/ca-trust/source/anchors/ is the location on Linux-ish OSs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants