From 7d199b970ef5534b323a97b1444a307ed5d5835b Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Tue, 21 Apr 2020 06:36:10 +0000 Subject: [PATCH] commit e9056d91a5f1967c73981ab452d0930e2a9babed Merge: 258feab fe1dc9d Author: Thomas Boerger Date: Tue Apr 21 08:26:16 2020 +0200 Merge pull request #11 from promhippie/refactoring Code and project restructuring and upgrade Scaleway SDK --- index.html | 97 +++++++++++++++++++++++++++++++++-------------------- index.xml | 7 ++-- sitemap.xml | 8 ++--- 3 files changed, 68 insertions(+), 44 deletions(-) diff --git a/index.html b/index.html index 5e9cff5..2ccba45 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + @@ -440,16 +440,19 @@

Envrionment variables

PROMETHEUS_SCW_CONFIG
-
Path to Scaleway configuration file, optionally, required for muli credentials
+
Path to Scaleway configuration file, optionally, required for multi credentials

-
PROMETHEUS_SCW_TOKEN
-
Access token for the Scaleway API, required for authentication
+
PROMETHEUS_SCW_ACCESS_KEY
+
Access key for the Scaleway API, required for authentication
+
+
PROMETHEUS_SCW_SECRET_KEY
+
Secret key for the Scaleway API, required for authentication

PROMETHEUS_SCW_ORG
-
Organization for the Scaleway API, required for authentication
+
Organization for the Scaleway API, optionally

-
PROMETHEUS_SCW_REGION
-
Region for the Scaleway API, required for authentication
+
PROMETHEUS_SCW_ZONE
+
Zone for the Scaleway API, optionally

PROMETHEUS_SCW_LOG_LEVEL
Only log messages with given severity, defaults to info
@@ -469,6 +472,12 @@

Envrionment variables

PROMETHEUS_SCW_OUTPUT_REFRESH
Discovery refresh interval in seconds, defaults to 30

+
PROMETHEUS_SCW_CHECK_INSTANCE
+
Enable fetching servers from instance API, defaults to true
+
+
PROMETHEUS_SCW_CHECK_BAREMETAL
+
Enable fetching servers from baremetal API, defaults to true
+

Configuration file

@@ -478,27 +487,51 @@

Configuration file

Labels

@@ -529,22 +562,12 @@

As this project is built with Go you need to install Go first. The installation of Go is out of the scope of this document, please follow the official documentation. After the installation of Go you need to get the sources:

-
go get -d github.com/promhippie/prometheus-scw-sd
-cd $GOPATH/src/github.com/promhippie/prometheus-scw-sd
- -

All required tool besides Go itself are bundled or getting automatically installed within the GOPATH. We are using retool to keep the used tools consistent and dep to manage the dependencies. All commands to build this project are part of our Makefile.

- -
# install retool
-make retool
-
-# sync dependencies
-make sync
+
git clone https://github.com/promhippie/prometheus-scw-sd.git
+cd prometheus-scw-sd/
-# generate code -make generate +

All required tool besides Go itself are bundled by Go modules, all you need is part of the Makfile:

-# build binary -make build
+
make generate build

Finally you should have the binary within the bin/ folder now, give it a try with ./bin/prometheus-scw-sd -h to see all available options.

diff --git a/index.xml b/index.xml index 6f69481..a1ba0a1 100644 --- a/index.xml +++ b/index.xml @@ -6,7 +6,7 @@ Recent content on Prometheus Scaleway SD Hugo -- gohugo.io en-us - Wed, 02 May 2018 00:00:00 +0000 + Wed, 01 Apr 2020 00:00:00 +0000 @@ -25,11 +25,12 @@ First of all we need to prepare a configuration for Prometheus that includes the Building https://promhippie.github.io/prometheus-scw-sd/building/ - Wed, 02 May 2018 00:00:00 +0000 + Wed, 01 Apr 2020 00:00:00 +0000 https://promhippie.github.io/prometheus-scw-sd/building/ As this project is built with Go you need to install Go first. The installation of Go is out of the scope of this document, please follow the official documentation. After the installation of Go you need to get the sources: -go get -d github.com/promhippie/prometheus-scw-sd cd $GOPATH/src/github.com/promhippie/prometheus-scw-sd All required tool besides Go itself are bundled or getting automatically installed within the GOPATH. We are using retool to keep the used tools consistent and dep to manage the dependencies. +git clone https://github.com/promhippie/prometheus-scw-sd.git cd prometheus-scw-sd/ All required tool besides Go itself are bundled by Go modules, all you need is part of the Makfile: +make generate build Finally you should have the binary within the bin/ folder now, give it a try with . diff --git a/sitemap.xml b/sitemap.xml index dc5a2f1..191fbe4 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -9,7 +9,7 @@ https://promhippie.github.io/prometheus-scw-sd/building/ - 2018-05-02T00:00:00+00:00 + 2020-04-01T00:00:00+00:00 @@ -18,13 +18,13 @@ - https://promhippie.github.io/prometheus-scw-sd/categories/ + https://promhippie.github.io/prometheus-scw-sd/ + 2020-04-01T00:00:00+00:00 0 - https://promhippie.github.io/prometheus-scw-sd/ - 2018-05-02T00:00:00+00:00 + https://promhippie.github.io/prometheus-scw-sd/categories/ 0