From 770a020914a8ccd8e86ff72a7c8044997bbd2bc7 Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 11 Sep 2020 01:46:18 -0400 Subject: [PATCH 01/13] Updated CI tests The following CI tests have been updated: - GitLab CI - Travis CI - GitHub Actions --- .github/workflows/default.yml | 32 +++++++++++------------ .gitlab-ci.yml | 49 ++++++++++++++++++++++++++++++----- .travis.yml | 22 +++++++++------- 3 files changed, 72 insertions(+), 31 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index a1533f4..407024c 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -5,32 +5,32 @@ jobs: build: runs-on: ubuntu-latest strategy: + fail-fast: false max-parallel: 4 matrix: - python-version: [3.5, 3.6, 3.7] + molecule_distro: + - centos7 + - centos8 + - debian8 + - debian9 + - debian10 + - fedora + - ubuntu1604 + - ubuntu1804 + - ubuntu2004 steps: - uses: actions/checkout@v1 - with: - path: ansible-netdata - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python 3 uses: actions/setup-python@v1 with: - python-version: ${{ matrix.python-version }} + python-version: "3.x" - name: Install dependencies run: | - sudo apt install docker - python -m pip install --upgrade pip - pip3 install -r requirements.txt + python -m pip install --upgrade pip pip-tools + pip-sync requirements.txt requirements-dev.txt ansible --version molecule --version - name: Test with molecule run: | - molecule test --scenario-name centos7 - # molecule test --scenario-name centos8 - # molecule test --scenario-name debian8 - molecule test --scenario-name debian9 - molecule test --scenario-name debian10 - # molecule test --scenario-name fedora - molecule test --scenario-name ubuntu1604 - molecule test --scenario-name ubuntu1804 + molecule test --scenario-name ${{ matrix.molecule_distro }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd291d5..7b6d402 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,9 @@ image: docker:git services: - docker:dind +stages: + - molecule-test + before_script: - apk update && apk add --no-cache docker python3-dev py3-pip docker gcc git curl build-base @@ -11,18 +14,52 @@ before_script: musl-dev libffi-dev openssl-dev openssh - docker info - python3 --version - - pip3 install -r requirements.txt + - pip3 install --upgrade pip pip-tools + - pip-sync requirements.txt requirements-dev.txt - ansible --version - molecule --version -molecule: - stage: test +centos7: + stage: molecule-test script: - molecule test --scenario-name centos7 - # - molecule test --scenario-name centos8 - # - molecule test --scenario-name debian8 + +centos8: + stage: molecule-test + script: + - molecule test --scenario-name centos8 + +debian8: + stage: molecule-test + script: + - molecule test --scenario-name debian8 + +debian9: + stage: molecule-test + script: - molecule test --scenario-name debian9 + +debian10: + stage: molecule-test + script: - molecule test --scenario-name debian10 - # - molecule test --scenario-name fedora + +fedora: + stage: molecule-test + script: + - molecule test --scenario-name fedora + +ubuntu1604: + stage: molecule-test + script: - molecule test --scenario-name ubuntu1604 + +ubuntu1804: + stage: molecule-test + script: - molecule test --scenario-name ubuntu1804 + +ubuntu2004: + stage: molecule-test + script: + - molecule test --scenario-name ubuntu2004 diff --git a/.travis.yml b/.travis.yml index 8de2028..0652689 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,18 +5,22 @@ services: - docker before_install: - sudo apt-get -qq update +env: + - molecule_distro=centos7 + - molecule_distro=centos8 + - molecule_distro=debian8 + - molecule_distro=debian9 + - molecule_distro=debian10 + - molecule_distro=fedora + - molecule_distro=ubuntu1604 + - molecule_distro=ubuntu1804 + - molecule_distro=ubuntu2004 install: - - pip3 install -r requirements.txt + - pip3 install --upgrade pip pip-tools + - pip-sync requirements.txt requirements-dev.txt - ansible --version - molecule --version script: - - molecule test --scenario-name centos7 - - molecule test --scenario-name centos8 - # - molecule test --scenario-name debian8 - - molecule test --scenario-name debian9 - - molecule test --scenario-name debian10 - # - molecule test --scenario-name fedora - - molecule test --scenario-name ubuntu1604 - - molecule test --scenario-name ubuntu1804 + - molecule test --scenario-name "$molecule_distro" notifications: webhooks: https://galaxy.ansible.com/api/v1/notifications/ From 074ecfe95c26ab5d4aa9e4d050ac8f0767efb1f2 Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 11 Sep 2020 01:47:13 -0400 Subject: [PATCH 02/13] Python Requirements updated All prod/development Python requirements updated --- requirements-dev.in | 7 ++++ requirements-dev.txt | 28 +++++++++++++++- requirements.in | 8 +++++ requirements.txt | 79 ++++++++++++++++++++++++++++++++++++++++---- 4 files changed, 114 insertions(+), 8 deletions(-) create mode 100644 requirements-dev.in create mode 100644 requirements.in diff --git a/requirements-dev.in b/requirements-dev.in new file mode 100644 index 0000000..b687069 --- /dev/null +++ b/requirements-dev.in @@ -0,0 +1,7 @@ +# Python requirements for development +-c requirements.txt +autopep8 +flake8 +pycodestyle +pylint +tox diff --git a/requirements-dev.txt b/requirements-dev.txt index fd249cb..f639821 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1 +1,27 @@ -# Python requirements for development \ No newline at end of file +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile requirements-dev.in +# +appdirs==1.4.4 # via virtualenv +astroid==2.4.2 # via pylint +autopep8==1.5.4 # via -r requirements-dev.in +distlib==0.3.1 # via virtualenv +filelock==3.0.12 # via tox, virtualenv +flake8==3.8.3 # via -r requirements-dev.in +isort==5.5.2 # via pylint +lazy-object-proxy==1.4.3 # via astroid +mccabe==0.6.1 # via flake8, pylint +packaging==20.4 # via tox +pluggy==0.13.1 # via -c requirements.txt, tox +py==1.9.0 # via tox +pycodestyle==2.6.0 # via -r requirements-dev.in, autopep8, flake8 +pyflakes==2.2.0 # via flake8 +pylint==2.6.0 # via -r requirements-dev.in +pyparsing==2.4.7 # via packaging +six==1.15.0 # via -c requirements.txt, astroid, packaging, tox, virtualenv +toml==0.10.1 # via autopep8, pylint, tox +tox==3.20.0 # via -r requirements-dev.in +virtualenv==20.0.31 # via tox +wrapt==1.12.1 # via astroid diff --git a/requirements.in b/requirements.in new file mode 100644 index 0000000..e6f351e --- /dev/null +++ b/requirements.in @@ -0,0 +1,8 @@ +# Python requirements for executing +ansible +ansible-lint +docker +mkdocs +molecule +pip-tools +yamllint diff --git a/requirements.txt b/requirements.txt index 79c89f1..8e83d2e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,72 @@ -# Python requirements for executing -ansible -ansible-lint -docker -flake8 -molecule -testinfra \ No newline at end of file +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile +# +ansible-lint==4.3.4 # via -r requirements.in +ansible==2.9.13 # via -r requirements.in, ansible-lint, molecule +arrow==0.16.0 # via jinja2-time +bcrypt==3.2.0 # via paramiko +binaryornot==0.4.4 # via cookiecutter +cerberus==1.3.2 # via molecule +certifi==2020.6.20 # via requests +cffi==1.14.2 # via bcrypt, cryptography, pynacl +chardet==3.0.4 # via binaryornot, requests +click-completion==0.5.2 # via molecule +click-help-colors==0.8 # via molecule +click==7.1.2 # via click-completion, click-help-colors, cookiecutter, mkdocs, molecule, nltk, pip-tools, python-gilt +colorama==0.4.3 # via molecule, python-gilt, rich +commonmark==0.9.1 # via rich +cookiecutter==1.7.2 # via molecule +cryptography==3.1 # via ansible, paramiko +docker==4.3.1 # via -r requirements.in +fasteners==0.15 # via python-gilt +future==0.18.2 # via lunr +idna==2.10 # via requests +jinja2-time==0.2.0 # via cookiecutter +jinja2==2.11.2 # via ansible, click-completion, cookiecutter, jinja2-time, mkdocs, molecule +joblib==0.16.0 # via nltk +livereload==2.6.3 # via mkdocs +lunr[languages]==0.5.8 # via mkdocs +markdown==3.2.2 # via mkdocs +markupsafe==1.1.1 # via cookiecutter, jinja2 +mkdocs==1.1.2 # via -r requirements.in +molecule==3.0.8 # via -r requirements.in +monotonic==1.5 # via fasteners +nltk==3.5 # via lunr +paramiko==2.7.2 # via molecule +pathspec==0.8.0 # via yamllint +pexpect==4.8.0 # via molecule +pip-tools==5.3.1 # via -r requirements.in +pluggy==0.13.1 # via molecule +poyo==0.5.0 # via cookiecutter +ptyprocess==0.6.0 # via pexpect +pycparser==2.20 # via cffi +pygments==2.6.1 # via rich +pynacl==1.4.0 # via paramiko +python-dateutil==2.8.1 # via arrow +python-gilt==1.2.3 # via molecule +python-slugify==4.0.1 # via cookiecutter +pyyaml==5.3.1 # via ansible, ansible-lint, mkdocs, molecule, python-gilt, yamllint +regex==2020.7.14 # via nltk +requests==2.24.0 # via cookiecutter, docker +rich==6.1.1 # via ansible-lint +ruamel.yaml.clib==0.2.2 # via ruamel.yaml +ruamel.yaml==0.16.12 # via ansible-lint +sh==1.13.1 # via molecule, python-gilt +shellingham==1.3.2 # via click-completion +six==1.15.0 # via bcrypt, click-completion, cookiecutter, cryptography, docker, fasteners, livereload, lunr, pip-tools, pynacl, python-dateutil, websocket-client +tabulate==0.8.7 # via molecule +text-unidecode==1.3 # via python-slugify +tornado==6.0.4 # via livereload, mkdocs +tqdm==4.48.2 # via nltk +tree-format==0.1.2 # via molecule +typing-extensions==3.7.4.3 # via rich +urllib3==1.25.10 # via requests +websocket-client==0.57.0 # via docker +yamllint==1.24.2 # via -r requirements.in, molecule + +# The following packages are considered to be unsafe in a requirements file: +# pip +# setuptools From 3b137d1dd7ada72ae0fe725ed492b32786eb62cc Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 11 Sep 2020 01:48:19 -0400 Subject: [PATCH 03/13] Linting configs added - Ansible Lint - Flake8 --- .ansible-lint | 1 + .flake8 | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 .ansible-lint create mode 100644 .flake8 diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..e83e308 --- /dev/null +++ b/.ansible-lint @@ -0,0 +1 @@ +skip_list: [] diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..d6f41f5 --- /dev/null +++ b/.flake8 @@ -0,0 +1,2 @@ +[flake8] +exclude = venv/ From 33051c6bf351ff31e404977146bc8ab53fe679f3 Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 11 Sep 2020 01:50:52 -0400 Subject: [PATCH 04/13] Molecule tests updated All Molecule testing scenarios have been updated --- molecule/centos7/molecule.yml | 7 ++++--- molecule/centos8/molecule.yml | 7 ++++--- molecule/debian10/molecule.yml | 7 ++++--- molecule/debian8/molecule.yml | 7 ++++--- molecule/debian9/molecule.yml | 7 ++++--- molecule/fedora/molecule.yml | 7 ++++--- molecule/shared/converge.yml | 1 + molecule/shared/prepare.yml | 8 ++++++++ molecule/ubuntu1604/molecule.yml | 7 ++++--- molecule/ubuntu1804/molecule.yml | 7 ++++--- molecule/ubuntu2004/INSTALL.rst | 22 ++++++++++++++++++++++ molecule/ubuntu2004/molecule.yml | 29 +++++++++++++++++++++++++++++ molecule/ubuntu2004/verify.yml | 9 +++++++++ 13 files changed, 101 insertions(+), 24 deletions(-) create mode 100644 molecule/shared/prepare.yml create mode 100644 molecule/ubuntu2004/INSTALL.rst create mode 100644 molecule/ubuntu2004/molecule.yml create mode 100644 molecule/ubuntu2004/verify.yml diff --git a/molecule/centos7/molecule.yml b/molecule/centos7/molecule.yml index 1ba2b30..faf1f1c 100644 --- a/molecule/centos7/molecule.yml +++ b/molecule/centos7/molecule.yml @@ -15,14 +15,15 @@ platforms: image: jrei/systemd-centos:7 privileged: true command: /usr/sbin/init - tmpfs: - - /run - - /tmp + # tmpfs: + # - /run + # - /tmp volumes: - /sys/fs/cgroup:/sys/fs/cgroup:ro provisioner: name: ansible playbooks: converge: ../shared/converge.yml + prepare: ../shared/prepare.yml verifier: name: ansible diff --git a/molecule/centos8/molecule.yml b/molecule/centos8/molecule.yml index 653fbed..2def2c1 100644 --- a/molecule/centos8/molecule.yml +++ b/molecule/centos8/molecule.yml @@ -15,14 +15,15 @@ platforms: image: jrei/systemd-centos:8 privileged: true command: /usr/sbin/init - tmpfs: - - /run - - /tmp + # tmpfs: + # - /run + # - /tmp volumes: - /sys/fs/cgroup:/sys/fs/cgroup:ro provisioner: name: ansible playbooks: converge: ../shared/converge.yml + prepare: ../shared/prepare.yml verifier: name: ansible diff --git a/molecule/debian10/molecule.yml b/molecule/debian10/molecule.yml index 6d71a55..93a3236 100644 --- a/molecule/debian10/molecule.yml +++ b/molecule/debian10/molecule.yml @@ -15,14 +15,15 @@ platforms: image: jrei/systemd-debian:10 privileged: true command: /lib/systemd/systemd - tmpfs: - - /run - - /tmp + # tmpfs: + # - /run + # - /tmp volumes: - /sys/fs/cgroup:/sys/fs/cgroup:ro provisioner: name: ansible playbooks: converge: ../shared/converge.yml + prepare: ../shared/prepare.yml verifier: name: ansible diff --git a/molecule/debian8/molecule.yml b/molecule/debian8/molecule.yml index 7cff960..f83e98f 100644 --- a/molecule/debian8/molecule.yml +++ b/molecule/debian8/molecule.yml @@ -15,14 +15,15 @@ platforms: image: jrei/systemd-debian:8 privileged: true command: /lib/systemd/systemd - tmpfs: - - /run - - /tmp + # tmpfs: + # - /run + # - /tmp volumes: - /sys/fs/cgroup:/sys/fs/cgroup:ro provisioner: name: ansible playbooks: converge: ../shared/converge.yml + prepare: ../shared/prepare.yml verifier: name: ansible diff --git a/molecule/debian9/molecule.yml b/molecule/debian9/molecule.yml index e71ecd5..390ed2b 100644 --- a/molecule/debian9/molecule.yml +++ b/molecule/debian9/molecule.yml @@ -15,14 +15,15 @@ platforms: image: jrei/systemd-debian:9 privileged: true command: /lib/systemd/systemd - tmpfs: - - /run - - /tmp + # tmpfs: + # - /run + # - /tmp volumes: - /sys/fs/cgroup:/sys/fs/cgroup:ro provisioner: name: ansible playbooks: converge: ../shared/converge.yml + prepare: ../shared/prepare.yml verifier: name: ansible diff --git a/molecule/fedora/molecule.yml b/molecule/fedora/molecule.yml index b1f572d..833308d 100644 --- a/molecule/fedora/molecule.yml +++ b/molecule/fedora/molecule.yml @@ -15,14 +15,15 @@ platforms: image: jrei/systemd-fedora privileged: true command: /usr/sbin/init - tmpfs: - - /run - - /tmp + # tmpfs: + # - /run + # - /tmp volumes: - /sys/fs/cgroup:/sys/fs/cgroup:ro provisioner: name: ansible playbooks: converge: ../shared/converge.yml + prepare: ../shared/prepare.yml verifier: name: ansible diff --git a/molecule/shared/converge.yml b/molecule/shared/converge.yml index a8c40d8..dbdda49 100644 --- a/molecule/shared/converge.yml +++ b/molecule/shared/converge.yml @@ -5,6 +5,7 @@ - name: Include ansible-nodejs include_role: name: ansible-nodejs + - name: Include ansible-netdata include_role: name: ansible-netdata diff --git a/molecule/shared/prepare.yml b/molecule/shared/prepare.yml new file mode 100644 index 0000000..3752daa --- /dev/null +++ b/molecule/shared/prepare.yml @@ -0,0 +1,8 @@ +--- +- hosts: all + tasks: + - name: Update Apt Cache + apt: + update_cache: true + become: true + when: ansible_os_family == "Debian" diff --git a/molecule/ubuntu1604/molecule.yml b/molecule/ubuntu1604/molecule.yml index 41d0dda..8a3360a 100644 --- a/molecule/ubuntu1604/molecule.yml +++ b/molecule/ubuntu1604/molecule.yml @@ -15,14 +15,15 @@ platforms: image: jrei/systemd-ubuntu:16.04 privileged: true command: /lib/systemd/systemd - tmpfs: - - /run - - /tmp + # tmpfs: + # - /run + # - /tmp volumes: - /sys/fs/cgroup:/sys/fs/cgroup:ro provisioner: name: ansible playbooks: converge: ../shared/converge.yml + prepare: ../shared/prepare.yml verifier: name: ansible diff --git a/molecule/ubuntu1804/molecule.yml b/molecule/ubuntu1804/molecule.yml index 7621018..671be5a 100644 --- a/molecule/ubuntu1804/molecule.yml +++ b/molecule/ubuntu1804/molecule.yml @@ -15,14 +15,15 @@ platforms: image: jrei/systemd-ubuntu:18.04 privileged: true command: /lib/systemd/systemd - tmpfs: - - /run - - /tmp + # tmpfs: + # - /run + # - /tmp volumes: - /sys/fs/cgroup:/sys/fs/cgroup:ro provisioner: name: ansible playbooks: converge: ../shared/converge.yml + prepare: ../shared/prepare.yml verifier: name: ansible diff --git a/molecule/ubuntu2004/INSTALL.rst b/molecule/ubuntu2004/INSTALL.rst new file mode 100644 index 0000000..6a44bde --- /dev/null +++ b/molecule/ubuntu2004/INSTALL.rst @@ -0,0 +1,22 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker Engine + +Install +======= + +Please refer to the `Virtual environment`_ documentation for installation best +practices. If not using a virtual environment, please consider passing the +widely recommended `'--user' flag`_ when invoking ``pip``. + +.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ +.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site + +.. code-block:: bash + + $ pip install 'molecule[docker]' diff --git a/molecule/ubuntu2004/molecule.yml b/molecule/ubuntu2004/molecule.yml new file mode 100644 index 0000000..0d17ac9 --- /dev/null +++ b/molecule/ubuntu2004/molecule.yml @@ -0,0 +1,29 @@ +--- +dependency: + name: galaxy + enabled: true + options: + role-file: requirements.yml +driver: + name: docker +lint: | + yamllint . + ansible-lint + flake8 +platforms: + - name: ubuntu2004 + image: jrei/systemd-ubuntu:20.04 + privileged: true + command: /lib/systemd/systemd + # tmpfs: + # - /run + # - /tmp + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:ro +provisioner: + name: ansible + playbooks: + converge: ../shared/converge.yml + prepare: ../shared/prepare.yml +verifier: + name: ansible diff --git a/molecule/ubuntu2004/verify.yml b/molecule/ubuntu2004/verify.yml new file mode 100644 index 0000000..a82dd6f --- /dev/null +++ b/molecule/ubuntu2004/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true From bfd04aec90ad4ef5fa67826d6e6ca5638e16fb86 Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 11 Sep 2020 02:15:50 -0400 Subject: [PATCH 05/13] Fixed Ubuntu 20.04 install Fixes #49 --- defaults/main.yml | 29 -------------------- tasks/main.yml | 2 ++ tasks/set_facts.yml | 67 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 29 deletions(-) create mode 100644 tasks/set_facts.yml diff --git a/defaults/main.yml b/defaults/main.yml index 0bb17d2..74d400c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -27,35 +27,6 @@ netdata_config: true # Defines location of Netdata configuration file netdata_config_file: /etc/netdata/netdata.conf -# Defines pre-requisites for Debian systems -netdata_debian_pre_reqs: - - autoconf-archive - - autoconf - - autogen - - automake - - build-essential - - cron - - curl - - gcc - - git - - libmnl-dev - - libmnl0 - - libssl-dev - - libuuid1 - - libuv1-dev - - lm-sensors - - make - - netcat - - pkg-config - - python-mysqldb - - python-psycopg2 - - python-pymongo - - python-yaml - - util-linux - - uuid - - uuid-dev - - zlib1g-dev - # Defines the Git repo to pull down for installs netdata_git_repo: https://github.com/netdata/netdata.git diff --git a/tasks/main.yml b/tasks/main.yml index fc2b154..3b767b0 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,6 +1,8 @@ --- # tasks file for ansible-netdata +- include_tasks: set_facts.yml + - include: debian.yml when: ansible_os_family == "Debian" diff --git a/tasks/set_facts.yml b/tasks/set_facts.yml new file mode 100644 index 0000000..c647c58 --- /dev/null +++ b/tasks/set_facts.yml @@ -0,0 +1,67 @@ +--- +- name: set_facts | Defining Debian Packages + set_fact: + netdata_debian_pre_reqs: + - autoconf-archive + - autoconf + - autogen + - automake + - build-essential + - cron + - curl + - gcc + - git + - libmnl-dev + - libmnl0 + - libssl-dev + - libuuid1 + - libuv1-dev + - lm-sensors + - make + - netcat + - pkg-config + - python-mysqldb + - python-psycopg2 + - python-pymongo + - python-yaml + - util-linux + - uuid + - uuid-dev + - zlib1g-dev + when: + - ansible_os_family == "Debian" + - ansible_distribution != "Ubuntu" + - ansible_distribution_version is version('20.04', '<') + +- name: set_facts | Defining Debian Packages + set_fact: + netdata_debian_pre_reqs: + - autoconf-archive + - autoconf + - autogen + - automake + - build-essential + - cron + - curl + - gcc + - git + - libmnl-dev + - libmnl0 + - libssl-dev + - libuuid1 + - libuv1-dev + - lm-sensors + - make + - netcat + - pkg-config + - python3-pymysql + - python3-psycopg2 + - python3-pymongo + - python3-yaml + - util-linux + - uuid + - uuid-dev + - zlib1g-dev + when: + - ansible_distribution == "Ubuntu" + - ansible_distribution_version is version('20.04', '>=') From 69a9f60f2e950212ec598276adb16e6ef08637bc Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 11 Sep 2020 02:16:26 -0400 Subject: [PATCH 06/13] Updated Ansible roles requirements --- requirements.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.yml b/requirements.yml index fcc2853..4249ce6 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,2 +1,3 @@ --- -- src: https://www.github.com/mrlesmithjr/ansible-nodejs.git +roles: + - src: https://www.github.com/mrlesmithjr/ansible-nodejs.git From fc685ad8aa5cf3ea67e9889206a4da7c77c5c1db Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 11 Sep 2020 02:16:51 -0400 Subject: [PATCH 07/13] Added skip Ansible lint role name check --- .ansible-lint | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ansible-lint b/.ansible-lint index e83e308..ff32caf 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1 +1,2 @@ -skip_list: [] +skip_list: +- 106 From 3293b627f4ebd71094352a334a820a39b7563560 Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 11 Sep 2020 02:18:57 -0400 Subject: [PATCH 08/13] Disabled Fedora testing Will come back to this later. Fedora support will address issue #11 --- .github/workflows/default.yml | 2 +- .gitlab-ci.yml | 8 ++++---- .travis.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 407024c..1e372bc 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -14,7 +14,7 @@ jobs: - debian8 - debian9 - debian10 - - fedora + # - fedora - ubuntu1604 - ubuntu1804 - ubuntu2004 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b6d402..8785d90 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,10 +44,10 @@ debian10: script: - molecule test --scenario-name debian10 -fedora: - stage: molecule-test - script: - - molecule test --scenario-name fedora +# fedora: +# stage: molecule-test +# script: +# - molecule test --scenario-name fedora ubuntu1604: stage: molecule-test diff --git a/.travis.yml b/.travis.yml index 0652689..4533ce5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ env: - molecule_distro=debian8 - molecule_distro=debian9 - molecule_distro=debian10 - - molecule_distro=fedora + # - molecule_distro=fedora - molecule_distro=ubuntu1604 - molecule_distro=ubuntu1804 - molecule_distro=ubuntu2004 From e680f3adb7b7c47893619c67fc462316cbd317c3 Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 11 Sep 2020 02:19:05 -0400 Subject: [PATCH 09/13] Added change log --- CHANGELOG.md | 429 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 429 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..413fd52 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,429 @@ +commit 3293b627f4ebd71094352a334a820a39b7563560 +Author: Larry Smith Jr +Date: Fri Sep 11 02:18:57 2020 -0400 + + Disabled Fedora testing + + Will come back to this later. Fedora support will address issue #11 + +commit fc685ad8aa5cf3ea67e9889206a4da7c77c5c1db +Author: Larry Smith Jr +Date: Fri Sep 11 02:16:51 2020 -0400 + + Added skip Ansible lint role name check + +commit 69a9f60f2e950212ec598276adb16e6ef08637bc +Author: Larry Smith Jr +Date: Fri Sep 11 02:16:26 2020 -0400 + + Updated Ansible roles requirements + +commit bfd04aec90ad4ef5fa67826d6e6ca5638e16fb86 +Author: Larry Smith Jr +Date: Fri Sep 11 02:15:50 2020 -0400 + + Fixed Ubuntu 20.04 install + + Fixes #49 + +commit 33051c6bf351ff31e404977146bc8ab53fe679f3 +Author: Larry Smith Jr +Date: Fri Sep 11 01:50:52 2020 -0400 + + Molecule tests updated + + All Molecule testing scenarios have been updated + +commit 3b137d1dd7ada72ae0fe725ed492b32786eb62cc +Author: Larry Smith Jr +Date: Fri Sep 11 01:48:19 2020 -0400 + + Linting configs added + + - Ansible Lint + - Flake8 + +commit 074ecfe95c26ab5d4aa9e4d050ac8f0767efb1f2 +Author: Larry Smith Jr +Date: Fri Sep 11 01:47:13 2020 -0400 + + Python Requirements updated + + All prod/development Python requirements updated + +commit 770a020914a8ccd8e86ff72a7c8044997bbd2bc7 +Author: Larry Smith Jr +Date: Fri Sep 11 01:46:18 2020 -0400 + + Updated CI tests + + The following CI tests have been updated: + - GitLab CI + - Travis CI + - GitHub Actions + +commit 06d64bb66479600e6201bfe36d6e56b065d07cc3 +Author: Felix Bechstein +Date: Tue May 26 15:46:16 2020 +0200 + + fix install on EL8 + +commit 7af8e3e7b92e3c2978d9b3c6c9b5f52e0e6970c3 +Author: Larry Smith Jr +Date: Sat Feb 22 00:43:52 2020 -0500 + + Disabled Fedora testing + + - Issues that need to be addressed later + +commit 698968e7017bbbc966ae1a2941d083ce2f1e0ab1 +Author: Larry Smith Jr +Date: Sat Feb 22 00:07:52 2020 -0500 + + Changed Molecule scenarios, tests, etc. + +commit 28b89f420ed34d6dc2f7afdf1bdb5e834b954ef8 +Author: Larry Smith Jr +Date: Sat Feb 22 00:06:36 2020 -0500 + + Updated files, etc. after new structure + +commit a8af449baae441aa7df3b97281413e6eea7cac4e +Author: Larry Smith Jr +Date: Wed Feb 19 11:53:22 2020 -0500 + + New files, etc. from cookiecutter template + +commit 8f8e58d2f7249ee42488b6b4b3ccd4d334a7087e +Author: Larry Smith Jr +Date: Wed Feb 19 11:52:36 2020 -0500 + + Changes made based on new Molecule testing, etc. + + - When testing a few things were uncovered and have been addressed at + this time. + +commit 8ba792745746bc7ce0d7f07ab19b32ab20ea9829 +Author: Larry Smith Jr +Date: Wed Feb 19 11:51:28 2020 -0500 + + Changes made based on implementing cookiecutter template + +commit 691d32487e0d8e9c9d1952d0f73ec8865c7c6b67 +Author: Larry Smith Jr +Date: Wed Feb 19 00:34:35 2020 -0500 + + Replaced previous Molecule testing with new + +commit a6f810256600ea16589a697b6c08838a6be34106 +Author: Gaëtan Duchaussois +Date: Mon Feb 10 16:54:12 2020 +0100 + + Add client tls configuration for streams + +commit 397a64b863c2d808b919512378a30640f73e02cb +Author: Gaëtan Duchaussois +Date: Tue Feb 11 09:48:52 2020 +0100 + + force systemd for Ubuntu 16.04 + +commit 65b4fe5f83890e4dbc252594dad6983346f6b3d1 +Author: Gaëtan Duchaussois +Date: Mon Feb 10 17:09:53 2020 +0100 + + add missing dependencies + +commit 436a8dbe694638d3fb46167f7833614b6b418821 +Author: Gaëtan Duchaussois +Date: Mon Feb 10 18:28:47 2020 +0100 + + CI: remove ubuntu 14.04 support reenable 16.04 support + +commit 8ccc6040a722a919003560312b3ad6d426d6ca26 +Author: Larry Smith Jr +Date: Thu Aug 1 08:02:54 2019 -0400 + + Resolved formatting/task issues with Molecule testing + + - some services needed to be tweaked to account for sysvinit + - linting issues were found and resolved + +commit 01c046a3939bf586a2de6a51c7ded3a1314eeaba +Author: Larry Smith Jr +Date: Thu Aug 1 08:00:47 2019 -0400 + + Added Molecule testing + + - Added Default (Docker) testing + - Added vagrant (Vagrant) testing + +commit d89c224662a82106e341532b7f43cdf2a857acdf +Author: Larry Smith Jr +Date: Thu Aug 1 07:59:35 2019 -0400 + + Removed previous Travis testing methods + +commit 5dfb9a50dd62e20dce76e04c57eb9287e58069fb +Author: Gaëtan Duchaussois +Date: Thu Jul 25 15:11:52 2019 +0200 + + fix template logic for proxy + +commit acb35c700fed298f0aad275bb15079e4435d0e4f +Author: Gaëtan Duchaussois +Date: Mon Jul 22 14:04:24 2019 +0200 + + Feature: a netdata host can be defined as a proxy for streaming + +commit 4e05065736e2ae6fb2caf629aadcfbde040d0741 +Author: Alexandre Garand +Date: Mon Jul 22 17:13:19 2019 +0200 + + define variable to configure repeat frequency of alarms + +commit d7b5c1ed16f78beae2783b29794856b1d8275cce +Author: Alexandre Garand +Date: Tue Jul 23 11:09:21 2019 +0200 + + replace blockinfile task by template task to manage health_alarm_notify.conf and add a variable to manage custom_sender_function + +commit 39c397b456385d197222378faa53c09d3a7fd68a +Author: Paul B +Date: Fri Jul 12 11:30:35 2019 +0200 + + auto-update: don't break existing configurations + +commit dbcc7a56df9f70594c83709ed43a411ade497b58 +Author: Paul B +Date: Thu Jul 11 18:00:59 2019 +0200 + + auto-udpate: since Netdata v1.11 the auto-updater cron is automatic + + Netdata v1.11 now installs the cron by itself and the installer takes + an `--auto-update` option to install the updater script. + +commit 9f6ceff7f4304c3affcf6016b79d08b4d6c74290 +Author: Markus Binsteiner +Date: Wed May 22 16:59:44 2019 +0200 + + Fix for version check logic. did not work on Debian stretch. + +commit 513be125f0515646a3d391b0c9c2cec1c20429c1 +Author: Soumik +Date: Wed Mar 13 10:09:15 2019 -0400 + + Don't use a loop for installing pre-requisites + +commit 61a0dbe347de54c3086f83363de73a0ac60f034a +Author: Soumik +Date: Wed Dec 19 18:32:40 2018 -0500 + + Make web mode configurable + +commit 624f8167c6880b48faf6e6af2321e2ed331771ed +Author: Mickaël PERRIN +Date: Tue Dec 18 06:22:15 2018 +0100 + + [BUGFIX] Notifications are not sent + + Missing permissions on /etc/netdata/health_alarm_notify.conf file + +commit 21e1af7238e4419da98d24a30ac296563dbfe017 +Author: bunchc +Date: Mon Dec 10 10:42:33 2018 -0600 + + Updating netdata git url to fix #23 + + Netdata changed git URLs. This broke auto updating. Uninstalling netdata and reinstalling with the correct URL addresses this. + + This pull fixes #23 + +commit 375b546d1981908e2e4d19379746328d73965dda +Author: Gaëtan Duchaussois +Date: Wed Oct 10 11:33:50 2018 +0200 + + Fix alarm configuration failing when file doesn't exists + +commit 152ad798977348b251774f9dabe66420be803ca6 +Author: John Hogenmiller +Date: Tue Oct 9 08:38:37 2018 -0400 + + Allow restart on failure + + This will cause the service to restart if it gets shut down uncleanly. It will wait 30 seconds between restart attempts + +commit 7fe32b4392addde72cb7a0ebf1e2d5e35963af6f +Author: Gaëtan Duchaussois +Date: Mon Oct 8 17:59:31 2018 +0200 + + really set netdata_hostname in backend and registry + +commit b07e88495f23875707d9885563dfea1e379d9402 +Author: Gaëtan Duchaussois +Date: Wed Oct 3 19:41:15 2018 +0200 + + Allow hostname customisation + +commit fd1724ae622dcd4225e1515e0de280d021e16e6a +Author: Guillaume Grussenmeyer +Date: Wed Aug 29 18:50:53 2018 +0200 + + Added support for specifying master node port for streaming. + +commit cdf12fa35fda8499512e286142313b106bd9f9a9 +Author: Maxime Loliée +Date: Fri Jul 27 11:23:58 2018 +0200 + + Added some new parameters for tunning flood protection + +commit 9d5d82db40ac80722d8c94d302e6db5815ec0e78 +Author: Larry Smith Jr +Date: Mon Apr 30 10:04:56 2018 -0400 + + Resolved Ubuntu 18.04 install + + This resolves #12 + + The iproute package no longer exists in Ubuntu 18.04 default + installation so we needed to exclude installing this package only on + Ubuntu 18.04+. + +commit b2e0c932a534c637f284c91c9e7e4cf82e044062 +Author: Larry Smith Jr +Date: Mon Apr 30 01:04:28 2018 -0400 + + Added Debian Stretch as supported distro + +commit abe5dbfd6bef04107412637f56e01f554e5834b7 +Author: Larry Smith Jr +Date: Mon Apr 30 00:55:42 2018 -0400 + + Disabled Fedora and Ubuntu 18.04 testing + + Fedora support is not available. Issue logged + https://github.com/mrlesmithjr/ansible-netdata/issues/11 + + Ubuntu Bionic(18.04) is failing by trying to install iproute which is + not available. Issue logged for this + https://github.com/mrlesmithjr/ansible-netdata/issues/12 + +commit 49333b4004be45718542d3bf3f6d9dd91cfd8e9d +Author: Larry Smith Jr +Date: Mon Apr 30 00:41:09 2018 -0400 + + Added build status + +commit ec0964157a169daef106dc79b5542c7e581565a8 +Author: Larry Smith Jr +Date: Mon Apr 30 00:40:58 2018 -0400 + + Added cron package as pre-req + + This package should exist anyways but to ensure that it is available we + will install as a pre-req. This was discovered as testing with Travis-CI + because cron is not installed in base container images. + +commit 840ba74f3a2534cb064ea71afcab9181fea40227 +Author: Larry Smith Jr +Date: Mon Apr 30 00:22:00 2018 -0400 + + Implemented new Travis-CI testing + +commit 049ca80f081b86ab348683f5b3b05fd52bdbe097 +Author: Larry Smith Jr +Date: Sat Apr 14 22:27:34 2018 -0400 + + Resolves #10 + +commit 5ed1ff2c63f91277e80bd0ee79f8c74099b4302b +Author: bunchc +Date: Fri Apr 13 13:05:27 2018 -0500 + + Adding configuration for netdata backends. + * defaults/main.yml - added backend configuration variables + * templates/netdata.conf.j2 - Added if/then logic around backend configuration + +commit 1bbdd00354b3ee146c616d97c040290eec9fd212 +Author: Larry Smith Jr +Date: Mon Mar 19 23:35:10 2018 -0400 + + Create LICENSE + +commit 2a6e440982728836db6dceddb53e7b45a3ae5ac6 +Author: Larry Smith Jr +Date: Mon Mar 19 23:33:45 2018 -0400 + + Split example playbook out into it's own file w/reference in README + +commit 868f4f17e8f7584a25d12f64386c25a5f09aa365 +Author: Larry Smith Jr +Date: Mon Mar 19 23:33:22 2018 -0400 + + Cleaned up repo info and added TOC + +commit b88d79cabf224af9067f2d2aa891e38584dc5584 +Author: Larry Smith Jr +Date: Mon Mar 19 23:33:09 2018 -0400 + + Cleaned up Ansible Galaxy meta info + +commit fdad094eb31621faeac52e49e2d00527a32b0822 +Author: Larry Smith Jr +Date: Mon Mar 19 23:32:49 2018 -0400 + + Cleaned formatting of vars and tasks + + Removed single/double quotes where not needed to make code cleaner. Also + changed single quotes to double quotes where they are needed. + +commit 57e651426935598e7c40b1d93c2f323803f4c49c +Author: John H +Date: Wed Feb 21 11:29:32 2018 -0500 + + Alarms customization + +commit b452a5b75826c15c005eada11f4bc5d365f69495 +Author: Sylvester Neau +Date: Wed Jan 3 16:43:21 2018 +0100 + + feat: add Netdata streaming configuration + +commit 2023a45956fad6edfc03b441c0472f08a2c4eba5 +Author: Chris +Date: Mon Jan 29 21:00:05 2018 +0100 + + Fix yaml syntax error. + +commit c8a1b94391b50e3607b5668e5f04e08ba7431658 +Author: Chris +Date: Mon Jan 29 10:44:19 2018 +0100 + + Removed restart handler from forced updater. The update script does that already. + +commit 10df439ae354ae09602930c00721b20605eb27b6 +Author: Chris +Date: Mon Jan 29 10:40:27 2018 +0100 + + Add forced update flag. + +commit 01aaef8a28fb6c825216fb1fe84253bedc7c6723 +Author: Larry Smith Jr +Date: Fri Apr 28 23:01:38 2017 -0400 + + Added CentOS 6/7 functionality + + Signed-off-by: Larry Smith Jr + +commit 13615487c89b40bf9db794d6142b6d68f9402ad3 +Author: Larry Smith Jr +Date: Fri Apr 28 19:15:29 2017 -0400 + + Removed reloading of systemd when using upstart + + Signed-off-by: Larry Smith Jr + +commit 0ee4c8ee1fe94df91630b2e5d75aa91e66cfa6e4 +Author: Larry Smith Jr +Date: Fri Apr 28 19:11:24 2017 -0400 + + first commit From 09931d42bbf23814fb1315d7db03676289b826fa Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 11 Sep 2020 02:19:46 -0400 Subject: [PATCH 10/13] Added Ubuntu 20.04 support --- meta/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/main.yml b/meta/main.yml index bc89fd7..831a265 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -21,6 +21,7 @@ galaxy_info: versions: - bionic - dingo + - focal - precise - trusty - xenial From b1abd0eff2f462df8eaa44a6487d0f9cb7d37c2e Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 11 Sep 2020 10:12:20 -0400 Subject: [PATCH 11/13] Disabled Debian8 testing Debian 8 fails to find libuv1-dev package which should be libuv-dev possibly Not supporting this any longer for testing as we will focus on the 2 most recent major releases --- .github/workflows/default.yml | 2 +- .gitlab-ci.yml | 8 ++++---- .travis.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 1e372bc..057a010 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -11,7 +11,7 @@ jobs: molecule_distro: - centos7 - centos8 - - debian8 + # - debian8 - debian9 - debian10 # - fedora diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8785d90..e39ac90 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,10 +29,10 @@ centos8: script: - molecule test --scenario-name centos8 -debian8: - stage: molecule-test - script: - - molecule test --scenario-name debian8 +# debian8: +# stage: molecule-test +# script: +# - molecule test --scenario-name debian8 debian9: stage: molecule-test diff --git a/.travis.yml b/.travis.yml index 4533ce5..0210597 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ before_install: env: - molecule_distro=centos7 - molecule_distro=centos8 - - molecule_distro=debian8 + # - molecule_distro=debian8 - molecule_distro=debian9 - molecule_distro=debian10 # - molecule_distro=fedora From 8797dfb21d5c74133fcab3927ef756bd5b510b4f Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 11 Sep 2020 10:12:48 -0400 Subject: [PATCH 12/13] Fixed indentation of when conditions --- tasks/set_facts.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tasks/set_facts.yml b/tasks/set_facts.yml index c647c58..604abeb 100644 --- a/tasks/set_facts.yml +++ b/tasks/set_facts.yml @@ -28,10 +28,10 @@ - uuid - uuid-dev - zlib1g-dev - when: - - ansible_os_family == "Debian" - - ansible_distribution != "Ubuntu" - - ansible_distribution_version is version('20.04', '<') + when: + - ansible_os_family == "Debian" + - ansible_distribution != "Ubuntu" + - ansible_distribution_version is version('20.04', '<') - name: set_facts | Defining Debian Packages set_fact: @@ -62,6 +62,6 @@ - uuid - uuid-dev - zlib1g-dev - when: - - ansible_distribution == "Ubuntu" - - ansible_distribution_version is version('20.04', '>=') + when: + - ansible_distribution == "Ubuntu" + - ansible_distribution_version is version('20.04', '>=') From ac6f381dc4847b5925f620f7cf7a43eca9ded214 Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 11 Sep 2020 10:30:33 -0400 Subject: [PATCH 13/13] Fixed conditional for Ubuntu older than 20.04 --- tasks/set_facts.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/set_facts.yml b/tasks/set_facts.yml index 604abeb..73f9015 100644 --- a/tasks/set_facts.yml +++ b/tasks/set_facts.yml @@ -28,10 +28,10 @@ - uuid - uuid-dev - zlib1g-dev - when: - - ansible_os_family == "Debian" - - ansible_distribution != "Ubuntu" - - ansible_distribution_version is version('20.04', '<') + when: > + ansible_distribution == "Debian" or + (ansible_distribution == "Ubuntu" and + ansible_distribution_version is version('20.04', '<')) - name: set_facts | Defining Debian Packages set_fact: