Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6418d8b
Dont rely on PATH resolution, but re-use the fact stored in the play
dverhelst Oct 5, 2020
26ffa28
Make sure permissions are set.
dverhelst Oct 5, 2020
b664d90
Build in support for an army of Raspberry pies ...
dverhelst Oct 5, 2020
b7948ef
Adding tests for Arm
dverhelst Oct 5, 2020
6b6b8c4
Reset travis to master state
dverhelst Oct 5, 2020
3bdc9cb
Trying explicit include+exclude
dverhelst Oct 5, 2020
220f9bd
Dont forget the packaged ones
dverhelst Oct 5, 2020
da0a731
Fix binary, reduce build time
dverhelst Oct 6, 2020
95b02fc
Try different build
dverhelst Oct 6, 2020
c5142b0
Testing build matrix for travis
dverhelst Oct 6, 2020
936307c
Testing build matrix for travis 2
dverhelst Oct 6, 2020
8588a46
Work in travis with excludes
dverhelst Oct 6, 2020
fc5b189
import various fixes branch for optimal linting
dverhelst Oct 6, 2020
59c049a
Undo changes, not required at this point, but should be addressed. Le…
dverhelst Oct 6, 2020
89e8c76
Merge branch 'various_fixes' into feature/arm_clients
dverhelst Oct 6, 2020
64775df
Adding aarch64 aka arm64 variables
dverhelst Oct 6, 2020
212109c
See if travis truly supports aarch64
dverhelst Oct 6, 2020
17621c2
Cache pip in Travis
dverhelst Oct 6, 2020
039d693
Add cache clearing
dverhelst Oct 6, 2020
3a0e762
Disable arm64v8 for now
dverhelst Oct 11, 2020
3d05376
Merge pull request #1 from fiaasco/master
dverhelst Oct 11, 2020
652a66e
Merge master
dverhelst Oct 11, 2020
ad293ef
Test
dverhelst Oct 22, 2020
84caa0b
Undo
dverhelst Oct 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 40 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---

arch:
- amd64
- arm64

language: python
services: docker

env:
- SCENARIO: default
- SCENARIO: centos
- SCENARIO: ubuntu
- SCENARIO: lamp
- SCENARIO: multiple

# - SCENARIO: clients
# - SCENARIO: lamp
# - SCENARIO: extra_opts
# - SCENARIO: multiple
cache:
pip: true
directories:
- $HOME/.cache/pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log

install:
- pip install -r requirements.txt
Expand All @@ -21,6 +21,35 @@ before_script:
# Rename current directory to allow forked tests to work.
- mv ../$(basename $PWD) ../borgbackup 2>/dev/null || true

env:
- SCENARIO: default
- SCENARIO: centos
- SCENARIO: ubuntu
- SCENARIO: lamp
- SCENARIO: multiple
- SCENARIO: clients_arm
# - SCENARIO: clients
# - SCENARIO: lamp
# - SCENARIO: extra_opts
# - SCENARIO: multiple

jobs:
exclude:
# exclude jobs that should not be run on ARM
- arch: arm64
env: SCENARIO=default
- arch: arm64
env: SCENARIO=centos
- arch: arm64
env: SCENARIO=ubuntu
- arch: arm64
env: SCENARIO=lamp
- arch: arm64
env: SCENARIO=multiple
# exclude jobs that should not be run on AMD64
- arch: amd64
env: SCENARIO=clients_arm

script:
- molecule test --scenario-name $SCENARIO

Expand Down
9 changes: 3 additions & 6 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,19 @@ borgbackup_ssh_key_type: "rsa"
# description: borg backup version to use
# type: string
borgbackup_version: "1.1.10"
# description: checksum type and borg checksum
# type: string
borgbackup_checksum: "sha256:6338d67aad4b5cd327b25ea363e30f0ed4abc425ce2d6a597c75a67a876ef9af"
# description: borg download url
# type: string
borgbackup_download_url: "https://github.com/borgbackup/borg/releases/download/{{ borgbackup_version }}/borg-linux64"

# description: name of binary to execute in scripts for borg backup
# type: string
borgbackup_binary: "borg"

# description: whether to install borg backup from package
# type: bool
borgbackup_install_from_pkg: false

# description: whether to install the EPEL repository (EPEL required to install from package on CentOS)
# type: bool
borgbackup_install_epel: false

# description: name of package to install when borgbackup_install_from_pkg is true
# type: string
borgbackup_package: "borgbackup"
Expand Down
1 change: 1 addition & 0 deletions molecule/clients_arm/Dockerfile.j2
26 changes: 26 additions & 0 deletions molecule/clients_arm/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
*******
Docker driver installation guide
*******

Requirements
============

* General molecule dependencies (see https://molecule.readthedocs.io/en/latest/installation.html)
* Docker Engine
* docker-py
* docker

Install
=======

Ansible < 2.6

.. code-block:: bash
$ sudo pip install docker-py
Ansible >= 2.6

.. code-block:: bash
$ sudo pip install docker
76 changes: 76 additions & 0 deletions molecule/clients_arm/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
driver:
name: docker
lint:
name: yamllint
platforms:
- name: clients-arm32v7-debian-9
image: arm32v7/debian:9
networks:
- name: clients-borg
groups:
- clients
# - name: clients-arm64v8-debian-9
# image: arm64v8/debian:9
# networks:
# - name: clients-borg
# groups:
# - clients
- name: clients-arm32v7-debian-10
image: arm32v7/debian:10
networks:
- name: clients-borg
groups:
- clients
# - name: clients-arm64v8-debian-10
# image: arm64v8/debian:10
# networks:
# - name: clients-borg
# groups:
# - clients
- name: clients-server-arm32v7-debian-10
image: arm32v7/debian:10
networks:
- name: clients-borg
groups:
- borgbackup_servers
provisioner:
name: ansible
config_options:
defaults:
callback_whitelist: profile_tasks
gather_timeout: 30
interpreter_python: auto
jinja2_extensions: jinja2.ext.do
timeout: 30
ssh_connection:
pipelining: true
inventory:
group_vars:
all:
borgbackup_appendonly: true
borgbackup_servers:
- fqdn: clients-server-arm32v7-debian-10
user: borgds
type: normal
home: /var/backup/
pool: repos
options: ""
borgbackup_include:
- "/etc"
- "/root"
- "/var/log"
- "/home"
borgbackup_passphrase: sdfqjqoais
lint:
name: ansible-lint
options:
x: ["204"]
scenario:
name: clients_arm
verifier:
name: testinfra
options:
verbose: true
lint:
name: flake8
1 change: 1 addition & 0 deletions molecule/clients_arm/playbook.yml
1 change: 1 addition & 0 deletions molecule/clients_arm/prepare.yml
1 change: 1 addition & 0 deletions molecule/clients_arm/requirements.yml
1 change: 1 addition & 0 deletions molecule/clients_arm/restore.sh.j2
1 change: 1 addition & 0 deletions molecule/clients_arm/side_effect.yml
1 change: 1 addition & 0 deletions molecule/clients_arm/tests
5 changes: 3 additions & 2 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@
- name: install | set borg binary path
set_fact:
borgbackup_binary: "/usr/local/bin/borg"
borgbackup_architecture: "{{ ansible_machine }}"

- name: install | install borg binary from web
get_url:
dest: "{{ borgbackup_binary }}"
checksum: "{{ borgbackup_checksum }}"
checksum: "{{ borgbackup_release[borgbackup_architecture].checksum[borgbackup_version] }}"
owner: "{{ borgbackup_owner }}"
group: "{{ borgbackup_group }}"
mode: "0755"
url: "{{ borgbackup_download_url }}"
url: "{{ borgbackup_release[borgbackup_architecture].url }}"
21 changes: 21 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---

borgbackup_release:
aarch64:
url: "https://dl.bintray.com/borg-binary-builder/borg-binaries/borg-{{ borgbackup_version }}-arm64"
checksum:
1.1.10: "sha256:feef734f3c07e2f1a2850493652ec289fa2731aa2cd9b292fa92741bc915cbbd"
1.1.11: "sha256:fd6198503312f584506454414530b540fa0f48bd615d2306a9d868da979c7ca0"
1.1.13: "sha256:d942f2815cc6b8acbd6c0f08920160a6e850d9dbb84178af8b72f4eb9e5f9cae"
armv7l:
url: "https://dl.bintray.com/borg-binary-builder/borg-binaries/borg-{{ borgbackup_version }}-armv7"
checksum:
1.1.10: "sha256:b8829eabf31170efec79298a8f106541800337f4172c8452b9ce2384639bee46"
1.1.11: "sha256:60f4c02d22ac423e506dac29d4a7c635d478bf5c0ac9e13fddbe6bb4a862e95f"
1.1.13: "sha256:892485640f324eb99b19c3d042541eff98c8d6441133047e0426fc970c5b6347"
x86_64:
url: "https://github.com/borgbackup/borg/releases/download/{{ borgbackup_version }}/borg-linux64"
checksum:
1.1.10: "sha256:6338d67aad4b5cd327b25ea363e30f0ed4abc425ce2d6a597c75a67a876ef9af"
1.1.11: "sha256:7848d1788b5d7f2ae99a599a87992cab4f01584fe5eb393819fceaecf076433b"
1.1.13: "sha256:60a662bef3669ed16bb29dadf6b59b74ff664f983d5fa71de7f1fb05a4fec7c0"