cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reuse the same OneAgent installation on a docker image to different tenants?

thiago_moreira
Newcomer

Hi there,

I'm developing a docker image that will run on a PaaS for several customer (tenants), the thing is the image is the same for all my customer the only thing that I need to change is the tenant (DT_TENANT and DT_TENANTTOKEN).
I can see that the dynatrace-env.sh accepts the user to customize both environment variables the issue that I'm facing is that DT_TENANTTOKEN has a "random" value that I'm not able to recreate. Looks like it is set during the installation script, WHICH I don't want to execute for every new customer that I get!

Who can help me understanding how this value is create?

Thanks

2 REPLIES 2

gautier_begin
Advisor

Hello,

You can set and get this tenant token using this cluster API:

/api/v1.0/control/tenantManagement/tokens/<tenant ID>

The scope in the payload must contain:

"InstallerDownload"

The installation token is given in return in the value tokenId.

Payload example:

{
"scopes": ["DataExport", "MaintenanceWindows","InstallerDownload"],
"label": "Admin_token",
"expirationDurationInSeconds": "60"
}

Regards,

thiago_moreira
Newcomer

I tried the following script without lucky. I get an "Operation timed out"

curl -v -L -XPOST -H "Authorization: Api-Token DT_TOKEN" --header "Content-Type: application/json" --data '{"scopes": ["DataExport", "MaintenanceWindows","InstallerDownload"],"label": "Admin_token","expirationDurationInSeconds": "60"}' https://DT_TENANTID.live.dynatrace.com/api/v1.0/c...DT_TENANTID

Am I doing something wrong?

Featured Posts