-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/long-lasting-certificates-openssl
- Loading branch information
Showing
24 changed files
with
203 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
# Ignore all unwanted files from the docker build process | ||
|
||
.git | ||
.git* | ||
*.log | ||
certs/ | ||
**/data/* | ||
|
||
*.md | ||
|
||
tests/ | ||
Dockerfile | ||
|
||
core/data/ | ||
core/build/ | ||
# Exclude unnecessary files from the build context | ||
# This file is meant to be used as a whitelist | ||
|
||
# Exclude everything | ||
* | ||
|
||
# Include the following | ||
!README.md | ||
!LICENSE | ||
!core/src/epicli/.devcontainer/requirements.txt | ||
!core/src/epicli/cli/ | ||
!core/src/epicli/data/ | ||
!core/src/epicli/setup.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# === Build epicli wheel file === | ||
|
||
FROM python:3.7-slim AS build-epicli-wheel | ||
|
||
COPY . /src | ||
WORKDIR /src/core/src/epicli | ||
|
||
RUN python setup.py bdist_wheel | ||
|
||
# === Build final image === | ||
|
||
FROM python:3.7-slim | ||
|
||
ARG USERNAME=epiuser | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
ENV EPICLI_DOCKER_SHARED_DIR=/shared | ||
|
||
COPY --from=build-epicli-wheel /src/core/src/epicli/dist/ /epicli/ | ||
|
||
RUN apt-get update \ | ||
&& apt-get install --no-install-recommends -y \ | ||
gcc libffi-dev make musl-dev openssh-client ruby-full sudo tar unzip vim \ | ||
&& gem install \ | ||
rake rspec_junit_formatter serverspec \ | ||
&& pip install --disable-pip-version-check --no-cache-dir \ | ||
/epicli/epicli-*-py3-none-any.whl \ | ||
\ | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
\ | ||
&& groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ | ||
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME \ | ||
\ | ||
&& mkdir -p $EPICLI_DOCKER_SHARED_DIR \ | ||
&& chown $USERNAME $EPICLI_DOCKER_SHARED_DIR \ | ||
&& chmod g+w $EPICLI_DOCKER_SHARED_DIR | ||
|
||
WORKDIR $EPICLI_DOCKER_SHARED_DIR | ||
|
||
USER $USERNAME | ||
|
||
ENTRYPOINT ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
- hosts: all | ||
tasks: [] | ||
|
||
- hosts: logstash | ||
become: true | ||
become_method: sudo | ||
roles: | ||
- logstash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# Supported HostKey algorithms by order of preference. | ||
HostKey /etc/ssh/ssh_host_ed25519_key | ||
HostKey /etc/ssh/ssh_host_rsa_key | ||
HostKey /etc/ssh/ssh_host_ecdsa_key | ||
#HostKey /etc/ssh/ssh_host_ecdsa_key | ||
|
||
KexAlgorithms [email protected],ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256 | ||
|
||
|
4 changes: 4 additions & 0 deletions
4
core/src/epicli/data/common/ansible/playbooks/roles/logstash/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
versions: | ||
RedHat: "7.8.1" | ||
Debian: "1:7.8.1*" |
23 changes: 23 additions & 0 deletions
23
...c/epicli/data/common/ansible/playbooks/roles/logstash/files/logstash-export.conf.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
input { | ||
elasticsearch { | ||
hosts => "HOST_IP:ES_HTTP_PORT" | ||
ssl => "BOOLEAN" | ||
ca_file => "CA_FILE.pem" | ||
user => "USER" | ||
password => "PASSWORD" | ||
index => "INDEX_NAME" | ||
query => ' | ||
{ | ||
"query": { | ||
"match_all": {} | ||
} | ||
} | ||
' | ||
} | ||
} | ||
output { | ||
csv { | ||
fields => ["FIELDS_TO_EXPORT"] | ||
path => "PATH" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
core/src/epicli/data/common/ansible/playbooks/roles/logstash/tasks/Debian.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- name: Install Logstash package | ||
apt: | ||
name: | ||
- logstash-oss={{ versions[ansible_os_family] }} | ||
update_cache: yes | ||
state: present |
7 changes: 7 additions & 0 deletions
7
core/src/epicli/data/common/ansible/playbooks/roles/logstash/tasks/RedHat.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- name: Install Logstash package | ||
yum: | ||
name: | ||
- logstash-oss-{{ versions[ansible_os_family] }} | ||
update_cache: yes | ||
state: present |
14 changes: 14 additions & 0 deletions
14
core/src/epicli/data/common/ansible/playbooks/roles/logstash/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
- name: Install logstash-oss | ||
include_tasks: "{{ ansible_os_family }}.yml" | ||
|
||
- name: Ensure Logstash is disabled | ||
systemd: | ||
name: logstash | ||
enabled: no | ||
state: stopped | ||
|
||
- name: Provide logstash-export.conf template file | ||
copy: | ||
src: logstash-export.conf.template | ||
dest: /etc/logstash/logstash-export.conf.template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ init-system-helpers | |
jq | ||
libfontconfig1 | ||
logrotate | ||
logstash-oss 1:7.8.1 | ||
netcat | ||
net-tools | ||
nfs-common | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
core/src/epicli/data/common/defaults/configuration/logstash.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
kind: configuration/logstash | ||
title: "Logstash" | ||
name: default | ||
specification: {} |
1 change: 1 addition & 0 deletions
1
core/src/epicli/data/common/validation/configuration/logstash.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$ref: '#/definitions/unvalidated_specification' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.