feat(archive): allowing archive options to be overridable
This commit is contained in:
parent
2cb8316edb
commit
2f52af7e18
@ -47,7 +47,6 @@ prometheus-archive-install-{{ name }}:
|
|||||||
{{- format_kwargs(p.pkg.component[name]['archive']) }}
|
{{- format_kwargs(p.pkg.component[name]['archive']) }}
|
||||||
- trim_output: true
|
- trim_output: true
|
||||||
- enforce_toplevel: false
|
- enforce_toplevel: false
|
||||||
- options: --strip-components=1
|
|
||||||
- force: {{ p.force }}
|
- force: {{ p.force }}
|
||||||
- retry: {{ p.retry_option|json }}
|
- retry: {{ p.retry_option|json }}
|
||||||
- require:
|
- require:
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
{%- for name,v in p.pkg.component.items() %}
|
{%- for name,v in p.pkg.component.items() %}
|
||||||
{%- set url = None %}
|
{%- set url = None %}
|
||||||
{%- set dir = name %}
|
{%- set dir = name %}
|
||||||
|
{%- do p.pkg.component[name].get('archive', {}).setdefault('options', '--strip-components=1') %}
|
||||||
{%- if 'version' in v and v.version and 'archive' in v and v.archive and 'uri' in p.pkg %}
|
{%- if 'version' in v and v.version and 'archive' in v and v.archive and 'uri' in p.pkg %}
|
||||||
{%- set uri = '%s/%s/releases/download/%s/%s'|format(p.pkg.uri, name, v.version, name) %}
|
{%- set uri = '%s/%s/releases/download/%s/%s'|format(p.pkg.uri, name, v.version, name) %}
|
||||||
{%- set url = '%s-%s.%s-%s.tar.gz'|format(uri, v.version|replace('v',''), p.kernel, p.arch) %}
|
{%- set url = '%s-%s.%s-%s.tar.gz'|format(uri, v.version|replace('v',''), p.kernel, p.arch) %}
|
||||||
|
@ -53,6 +53,12 @@ control 'prometheus components' do
|
|||||||
describe user('mysqld_exporter') do
|
describe user('mysqld_exporter') do
|
||||||
it { should exist }
|
it { should exist }
|
||||||
end
|
end
|
||||||
|
describe group('prometheus_bigquery_remote_st...') do
|
||||||
|
it { should exist }
|
||||||
|
end
|
||||||
|
describe user('prometheus_bigquery_remote_st...') do
|
||||||
|
it { should exist }
|
||||||
|
end
|
||||||
describe directory('/var/lib/prometheus') do
|
describe directory('/var/lib/prometheus') do
|
||||||
it { should exist }
|
it { should exist }
|
||||||
end
|
end
|
||||||
@ -157,6 +163,23 @@ control 'prometheus components' do
|
|||||||
its('group') { should eq 'root' }
|
its('group') { should eq 'root' }
|
||||||
its('mode') { should cmp '0644' }
|
its('mode') { should cmp '0644' }
|
||||||
end
|
end
|
||||||
|
describe directory('/opt/prometheus/prometheus_bigquery_remote_storage_adapter-v0.4.6') do # rubocop:disable Layout/LineLength
|
||||||
|
it { should exist }
|
||||||
|
its('group') { should eq 'root' }
|
||||||
|
end
|
||||||
|
describe file('/opt/prometheus/prometheus_bigquery_remote_storage_adapter-v0.4.6/prometheus_bigquery_remote_storage_adapter') do # rubocop:disable Layout/LineLength
|
||||||
|
it { should exist }
|
||||||
|
its('group') { should eq 'root' }
|
||||||
|
end
|
||||||
|
describe directory('/var/lib/prometheus/prometheus_bigquery_remote_storage_adapter') do # rubocop:disable Layout/LineLength
|
||||||
|
it { should exist }
|
||||||
|
its('group') { should eq 'prometheus_bigquery_remote_st...' }
|
||||||
|
end
|
||||||
|
describe file("#{service_dir}/prometheus-bigquery-backend.service") do
|
||||||
|
it { should exist }
|
||||||
|
its('group') { should eq 'root' }
|
||||||
|
its('mode') { should cmp '0644' }
|
||||||
|
end
|
||||||
|
|
||||||
describe file('/usr/local/sbin/alertmanager') do
|
describe file('/usr/local/sbin/alertmanager') do
|
||||||
it { should exist }
|
it { should exist }
|
||||||
|
@ -11,6 +11,7 @@ control 'services with a consistent service name on each distro' do
|
|||||||
prometheus-alertmanager
|
prometheus-alertmanager
|
||||||
prometheus-node-exporter
|
prometheus-node-exporter
|
||||||
prometheus-blackbox-exporter
|
prometheus-blackbox-exporter
|
||||||
|
prometheus-bigquery-backend
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
%w[
|
%w[
|
||||||
@ -18,6 +19,7 @@ control 'services with a consistent service name on each distro' do
|
|||||||
alertmanager
|
alertmanager
|
||||||
node_exporter
|
node_exporter
|
||||||
blackbox_exporter
|
blackbox_exporter
|
||||||
|
prometheus-bigquery-backend
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ prometheus:
|
|||||||
- postgres_exporter
|
- postgres_exporter
|
||||||
- mysqld_exporter
|
- mysqld_exporter
|
||||||
- memcached_exporter # not in upstream repo, only archive
|
- memcached_exporter # not in upstream repo, only archive
|
||||||
|
- prometheus_bigquery_remote_storage_adapter
|
||||||
|
|
||||||
exporters:
|
exporters:
|
||||||
node_exporter:
|
node_exporter:
|
||||||
@ -218,6 +219,22 @@ prometheus:
|
|||||||
source: https://github.com/wrouesnel/postgres_exporter/releases/download/v0.8.0/postgres_exporter_v0.8.0_linux-amd64.tar.gz
|
source: https://github.com/wrouesnel/postgres_exporter/releases/download/v0.8.0/postgres_exporter_v0.8.0_linux-amd64.tar.gz
|
||||||
skip_verify: true
|
skip_verify: true
|
||||||
|
|
||||||
|
prometheus_bigquery_remote_storage_adapter:
|
||||||
|
version: v0.4.6
|
||||||
|
service:
|
||||||
|
name: prometheus-bigquery-backend
|
||||||
|
env:
|
||||||
|
- "PROMBQ_DATASET=prometheus"
|
||||||
|
- "PROMBQ_TABLE=metrics_stream"
|
||||||
|
- "PROMBQ_GCP_PROJECT_ID=foobar"
|
||||||
|
archive:
|
||||||
|
official: false
|
||||||
|
name: /opt/prometheus/prometheus_bigquery_remote_storage_adapter
|
||||||
|
options: "--strip-components=0"
|
||||||
|
source: https://github.com/KohlsTechnology/prometheus_bigquery_remote_storage_adapter/releases/download/v0.4.6/prometheus_bigquery_remote_storage_adapter_0.4.6_Linux_x86_64.tar.gz # noqa: 204
|
||||||
|
source_hash: https://github.com/KohlsTechnology/prometheus_bigquery_remote_storage_adapter/releases/download/v0.4.6/checksums.txt
|
||||||
|
source_hash_name: prometheus_bigquery_remote_storage_adapter_0.4.6_Linux_x86_64.tar.gz
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
# 'Alternatives system' priority: zero disables (default)
|
# 'Alternatives system' priority: zero disables (default)
|
||||||
# yamllint disable-line rule:braces
|
# yamllint disable-line rule:braces
|
||||||
|
Loading…
x
Reference in New Issue
Block a user