-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The package repository doesn't have packages for ARM. Let's get packages from our own Github release assets for now. Towards GAME-12059.
- Loading branch information
Showing
4 changed files
with
69 additions
and
17 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
- name: Get latest version from Github | ||
uri: | ||
url: "https://api.github.com/repos/GameAnalytics/carbon-relay-ng/releases/tags/v1.1" | ||
return_content: yes | ||
register: github_response | ||
|
||
- name: Get architecture string | ||
set_fact: | ||
arch_string: "{% if ansible_architecture == 'aarch64' %}arm64{% else %}amd64{% endif %}" | ||
|
||
- name: Get package name | ||
set_fact: | ||
github_binary_filename: "carbon-relay-ng-1.1-1_{{ arch_string }}.deb" | ||
|
||
- name: Set fact about asset URL | ||
set_fact: | ||
binary_asset_url: "{{ github_response.json.assets|json_query(query) }}" | ||
vars: | ||
query: "[?name=='{{ github_binary_filename }}'].url | [0]" | ||
failed_when: not binary_asset_url | ||
|
||
- name: Get Binary asset's location | ||
uri: | ||
url: "{{ binary_asset_url }}" | ||
return_content: no | ||
follow_redirects: none | ||
status_code: 302 | ||
headers: | ||
Accept: "application/octet-stream" | ||
register: assets | ||
|
||
- name: Download binary release | ||
get_url: | ||
url: "{{ assets.location }}" | ||
dest: "/tmp/{{ github_binary_filename }}" | ||
mode: 0644 | ||
|
||
- name: Install carbon-relay-ng from .deb file | ||
apt: | ||
deb: "/tmp/{{ github_binary_filename }}" |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Raintank is the repository provided by the team who develops carbon-relay-ng (GrafanaLabs) | ||
- name: Add https support for apt | ||
apt: | ||
name: apt-transport-https | ||
|
||
- name: Add raintank apt-key | ||
apt_key: | ||
url: https://packagecloud.io/raintank/raintank/gpgkey | ||
|
||
- name: Add raintank apt repository | ||
apt_repository: | ||
repo: "deb https://packagecloud.io/raintank/raintank/ubuntu/ xenial main" | ||
|
||
- name: Install carbon-relay-ng | ||
apt: | ||
name: carbon-relay-ng | ||
update_cache: 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