diff --git a/tests/build.sh b/tests/build.sh new file mode 100755 index 0000000..dcecbb4 --- /dev/null +++ b/tests/build.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +docker build -t alpamon:ubuntu-18.04 -f tests/ubuntu/18.04/Dockerfile . +docker build -t alpamon:ubuntu-20.04 -f tests/ubuntu/20.04/Dockerfile . +docker build -t alpamon:ubuntu-22.04 -f tests/ubuntu/22.04/Dockerfile . + +docker build -t alpamon:debian-10 -f tests/debian/10/Dockerfile . +docker build -t alpamon:debian-11 -f tests/debian/11/Dockerfile . + +docker build -t alpamon:centos-7 -f tests/centos/7/Dockerfile . +docker build -t alpamon:redhat-8 -f tests/redhat/8/Dockerfile . +docker build -t alpamon:redhat-9 -f tests/redhat/9/Dockerfile . \ No newline at end of file diff --git a/tests/centos/7/Dockerfile b/tests/centos/7/Dockerfile new file mode 100644 index 0000000..6c8099c --- /dev/null +++ b/tests/centos/7/Dockerfile @@ -0,0 +1,16 @@ +# Build: docker build -t alpamon:centos-7 -f tests/centos/7/Dockerfile . +# Run: docker run --mount type=bind,source="$(pwd)",target=/opt/alpamon alpamon:centos-7 + +FROM osquery/osquery:5.5.1-centos7 + +RUN yum install -y python3 python3-pip + +WORKDIR /opt/alpamon + +COPY tests/centos/7/alpamon.conf /etc/alpamon/alpamon.conf + +RUN mkdir /var/log/alpamon +RUN --mount=type=bind,source=.,target=.,rw=true \ + /opt/alpamon/setup.py develop + +CMD ["alpamon"] diff --git a/tests/centos/7/alpamon.conf b/tests/centos/7/alpamon.conf new file mode 100644 index 0000000..f08952d --- /dev/null +++ b/tests/centos/7/alpamon.conf @@ -0,0 +1,7 @@ +[server] +url = http://host.docker.internal:8000 +id = 959ae5c7-84b0-4fba-8c1e-5b8a3d6dcadc +key = alpaca + +[logging] +debug = true \ No newline at end of file diff --git a/tests/debian/10/Dockerfile b/tests/debian/10/Dockerfile new file mode 100644 index 0000000..52a66f2 --- /dev/null +++ b/tests/debian/10/Dockerfile @@ -0,0 +1,23 @@ +# Build: docker build -t alpamon:debian-10 -f tests/debian/10/Dockerfile . +# Run: docker run --mount type=bind,source="$(pwd)",target=/opt/alpamon alpamon:debian-10 + +FROM debian:10 + +ENV OSQUERY_KEY=1484120AC4E9F8A1A577AEEE97A80C63C9D8B80B + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-pip python3-setuptools gnupg software-properties-common apt-transport-https +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $OSQUERY_KEY && \ + add-apt-repository 'deb https://pkg.osquery.io/deb deb main' && \ + apt-get update && apt-get install -y --no-install-recommends osquery + +WORKDIR /opt/alpamon + +COPY tests/debian/10/alpamon.conf /etc/alpamon/alpamon.conf + +RUN mkdir /var/log/alpamon +RUN --mount=type=bind,source=.,target=.,rw=true \ + /opt/alpamon/setup.py develop + +CMD ["alpamon"] diff --git a/tests/debian/10/alpamon.conf b/tests/debian/10/alpamon.conf new file mode 100644 index 0000000..1e05f5b --- /dev/null +++ b/tests/debian/10/alpamon.conf @@ -0,0 +1,7 @@ +[server] +url = http://host.docker.internal:8000 +id = d59bc536-2f33-43e0-8d78-bca3ecd91b8e +key = alpaca + +[logging] +debug = true \ No newline at end of file diff --git a/tests/debian/11/Dockerfile b/tests/debian/11/Dockerfile new file mode 100644 index 0000000..1e2abf7 --- /dev/null +++ b/tests/debian/11/Dockerfile @@ -0,0 +1,23 @@ +# Build: docker build -t alpamon:debian-11 -f tests/debian/11/Dockerfile . +# Run: docker run --mount type=bind,source="$(pwd)",target=/opt/alpamon alpamon:debian-11 + +FROM debian:11 + +ENV OSQUERY_KEY=1484120AC4E9F8A1A577AEEE97A80C63C9D8B80B + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-pip python3-setuptools gnupg software-properties-common apt-transport-https +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $OSQUERY_KEY && \ + add-apt-repository 'deb https://pkg.osquery.io/deb deb main' && \ + apt-get update && apt-get install -y --no-install-recommends osquery + +WORKDIR /opt/alpamon + +COPY tests/debian/11/alpamon.conf /etc/alpamon/alpamon.conf + +RUN mkdir /var/log/alpamon +RUN --mount=type=bind,source=.,target=.,rw=true \ + /opt/alpamon/setup.py develop + +CMD ["alpamon"] diff --git a/tests/debian/11/alpamon.conf b/tests/debian/11/alpamon.conf new file mode 100644 index 0000000..53f7121 --- /dev/null +++ b/tests/debian/11/alpamon.conf @@ -0,0 +1,7 @@ +[server] +url = http://host.docker.internal:8000 +id = 71e4e4f9-3553-4554-8695-6425c34eb955 +key = alpaca + +[logging] +debug = true \ No newline at end of file diff --git a/tests/redhat/8/Dockerfile b/tests/redhat/8/Dockerfile new file mode 100644 index 0000000..ebde5b3 --- /dev/null +++ b/tests/redhat/8/Dockerfile @@ -0,0 +1,20 @@ +# Build: docker build -t alpamon:redhat-8 -f tests/redhat/8/Dockerfile . +# Run: docker run --mount type=bind,source="$(pwd)",target=/opt/alpamon alpamon:redhat-8 + +FROM redhat/ubi8 + +RUN yum install -y python3 python3-pip yum-utils +RUN curl -L https://pkg.osquery.io/rpm/GPG | tee /etc/pki/rpm-gpg/RPM-GPG-KEY-osquery && \ + yum-config-manager --add-repo https://pkg.osquery.io/rpm/osquery-s3-rpm.repo && \ + yum-config-manager --enable osquery-s3-rpm-repo && \ + yum install -y osquery + +WORKDIR /opt/alpamon + +COPY tests/redhat/8/alpamon.conf /etc/alpamon/alpamon.conf + +RUN mkdir /var/log/alpamon +RUN --mount=type=bind,source=.,target=.,rw=true \ + /opt/alpamon/setup.py develop + +CMD ["alpamon"] diff --git a/tests/redhat/8/alpamon.conf b/tests/redhat/8/alpamon.conf new file mode 100644 index 0000000..7832e01 --- /dev/null +++ b/tests/redhat/8/alpamon.conf @@ -0,0 +1,7 @@ +[server] +url = http://host.docker.internal:8000 +id = ff79dd66-0cfa-4a29-902a-b023038b12e3 +key = alpaca + +[logging] +debug = true \ No newline at end of file diff --git a/tests/redhat/9/Dockerfile b/tests/redhat/9/Dockerfile new file mode 100644 index 0000000..a4c4fa0 --- /dev/null +++ b/tests/redhat/9/Dockerfile @@ -0,0 +1,20 @@ +# Build: docker build -t alpamon:redhat-9 -f tests/redhat/9/Dockerfile . +# Run: docker run --mount type=bind,source="$(pwd)",target=/opt/alpamon alpamon:redhat-9 + +FROM redhat/ubi9 + +RUN yum install -y python3 python3-pip yum-utils +RUN curl -L https://pkg.osquery.io/rpm/GPG | tee /etc/pki/rpm-gpg/RPM-GPG-KEY-osquery && \ + yum-config-manager --add-repo https://pkg.osquery.io/rpm/osquery-s3-rpm.repo && \ + yum-config-manager --enable osquery-s3-rpm-repo && \ + yum install -y osquery + +WORKDIR /opt/alpamon + +COPY tests/redhat/9/alpamon.conf /etc/alpamon/alpamon.conf + +RUN mkdir /var/log/alpamon +RUN --mount=type=bind,source=.,target=.,rw=true \ + /opt/alpamon/setup.py develop + +CMD ["alpamon"] diff --git a/tests/redhat/9/alpamon.conf b/tests/redhat/9/alpamon.conf new file mode 100644 index 0000000..e12b123 --- /dev/null +++ b/tests/redhat/9/alpamon.conf @@ -0,0 +1,7 @@ +[server] +url = http://host.docker.internal:8000 +id = 97a27261-6029-48b3-89df-b31040a43722 +key = alpaca + +[logging] +debug = true \ No newline at end of file diff --git a/tests/ubuntu/18.04/Dockerfile b/tests/ubuntu/18.04/Dockerfile new file mode 100644 index 0000000..2367134 --- /dev/null +++ b/tests/ubuntu/18.04/Dockerfile @@ -0,0 +1,23 @@ +# Build: docker build -t alpamon:ubuntu-18.04 -f tests/ubuntu/18.04/Dockerfile . +# Run: docker run --mount type=bind,source="$(pwd)",target=/opt/alpamon alpamon:ubuntu-18.04 + +FROM ubuntu:18.04 + +ENV OSQUERY_KEY=1484120AC4E9F8A1A577AEEE97A80C63C9D8B80B + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-pip python3-setuptools gnupg software-properties-common apt-transport-https +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $OSQUERY_KEY && \ + add-apt-repository 'deb https://pkg.osquery.io/deb deb main' && \ + apt-get update && apt-get install -y --no-install-recommends osquery + +WORKDIR /opt/alpamon + +COPY tests/ubuntu/18.04/alpamon.conf /etc/alpamon/alpamon.conf + +RUN mkdir /var/log/alpamon +RUN --mount=type=bind,source=.,target=.,rw=true \ + /opt/alpamon/setup.py develop + +CMD ["alpamon"] diff --git a/tests/ubuntu/18.04/alpamon.conf b/tests/ubuntu/18.04/alpamon.conf new file mode 100644 index 0000000..8dfe0f4 --- /dev/null +++ b/tests/ubuntu/18.04/alpamon.conf @@ -0,0 +1,7 @@ +[server] +url = http://host.docker.internal:8000 +id = 756d1a97-a4ec-4d76-a9a0-688f15416abf +key = alpaca + +[logging] +debug = true \ No newline at end of file diff --git a/tests/ubuntu/20.04/Dockerfile b/tests/ubuntu/20.04/Dockerfile new file mode 100644 index 0000000..5c0c0cf --- /dev/null +++ b/tests/ubuntu/20.04/Dockerfile @@ -0,0 +1,23 @@ +# Build: docker build -t alpamon:ubuntu-20.04 -f tests/ubuntu/20.04/Dockerfile . +# Run: docker run --mount type=bind,source="$(pwd)",target=/opt/alpamon alpamon:ubuntu-20.04 + +FROM ubuntu:20.04 + +ENV OSQUERY_KEY=1484120AC4E9F8A1A577AEEE97A80C63C9D8B80B + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-pip python3-setuptools gnupg software-properties-common apt-transport-https +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $OSQUERY_KEY && \ + add-apt-repository 'deb https://pkg.osquery.io/deb deb main' && \ + apt-get update && apt-get install -y --no-install-recommends osquery + +WORKDIR /opt/alpamon + +COPY tests/ubuntu/20.04/alpamon.conf /etc/alpamon/alpamon.conf + +RUN mkdir /var/log/alpamon +RUN --mount=type=bind,source=.,target=.,rw=true \ + /opt/alpamon/setup.py develop + +CMD ["alpamon"] diff --git a/tests/ubuntu/20.04/alpamon.conf b/tests/ubuntu/20.04/alpamon.conf new file mode 100644 index 0000000..7dbcc4b --- /dev/null +++ b/tests/ubuntu/20.04/alpamon.conf @@ -0,0 +1,7 @@ +[server] +url = http://host.docker.internal:8000 +id = 617cfd44-a25e-4fc7-90e1-bfafe429c649 +key = alpaca + +[logging] +debug = true \ No newline at end of file diff --git a/tests/ubuntu/22.04/Dockerfile b/tests/ubuntu/22.04/Dockerfile new file mode 100644 index 0000000..481a72c --- /dev/null +++ b/tests/ubuntu/22.04/Dockerfile @@ -0,0 +1,23 @@ +# Build: docker build -t alpamon:ubuntu-22.04 -f tests/ubuntu/22.04/Dockerfile . +# Run: docker run --mount type=bind,source="$(pwd)",target=/opt/alpamon alpamon:ubuntu-22.04 + +FROM ubuntu:22.04 + +ENV OSQUERY_KEY=1484120AC4E9F8A1A577AEEE97A80C63C9D8B80B + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-pip python3-setuptools gnupg software-properties-common apt-transport-https +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $OSQUERY_KEY && \ + add-apt-repository 'deb https://pkg.osquery.io/deb deb main' && \ + apt-get update && apt-get install -y --no-install-recommends osquery + +WORKDIR /opt/alpamon + +COPY tests/ubuntu/22.04/alpamon.conf /etc/alpamon/alpamon.conf + +RUN mkdir /var/log/alpamon +RUN --mount=type=bind,source=.,target=.,rw=true \ + /opt/alpamon/setup.py develop + +CMD ["alpamon"] diff --git a/tests/ubuntu/22.04/alpamon.conf b/tests/ubuntu/22.04/alpamon.conf new file mode 100644 index 0000000..a3672f0 --- /dev/null +++ b/tests/ubuntu/22.04/alpamon.conf @@ -0,0 +1,7 @@ +[server] +url = http://host.docker.internal:8000 +id = a7282bea-31d7-4b55-a43e-97e1240c90ab +key = alpaca + +[logging] +debug = true \ No newline at end of file