-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Dynatrace/Installer_Script_URL
New OneAgent installation approach
- Loading branch information
Showing
6 changed files
with
59 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
source 'https://rubygems.org' | ||
gem 'kitchen-ansible', '>=0.0.25' | ||
gem 'kitchen-docker', '>=2.3.0' | ||
gem 'kitchen-vagrant', '>=1.2.1' | ||
gem 'test-kitchen', '>=1.4.2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
--- | ||
oneagent_installer_script_url: | ||
# for backward compatibility: | ||
dynatrace_oneagent_cluster_subdomain: | ||
dynatrace_oneagent_environment_id: | ||
dynatrace_oneagent_tenant_token: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,38 @@ | ||
--- | ||
- name: "Download Dynatrace OneAgent" | ||
get_url: | ||
url: "{{ oneagent_installer_script_url }}" | ||
dest: "/tmp/dynatrace-oneagent.sh" | ||
|
||
- name: "Install Dynatrace OneAgent" | ||
shell: "sh /tmp/dynatrace-oneagent.sh" | ||
become: yes | ||
- name: Download Dynatrace OneAgent using token id | ||
block: | ||
- fail: | ||
msg: "The 'dynatrace_oneagent_cluster_subdomain' variable has not been set, it must point to the subdomain of your Dynatrace cluster. Please consult the documentation." | ||
when: (dynatrace_oneagent_cluster_subdomain is undefined) or (dynatrace_oneagent_cluster_subdomain is none) or (dynatrace_oneagent_cluster_subdomain | trim == "") | ||
- fail: | ||
msg: "The 'dynatrace_oneagent_environment_id' variable has not been set, it must contain the Dynatrace tenant id. Please consult the documentation." | ||
when: (dynatrace_oneagent_environment_id is undefined) or (dynatrace_oneagent_environment_id is none) or (dynatrace_oneagent_environment_id | trim == "") | ||
- fail: | ||
msg: "The 'dynatrace_oneagent_tenant_token' variable has not been set, it must contain the Dynatrace tenant token. Please consult the documentation." | ||
when: (dynatrace_oneagent_tenant_token is undefined) or (dynatrace_oneagent_tenant_token is none) or (dynatrace_oneagent_tenant_token | trim == "") | ||
- name: "[Backward Compatibility Task] Download Dynatrace OneAgent (for Dynatrace SaaS)" | ||
get_url: | ||
url: "https://{{ dynatrace_oneagent_environment_id }}.{{ dynatrace_oneagent_cluster_subdomain }}/installer/oneagent/unix/latest/{{ dynatrace_oneagent_tenant_token }}" | ||
dest: "/tmp/dynatrace-oneagent.sh" | ||
when: ("live.dynatrace.com" == dynatrace_oneagent_cluster_subdomain) or ("live.ruxit.com" == dynatrace_oneagent_cluster_subdomain) or ("sprint.dynatracelabs.com" == dynatrace_oneagent_cluster_subdomain) | ||
- name: "[Backward Compatibility Task] Download Dynatrace OneAgent (for Dynatrace Managed)" | ||
get_url: | ||
url: "https://{{ dynatrace_oneagent_cluster_subdomain }}/e/{{ dynatrace_oneagent_environment_id }}/installer/agent/unix/latest/{{ dynatrace_oneagent_tenant_token }}" | ||
dest: "/tmp/dynatrace-oneagent.sh" | ||
when: ("live.dynatrace.com" != dynatrace_oneagent_cluster_subdomain) and ("live.ruxit.com" != dynatrace_oneagent_cluster_subdomain) | ||
when: (oneagent_installer_script_url is undefined) or (oneagent_installer_script_url is none) or (oneagent_installer_script_url | trim == "") | ||
|
||
- name: Download Dynatrace OneAgent using installer script url | ||
block: | ||
- fail: | ||
msg: "The 'oneagent_installer_script_url' variable has not been set, it must contain the Dynatrace OneAgent Installer Script URL. Please consult the documentation." | ||
when: (oneagent_installer_script_url is undefined) or (oneagent_installer_script_url is none) or (oneagent_installer_script_url | trim == "") | ||
- name: "Download Dynatrace OneAgent" | ||
get_url: | ||
url: "{{ oneagent_installer_script_url }}" | ||
dest: "/tmp/dynatrace-oneagent.sh" | ||
when: (oneagent_installer_script_url is defined) and (oneagent_installer_script_url is not none) | ||
|
||
- name: "Install Dynatrace OneAgent" | ||
shell: "sh /tmp/dynatrace-oneagent.sh" | ||
become: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
--- | ||
- hosts: test-kitchen | ||
roles: | ||
- role: Dynatrace.OneAgent | ||
dynatrace_oneagent_environment_id: 123 | ||
dynatrace_oneagent_tenant_token: abc | ||
- role: Dynatrace-OneAgent-Ansible | ||
oneagent_installer_script_url: |