Add ARM64 support

This patch adds support for ARM64 beats.  Unfortunately, Elastic does
not publish any packages, so this points at local builds.  Also, it
looks like Packetbeat fails to builds so for now we just don't do
anything about it on ARM.

Change-Id: I1889ce51f1a4c13c311165b8b76dde7c71ecfa2d
This commit is contained in:
Mohammed Naser 2018-09-22 19:43:14 -04:00
parent 814622cc6c
commit 12c9687437
7 changed files with 84 additions and 10 deletions

View File

@ -25,7 +25,7 @@
tags:
- always
- name: Ensure beat is installed
- name: Ensure beat is installed (x86_64)
package:
name: "{{ auditbeat_distro_packages }}"
state: "{{ elk_package_state | default('present') }}"
@ -34,6 +34,19 @@
until: _package_task is success
retries: 3
delay: 2
when:
- ansible_architecture == 'x86_64'
notify:
- Enable and restart auditbeat
tags:
- package_install
- name: Ensure beat is installed (aarch64)
apt:
deb: 'https://object-storage-ca-ymq-1.vexxhost.net/swift/v1/8709ca2640344a4ba85cba0a1d6eea69/aarch64/auditbeat-6.4.1-arm64.deb'
when:
- ansible_pkg_mgr == 'apt'
- ansible_architecture == 'aarch64'
notify:
- Enable and restart auditbeat
tags:

View File

@ -34,6 +34,19 @@
until: _package_task is success
retries: 3
delay: 2
when:
- ansible_architecture == 'x86_64'
notify:
- Enable and restart filebeat
tags:
- package_install
- name: Ensure beat is installed (aarch64)
apt:
deb: 'https://object-storage-ca-ymq-1.vexxhost.net/swift/v1/8709ca2640344a4ba85cba0a1d6eea69/aarch64/filebeat-6.4.1-arm64.deb'
when:
- ansible_pkg_mgr == 'apt'
- ansible_architecture == 'aarch64'
notify:
- Enable and restart filebeat
tags:

View File

@ -34,6 +34,19 @@
until: _package_task is success
retries: 3
delay: 2
when:
- ansible_architecture == 'x86_64'
notify:
- Enable and restart heartbeat
tags:
- package_install
- name: Ensure beat is installed (aarch64)
apt:
deb: 'https://object-storage-ca-ymq-1.vexxhost.net/swift/v1/8709ca2640344a4ba85cba0a1d6eea69/aarch64/heartbeat-6.4.1-arm64.deb'
when:
- ansible_pkg_mgr == 'apt'
- ansible_architecture == 'aarch64'
notify:
- Enable and restart heartbeat
tags:

View File

@ -43,6 +43,19 @@
until: _package_task is success
retries: 3
delay: 2
when:
- ansible_architecture == 'x86_64'
notify:
- Enable and restart metricbeat
tags:
- package_install
- name: Ensure beat is installed (aarch64)
apt:
deb: 'https://object-storage-ca-ymq-1.vexxhost.net/swift/v1/8709ca2640344a4ba85cba0a1d6eea69/aarch64/metricbeat-6.4.1-arm64.deb'
when:
- ansible_pkg_mgr == 'apt'
- ansible_architecture == 'aarch64'
notify:
- Enable and restart metricbeat
tags:

View File

@ -0,0 +1,23 @@
---
# Copyright 2018, Logan Vig <logan2211@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Versions and SHAs published at https://golang.org/dl/
go_download_version: 1.10.1
go_download_url: "https://dl.google.com/go/{{ go_download_filename }}"
go_download_arch: "{{ go_arch_translation[ansible_architecture] | default(ansible_architecture) }}"
go_download_filename: "go{{ go_download_version }}.linux-{{ go_download_arch }}.tar.gz"
go_arch_translation:
x86_64: amd64
aarch64: arm64

View File

@ -15,9 +15,8 @@
- name: GET go
get_url:
url: "https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz"
dest: "/opt/go1.10.1.linux-amd64.tar.gz"
checksum: "sha256:72d820dec546752e5a8303b33b009079c15c2390ce76d67cf514991646c6127b"
url: "{{ go_download_url }}"
dest: "/opt/{{ go_download_filename }}"
register: _get_task
until: _get_task is success
retries: 3
@ -27,19 +26,19 @@
- name: Create go directory
file:
path: "/opt/go1.10.1"
path: "/opt/go{{ go_download_version }}"
state: directory
- name: Unarchive go
unarchive:
src: "/opt/go1.10.1.linux-amd64.tar.gz"
dest: "/opt/go1.10.1"
src: "/opt/{{ go_download_filename }}"
dest: "/opt/go{{ go_download_version }}"
remote_src: yes
- name: Create go defaults file
copy:
content: |
GOROOT=/opt/go1.10.1/go
GOROOT=/opt/go{{ go_download_version }}/go
GOPATH=/usr/local
PATH=${PATH}:${GOROOT}/bin
dest: /etc/default/go1.10.1
dest: "/etc/default/go{{ go_download_version }}"

View File

@ -15,7 +15,7 @@
- name: Check for go
stat:
path: /opt/go1.10.1/go/bin/go
path: "/opt/go{{ go_download_version }}/go/bin/go"
register: go_path
- include_tasks: go_install.yml