From 58719b60f8aa9ba7779261303a43e9b49985b9d2 Mon Sep 17 00:00:00 2001 From: rfaircloth-splunk Date: Fri, 7 Feb 2020 10:28:02 -0500 Subject: [PATCH] cleanup --- .env.template | 15 ----- demo-with-compose.sh | 4 +- docker-compose-ci.yml | 65 ------------------ docker-compose-debug.yml | 53 --------------- docker-compose-demo.yml | 66 ------------------- test-with-compose.sh | 3 +- tests/docker-compose-ci.yml | 5 -- .../docker-compose-script.yml | 28 ++++---- 8 files changed, 18 insertions(+), 221 deletions(-) delete mode 100644 .env.template delete mode 100644 docker-compose-ci.yml delete mode 100644 docker-compose-debug.yml delete mode 100644 docker-compose-demo.yml rename docker-compose.yml => tests/docker-compose-script.yml (78%) diff --git a/.env.template b/.env.template deleted file mode 100644 index b795fde..0000000 --- a/.env.template +++ /dev/null @@ -1,15 +0,0 @@ -#Splunk Connect for Syslog (SC4S) by Splunk, Inc. -# -#To the extent possible under law, the person who associated CC0 with -#Splunk Connect for Syslog (SC4S) has waived all copyright and related or neighboring rights -#to Splunk Connect for Syslog (SC4S). -# -#You should have received a copy of the CC0 legalcode along with this -#work. If not, see . -SPLUNK_HEC_TOKEN=a778f63a-5dff-4e3c-a72c-a03183659e94 -SPLUNK_PASSWORD=Changed@11 -SPLUNK_START_ARGS=--accept-license -SPLUNK_HEC_URL=https://splunk:8088/services/collector/event -#SPLUNK_APPS_URL=https://splunkbase.splunk.com/app/2757/release/6.1.1/download,https://splunkbase.splunk.com/app/3245/release/1.0/download,https://splunkbase.splunk.com/app/1620/release/3.4.0/download,https://splunkbase.splunk.com/app/1467/release/2.5.8/download,https://splunkbase.splunk.com/app/2846/release/1.6.0/download,https://splunkbase.splunk.com/app/2847/release/1.2.0/download -#SPLUNKBASE_USERNAME=username -#SPLUNKBASE_PASSWORD=password diff --git a/demo-with-compose.sh b/demo-with-compose.sh index 15eb88a..804ee8e 100755 --- a/demo-with-compose.sh +++ b/demo-with-compose.sh @@ -4,7 +4,7 @@ #Use of this source code is governed by a BSD-2-clause-style #license that can be found in the LICENSE-BSD2 file or at #https://opensource.org/licenses/BSD-2-Clause -docker-compose -f tests/docker-compose-ci.yml build -docker-compose -f tests/docker-compose-ci.yml up +docker-compose -f tests/docker-compose-script.yml build +docker-compose -f tests/docker-compose-script.yml up EXIT=$0 diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml deleted file mode 100644 index 39ac90f..0000000 --- a/docker-compose-ci.yml +++ /dev/null @@ -1,65 +0,0 @@ -#Splunk Connect for Syslog (SC4S) by Splunk, Inc. -# -#To the extent possible under law, the person who associated CC0 with -#Splunk Connect for Syslog (SC4S) has waived all copyright and related or neighboring rights -#to Splunk Connect for Syslog (SC4S). -# -#You should have received a copy of the CC0 legalcode along with this -#work. If not, see . -version: "3.7" -services: - test: - build: ./tests - entrypoint: - - /entrypoint.sh - - --splunk_type=external - - --splunk_host=splunk - - --splunk_password=${SPLUNK_PASSWORD} - - --sc4s_host=sc4s - links: - - splunk - - sc4s - volumes: - - sc4s-results:/work/test-results - - sc4s: - image: ${REGISTRY}/${CI_IMAGE}:${CIRCLE_SHA1} - hostname: sc4s - ports: - - "514" - - "601" - - "514/udp" - - "5000" - - "5000/udp" - stdin_open: true - tty: true - links: - - splunk - environment: - - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - - SPLUNK_CONNECT_METHOD=${SPLUNK_CONNECT_METHOD} - - SPLUNK_DEFAULT_INDEX=${SPLUNK_DEFAULT_INDEX} - - SPLUNK_METRICS_INDEX=${SPLUNK_DEFAULT_INDEX} - - SC4S_DEST_SPLUNK_HEC_TLS_VERIFY=no - - SC4S_LISTEN_JUNIPER_NETSCREEN_TCP_PORT=5000 - - SC4S_LISTEN_PFSENSE_TCP_PORT=5006 - - splunk: - build: - context: splunk - hostname: splunk - ports: - - "8000:8000" - - "8088:8088" - - "8089:8089" - environment: - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - - SPLUNK_PASSWORD=${SPLUNK_PASSWORD} - - SPLUNK_START_ARGS=${SPLUNK_START_ARGS} - - SPLUNK_APPS_URL=${SPLUNK_APPS_URL} - - SPLUNKBASE_USERNAME=${SPLUNKBASE_USERNAME} - - SPLUNKBASE_PASSWORD=${SPLUNKBASE_PASSWORD} -volumes: - sc4s-results: - external: true diff --git a/docker-compose-debug.yml b/docker-compose-debug.yml deleted file mode 100644 index ee8d0e0..0000000 --- a/docker-compose-debug.yml +++ /dev/null @@ -1,53 +0,0 @@ -#Splunk Connect for Syslog (SC4S) by Splunk, Inc. -# -#To the extent possible under law, the person who associated CC0 with -#Splunk Connect for Syslog (SC4S) has waived all copyright and related or neighboring rights -#to Splunk Connect for Syslog (SC4S). -# -#You should have received a copy of the CC0 legalcode along with this -#work. If not, see . -version: "3.2" -services: - - sc4s: - image: splunk/scs:latest - build: - context: ./package - entrypoint: - - "tail" - - "-f" - - "/dev/null" - hostname: sc4s - ports: - - "514" - - "601" - - "514/udp" - - "5514" - - "5514/udp" - stdin_open: true - tty: true - links: - - splunk - environment: - - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - - SPLUNK_CONNECT_METHOD=${SPLUNK_CONNECT_METHOD} - - SPLUNK_DEFAULT_INDEX=${SPLUNK_DEFAULT_INDEX} - - SPLUNK_METRICS_INDEX=${SPLUNK_DEFAULT_INDEX} - - SC4S_DEST_SPLUNK_HEC_TLS_VERIFY=no - splunk: - image: splunk/splunk:latest - hostname: splunk - ports: - - "8000:8000" - - "8088:8088" - - "8089:8089" - environment: - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - - SPLUNK_PASSWORD=${SPLUNK_PASSWORD} - - SPLUNK_START_ARGS=${SPLUNK_START_ARGS} - - SPLUNK_APPS_URL=${SPLUNK_APPS_URL} - - SPLUNKBASE_USERNAME=${SPLUNKBASE_USERNAME} - - SPLUNKBASE_PASSWORD=${SPLUNKBASE_PASSWORD} - volumes: - - ./splunk/SA-syslog-ng:/opt/splunk/etc/apps/SA-syslog-ng diff --git a/docker-compose-demo.yml b/docker-compose-demo.yml deleted file mode 100644 index 3934fe1..0000000 --- a/docker-compose-demo.yml +++ /dev/null @@ -1,66 +0,0 @@ -#Splunk Connect for Syslog (SC4S) by Splunk, Inc. -# -#To the extent possible under law, the person who associated CC0 with -#Splunk Connect for Syslog (SC4S) has waived all copyright and related or neighboring rights -#to Splunk Connect for Syslog (SC4S). -# -#You should have received a copy of the CC0 legalcode along with this -#work. If not, see . -version: "3.2" -services: - test: - build: ./tests - links: - - splunk - - sc4s - volumes: - - sc4s-tests:/work/tests - - sc4s-results:/work/test-results - environment: - - SPLUNK_PASSWORD=${SPLUNK_PASSWORD} - - sc4s: - image: splunk/scs:latest - hostname: sc4s - ports: - - "514" - - "601" - - "514/udp" - - "5514" - - "5514/udp" - stdin_open: true - tty: true - links: - - splunk - environment: - - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - - SPLUNK_CONNECT_METHOD=${SPLUNK_CONNECT_METHOD} - - SPLUNK_DEFAULT_INDEX=${SPLUNK_DEFAULT_INDEX} - - SPLUNK_METRICS_INDEX=${SPLUNK_DEFAULT_INDEX} - - SC4S_DEST_SPLUNK_HEC_TLS_VERIFY=no - - SC4S_LISTEN_JUNIPER_NETSCREEN_TCP_PORT=5000 - splunk: - image: splunk/splunk:latest - hostname: splunk - ports: - - "8000:8000" - - "8088:8088" - - "8089:8089" - environment: - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - - SPLUNK_PASSWORD=${SPLUNK_PASSWORD} - - SPLUNK_START_ARGS=${SPLUNK_START_ARGS} - - SPLUNK_APPS_URL=${SPLUNK_APPS_URL} - - SPLUNKBASE_USERNAME=${SPLUNKBASE_USERNAME} - - SPLUNKBASE_PASSWORD=${SPLUNKBASE_PASSWORD} - volumes: - - splunk-etc:/opt/splunk/etc - -volumes: - sc4s-tests: - external: true - sc4s-results: - external: true - splunk-etc: - external: true diff --git a/test-with-compose.sh b/test-with-compose.sh index 50e25b9..47911fb 100755 --- a/test-with-compose.sh +++ b/test-with-compose.sh @@ -4,7 +4,8 @@ #Use of this source code is governed by a BSD-2-clause-style #license that can be found in the LICENSE-BSD2 file or at #https://opensource.org/licenses/BSD-2-Clause -docker-compose -f tests/docker-compose-ci.yml up --abort-on-container-exit +docker-compose -f tests/docker-compose-script.yml build +docker-compose -f tests/docker-compose-script.yml up --abort-on-container-exit EXIT=$0 diff --git a/tests/docker-compose-ci.yml b/tests/docker-compose-ci.yml index b3ffd08..e6aae72 100644 --- a/tests/docker-compose-ci.yml +++ b/tests/docker-compose-ci.yml @@ -11,7 +11,6 @@ version: "3.7" services: test: - build: . image: docker.pkg.github.com/splunk/splunk-connect-for-syslog/stg-splunk-connect-for-syslog:tests-${CIRCLE_SHA1} links: - splunk @@ -20,8 +19,6 @@ services: - results:/work/test-results sc4s: - build: - context: ../package image: docker.pkg.github.com/splunk/splunk-connect-for-syslog/stg-splunk-connect-for-syslog:sc4s-${SYSLOG}-${CIRCLE_SHA1} hostname: sc4s #When this is enabled test_common will fail @@ -51,8 +48,6 @@ services: - SC4S_LISTEN_PFSENSE_TCP_PORT=5006 - SC4S_ARCHIVE_GLOBAL=no splunk: - build: - context: ../splunk image: docker.pkg.github.com/splunk/splunk-connect-for-syslog/stg-splunk-connect-for-syslog:splunk-${SPLUNK}-${CIRCLE_SHA1} hostname: splunk ports: diff --git a/docker-compose.yml b/tests/docker-compose-script.yml similarity index 78% rename from docker-compose.yml rename to tests/docker-compose-script.yml index db9f4e5..7bd4de2 100644 --- a/docker-compose.yml +++ b/tests/docker-compose-script.yml @@ -11,18 +11,16 @@ version: "3.7" services: test: - build: tests + build: . links: - splunk - sc4s - environment: - - SPLUNK_USER=admin - - SPLUNK_PASSWORD=${SPLUNK_PASSWORD} - - SPLUNK_HOST=splunk + volumes: + - results:/work/test-results sc4s: build: - context: package + context: ../package hostname: sc4s #When this is enabled test_common will fail # command: -det @@ -31,7 +29,7 @@ services: - "601" - "514/udp" - "5000-5050" - - "5000-5200/udp" + - "5000-5050/udp" - "6514" stdin_open: true tty: true @@ -39,7 +37,7 @@ services: - splunk environment: - SPLUNK_HEC_URL=https://splunk:8088 - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} + - SPLUNK_HEC_TOKEN=70b6ae71-76b3-4c38-9597-0c5b37ad9630 - SC4S_SOURCE_TLS_ENABLE=no - SC4S_DEST_SPLUNK_HEC_TLS_VERIFY=no - SC4S_LISTEN_JUNIPER_NETSCREEN_TCP_PORT=5000 @@ -50,17 +48,19 @@ services: - SC4S_LISTEN_PALOALTO_PANOS_TCP_PORT=5005 - SC4S_LISTEN_PFSENSE_TCP_PORT=5006 - SC4S_ARCHIVE_GLOBAL=no - volumes: - - ./tls:/opt/syslog-ng/tls splunk: build: - context: splunk + context: ../splunk hostname: splunk ports: - - "8000:8000" + - "8000" - "8088" - "8089" environment: - - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} - - SPLUNK_PASSWORD=${SPLUNK_PASSWORD} + - SPLUNK_HEC_TOKEN=70b6ae71-76b3-4c38-9597-0c5b37ad9630 + - SPLUNK_PASSWORD=Changed@11 - SPLUNK_START_ARGS=--accept-license + +volumes: + results: + external: false \ No newline at end of file