Skip to content

Commit

Permalink
Merge pull request #64 from idealista/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
sorobon authored Feb 3, 2023
2 parents 1ea46ff + 6dcb938 commit f119370
Show file tree
Hide file tree
Showing 15 changed files with 613 additions and 352 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.yml linguist-detectable=true
*.yaml linguist-detectable=true
*.html linguist-detectable=false
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
---
dist: bionic
language: python
python: "3.7"
os: linux
python: "3.9"
sudo: required
services:
- docker
install:
- pip install pipenv
- pipenv sync
env:
jobs:
- MOLECULE_DISTRO=debian:bullseye-slim
- MOLECULE_DISTRO=debian:buster-slim
- MOLECULE_DISTRO=debian:stretch-slim
- MOLECULE_DISTRO=debian:jessie-slim
script:
- pipenv run molecule test --all
- pipenv run molecule test --all --destroy always

notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a ch

## [Unreleased](https://github.com/idealista/prometheus_jmx_exporter_role/tree/develop)

## [2.2.0](https://github.com/idealista/prometheus_jmx_exporter_role/tree/2.2.0)
### Added
- *[#62](https://github.com/idealista/prometheus_jmx_exporter_role/issues/62) Allow to change jmx_exporter_url* @sorobon

## [2.1.2](https://github.com/idealista/prometheus_jmx_exporter_role/tree/2.1.2)
### Fixed
- *[#52](https://github.com/idealista/prometheus_jmx_exporter_role/issues/52) Fixed systemd unit file* @frantsao
Expand Down
14 changes: 8 additions & 6 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
name = "pypi"

[packages]
ansible = "==2.9.9"
molecule = "==3.0.4"
docker = "==4.1.0"
ansible = "==5.0.1"
molecule = "==3.5.2"
molecule-docker = "==1.1.0"
docker = "==4.4.4"
ansible-lint = "==4.2.0"
yamllint = "==1.29.0"

[dev-packages]

[requires]
python_version = "3"
878 changes: 556 additions & 322 deletions Pipfile.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jmx_exporter_jar_path: "{{ jmx_exporter_root_directory }}/{{ jmx_exporter_jar_fi
jmx_exporter_conf_directory: /etc/jmx_exporter
jmx_exporter_conf_file: "jmx_config.yml"
jmx_exporter_conf_path: "{{ jmx_exporter_conf_directory }}/{{ jmx_exporter_conf_file }}"
jmx_exporter_url: "{{ jmx_exporter_default_url }}"

# If you need output to a file, you can use file:{{ jmx_exporter_log_path }}/{{ jmx_exporter_log_file }}, append:..., rsyslog and other
# # options in Debian 10 (see https://www.freedesktop.org/software/systemd/man/systemd.exec.html)
Expand Down
3 changes: 1 addition & 2 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ galaxy_info:
platforms:
- name: Debian
versions:
- jessie
- stretch
- buster
- bullseye
galaxy_tags:
- monitoring
17 changes: 13 additions & 4 deletions molecule/custom_configuration/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# Molecule managed

{% if item.registry is defined %}
FROM {{ item.registry.url }}/{{ item.image }}
FROM --platform=linux/amd64 {{ item.registry.url }}/{{ item.image }}
{% else %}
FROM {{ item.image }}
FROM --platform=linux/amd64 {{ item.image }}
{% endif %}

# install minimal packages for debian slim images
{% if 'bullseye' in item.image %}
RUN apt-get update && \
apt-get install -y python sudo bash ca-certificates iproute2 systemd systemd-sysv python-pip && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y python3 sudo bash ca-certificates iproute2 systemd systemd-sysv python3-pip python3-lxml && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 0 &&\
apt-get clean
RUN mkdir -p /usr/share/man/man1
{% else %}
RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y -q python3 sudo bash ca-certificates iproute2 systemd systemd-sysv python3-lxml && \
apt-get clean
{% endif %}

STOPSIGNAL SIGRTMIN+3
RUN systemctl set-default multi-user.target
2 changes: 1 addition & 1 deletion molecule/custom_configuration/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ platforms:
- name: jmxexporter
groups:
- jmxexporter
image: ${MOLECULE_DISTRO:-debian:buster-slim}
image: ${MOLECULE_DISTRO:-debian:bullseye-slim}
privileged: false
capabilities:
- SYS_ADMIN
Expand Down
2 changes: 1 addition & 1 deletion molecule/custom_configuration/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
- src: idealista.java_role
version: 5.1.0
version: 8.0.0
name: java_role
17 changes: 13 additions & 4 deletions molecule/default/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# Molecule managed

{% if item.registry is defined %}
FROM {{ item.registry.url }}/{{ item.image }}
FROM --platform=linux/amd64 {{ item.registry.url }}/{{ item.image }}
{% else %}
FROM {{ item.image }}
FROM --platform=linux/amd64 {{ item.image }}
{% endif %}

# install minimal packages for debian slim images
{% if 'bullseye' in item.image %}
RUN apt-get update && \
apt-get install -y python sudo bash ca-certificates iproute2 systemd systemd-sysv python-pip && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y python3 sudo bash ca-certificates iproute2 systemd systemd-sysv python3-pip python3-lxml && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 0 &&\
apt-get clean
RUN mkdir -p /usr/share/man/man1
{% else %}
RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y -q python3 sudo bash ca-certificates iproute2 systemd systemd-sysv python3-lxml && \
apt-get clean
{% endif %}

STOPSIGNAL SIGRTMIN+3
RUN systemctl set-default multi-user.target
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ platforms:
- name: jmxexporter
groups:
- jmxexporter
image: ${MOLECULE_DISTRO:-debian:buster-slim}
image: ${MOLECULE_DISTRO:-debian:bullseye-slim}
privileged: false
capabilities:
- SYS_ADMIN
Expand Down
2 changes: 1 addition & 1 deletion molecule/default/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
- src: idealista.java_role
version: 5.1.0
version: 8.0.0
name: java_role
8 changes: 5 additions & 3 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
ansible==2.9.9
ansible==5.0.1
molecule==3.5.2
molecule-docker==1.1.0
docker==4.4.4
ansible-lint==4.2.0
molecule==3.0.4
docker==4.1.0
yamllint==1.29.0
2 changes: 1 addition & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

jmx_exporter_bin_name: "jmx_prometheus_httpserver-{{ jmx_exporter_version }}-jar-with-dependencies.jar"
jmx_exporter_url: "https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_httpserver/{{ jmx_exporter_version }}/{{ jmx_exporter_bin_name }}"
jmx_exporter_default_url: "https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_httpserver/{{ jmx_exporter_version }}/{{ jmx_exporter_bin_name }}"

jmx_exporter_jar_file: "jmx_exporter.jar"
jmx_exporter_main_class: "io.prometheus.jmx.WebServer"

0 comments on commit f119370

Please sign in to comment.