Merge ~canonical-server/prometheus-snap:prom2-update-to-latest-version into ~canonical-is-sa/prometheus-snap:prometheus2

Proposed by Lucas Kanashiro
Status: Merged
Approved by: Tom Haddon
Approved revision: 0a1f9ccfa25c2e50e98eab1cf0b75cf6fbf5287d
Merged at revision: e9a371e4d2e296014bc79227182263be91e9a5b4
Proposed branch: ~canonical-server/prometheus-snap:prom2-update-to-latest-version
Merge into: ~canonical-is-sa/prometheus-snap:prometheus2
Diff against target: 65 lines (+18/-16)
1 file modified
snapcraft.yaml (+18/-16)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Junien F Approve
Canonical IS Reviewers Pending
Canonical IS SAs Pending
Review via email: mp+388843@code.launchpad.net

Commit message

Update prometheus2 to version 2.20.1

Description of the change

Update prometheus2 snap to the latest version (2.20.1). The Server team is working on prometheus for the LMA stack we want to support, and we noticed the prometheus2 snap is quite outdated. We think we can work together with the IS team to provide and up-to-dated snap. A summary of the proposed changes:

- Update to version 2.20.1
- Build the snap based on core18
- Build the snap for different architectures: amd64, arm64, ppc64el and s390x
- Rewrite part of 'prometheus' parts section
  + Run a set of upstream tests during build time

I have personally played with it locally and AFAICS it looks good, works well. I also built the snap in all 4 architectures here:

https://code.launchpad.net/~lucaskanashiro/+snap/prometheus

Thanks for considering those changes, feedback is appreciated.

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Unable to determine commit message from repository - please click "Set commit message" and enter the commit message manually.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Any feedback?

Revision history for this message
Junien F (axino) wrote :

LGTM, thanks a lot for doing that

review: Approve
Revision history for this message
Tom Haddon (mthaddon) wrote :

Two minor changes via online comments

review: Needs Fixing
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks Junien and Tom! I added a new commit addressing Tom's comments.

Revision history for this message
Tom Haddon (mthaddon) wrote :

LGTM, thx

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision e9a371e4d2e296014bc79227182263be91e9a5b4

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/snapcraft.yaml b/snapcraft.yaml
index bc2afb0..908dcc3 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -1,10 +1,16 @@
1name: prometheus1name: prometheus
2adopt-info: prometheus2version: 2.20.1
3base: core18
3grade: stable4grade: stable
4summary: The Prometheus monitoring system and time series database5summary: The Prometheus monitoring system and time series database
5description: |6description: |
6 Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.7 Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.
7confinement: strict8confinement: strict
9architectures:
10 - build-on: amd64
11 - build-on: arm64
12 - build-on: ppc64el
13 - build-on: s390x
814
9apps:15apps:
10 prometheus:16 prometheus:
@@ -17,31 +23,27 @@ apps:
17 command: 'bin/promtool'23 command: 'bin/promtool'
18plugs:24plugs:
19 content:25 content:
26 interface: content
20 content: promreg27 content: promreg
21 target: $SNAP_DATA/promreg28 target: $SNAP_DATA/promreg
2229
23parts:30parts:
24 go:
25 source-tag: go1.12
26 prometheus:31 prometheus:
27 after: [go]
28 plugin: go32 plugin: go
33 go-channel: 1.14/stable
29 source: https://github.com/prometheus/prometheus.git34 source: https://github.com/prometheus/prometheus.git
35 source-tag: v${SNAPCRAFT_PROJECT_VERSION}
30 go-importpath: github.com/prometheus/prometheus36 go-importpath: github.com/prometheus/prometheus
31 build: |37 build-packages: [build-essential, curl, make, npm]
32 export "GOPATH=$PWD/../go"38 override-build: |
33 cd ../go/src/github.com/prometheus/prometheus/39 npm install yarn -g
34 version="$(git tag -l | grep -v '\-rc' | sort -V | tail -n 1)"40 make common-test-short
35 snap_version=$(echo $version | sed -e s/^v//)
36 snapcraftctl set-version "$snap_version"
37 git checkout tags/$version
38 make build41 make build
39 install: |42 mkdir -p $SNAPCRAFT_PART_INSTALL/bin
40 mkdir $SNAPCRAFT_PART_INSTALL/bin
41 mkdir -p $SNAPCRAFT_PART_INSTALL/etc/prometheus43 mkdir -p $SNAPCRAFT_PART_INSTALL/etc/prometheus
42 cp -p $SNAPCRAFT_PART_INSTALL/../src/promtool $SNAPCRAFT_PART_INSTALL/bin/44 cp -p $SNAPCRAFT_PART_BUILD/promtool $SNAPCRAFT_PART_INSTALL/bin/
43 cp -p $SNAPCRAFT_PART_INSTALL/../src/prometheus $SNAPCRAFT_PART_INSTALL/bin/45 cp -p $SNAPCRAFT_PART_BUILD/prometheus $SNAPCRAFT_PART_INSTALL/bin/
44 cp -p $SNAPCRAFT_PART_INSTALL/../src/documentation/examples/prometheus.yml $SNAPCRAFT_PART_INSTALL/etc/prometheus/prometheus.yml.example46 cp -p $SNAPCRAFT_PART_SRC/documentation/examples/prometheus.yml $SNAPCRAFT_PART_INSTALL/etc/prometheus/prometheus.yml.example
45 snap-wrappers:47 snap-wrappers:
46 plugin: dump48 plugin: dump
47 source: .49 source: .

Subscribers

People subscribed via source and target branches