From 4810796f72d7cd7d25414f8c520c124ec568af76 Mon Sep 17 00:00:00 2001 From: Brandon Myers Date: Wed, 28 Aug 2019 15:24:06 -0500 Subject: [PATCH] Move bootstrap setup files into scripts directory --- docker/compose/kibana/Dockerfile | 2 +- docker/compose/mozdef_bootstrap/Dockerfile | 7 +++---- .../setup}/index_mappings/alerts-star.json | 0 .../files => scripts/setup}/index_mappings/alerts.json | 0 .../setup}/index_mappings/events-weekly.json | 0 .../files => scripts/setup}/index_mappings/events.json | 0 .../files => scripts/setup}/initial_setup.py | 0 .../files => scripts/setup}/resources/all_events_area.json | 0 .../setup}/resources/all_events_count.json | 0 .../setup}/resources/category_pie_graph.json | 0 .../setup}/resources/cloudtrail_eventname_pie_graph.json | 0 .../setup}/resources/cloudtrail_eventname_table.json | 0 .../setup}/resources/cloudtrail_events_dashboard.json | 0 .../setup}/resources/cloudtrail_events_line_graph.json | 0 .../setup}/resources/cloudtrail_events_map.json | 0 .../setup}/resources/cloudtrail_total_event_count.json | 0 .../setup}/resources/cloudtrail_user_identity_table.json | 0 .../setup}/resources/destinationip_bar_graph.json | 0 .../setup}/resources/sample_dashboard.json | 0 .../setup}/resources/sourceip_bar_graph.json | 0 20 files changed, 4 insertions(+), 5 deletions(-) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/index_mappings/alerts-star.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/index_mappings/alerts.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/index_mappings/events-weekly.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/index_mappings/events.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/initial_setup.py (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/resources/all_events_area.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/resources/all_events_count.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/resources/category_pie_graph.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/resources/cloudtrail_eventname_pie_graph.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/resources/cloudtrail_eventname_table.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/resources/cloudtrail_events_dashboard.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/resources/cloudtrail_events_line_graph.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/resources/cloudtrail_events_map.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/resources/cloudtrail_total_event_count.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/resources/cloudtrail_user_identity_table.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/resources/destinationip_bar_graph.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/resources/sample_dashboard.json (100%) rename {docker/compose/mozdef_bootstrap/files => scripts/setup}/resources/sourceip_bar_graph.json (100%) diff --git a/docker/compose/kibana/Dockerfile b/docker/compose/kibana/Dockerfile index 238c3ab2..5d4f6506 100644 --- a/docker/compose/kibana/Dockerfile +++ b/docker/compose/kibana/Dockerfile @@ -2,7 +2,7 @@ FROM centos:7 LABEL maintainer="mozdef@mozilla.com" -# When changing the kibana version, we'll need to update https://github.com/mozilla/MozDef/blob/master/docker/compose/mozdef_bootstrap/files/initial_setup.py accordingly +# When changing the kibana version, we'll need to update https://github.com/mozilla/MozDef/blob/master/scripts/setup/initial_setup.py accordingly ENV KIBANA_VERSION 6.8.0 RUN \ diff --git a/docker/compose/mozdef_bootstrap/Dockerfile b/docker/compose/mozdef_bootstrap/Dockerfile index 8cbfaa9b..655515bb 100644 --- a/docker/compose/mozdef_bootstrap/Dockerfile +++ b/docker/compose/mozdef_bootstrap/Dockerfile @@ -7,10 +7,9 @@ RUN install --owner mozdef --group mozdef --directory /opt/mozdef/envs/mozdef/do COPY --chown=mozdef:mozdef cron/mozdefStateDefaultMappingTemplate.json /opt/mozdef/envs/mozdef/cron/mozdefStateDefaultMappingTemplate.json COPY --chown=mozdef:mozdef cron/defaultMappingTemplate.json /opt/mozdef/envs/mozdef/cron/defaultMappingTemplate.json COPY --chown=mozdef:mozdef docker/compose/mozdef_cron/files/backup.conf /opt/mozdef/envs/mozdef/cron/backup.conf -COPY --chown=mozdef:mozdef docker/compose/mozdef_bootstrap/files/initial_setup.py /opt/mozdef/envs/mozdef/initial_setup.py -COPY --chown=mozdef:mozdef docker/compose/mozdef_bootstrap/files/index_mappings /opt/mozdef/envs/mozdef/index_mappings -COPY --chown=mozdef:mozdef docker/compose/mozdef_bootstrap/files/resources /opt/mozdef/envs/mozdef/resources -WORKDIR /opt/mozdef/envs/mozdef +COPY --chown=mozdef:mozdef scripts/setup /opt/mozdef/envs/mozdef/scripts/setup + +WORKDIR /opt/mozdef/envs/mozdef/scripts USER mozdef diff --git a/docker/compose/mozdef_bootstrap/files/index_mappings/alerts-star.json b/scripts/setup/index_mappings/alerts-star.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/index_mappings/alerts-star.json rename to scripts/setup/index_mappings/alerts-star.json diff --git a/docker/compose/mozdef_bootstrap/files/index_mappings/alerts.json b/scripts/setup/index_mappings/alerts.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/index_mappings/alerts.json rename to scripts/setup/index_mappings/alerts.json diff --git a/docker/compose/mozdef_bootstrap/files/index_mappings/events-weekly.json b/scripts/setup/index_mappings/events-weekly.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/index_mappings/events-weekly.json rename to scripts/setup/index_mappings/events-weekly.json diff --git a/docker/compose/mozdef_bootstrap/files/index_mappings/events.json b/scripts/setup/index_mappings/events.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/index_mappings/events.json rename to scripts/setup/index_mappings/events.json diff --git a/docker/compose/mozdef_bootstrap/files/initial_setup.py b/scripts/setup/initial_setup.py similarity index 100% rename from docker/compose/mozdef_bootstrap/files/initial_setup.py rename to scripts/setup/initial_setup.py diff --git a/docker/compose/mozdef_bootstrap/files/resources/all_events_area.json b/scripts/setup/resources/all_events_area.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/resources/all_events_area.json rename to scripts/setup/resources/all_events_area.json diff --git a/docker/compose/mozdef_bootstrap/files/resources/all_events_count.json b/scripts/setup/resources/all_events_count.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/resources/all_events_count.json rename to scripts/setup/resources/all_events_count.json diff --git a/docker/compose/mozdef_bootstrap/files/resources/category_pie_graph.json b/scripts/setup/resources/category_pie_graph.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/resources/category_pie_graph.json rename to scripts/setup/resources/category_pie_graph.json diff --git a/docker/compose/mozdef_bootstrap/files/resources/cloudtrail_eventname_pie_graph.json b/scripts/setup/resources/cloudtrail_eventname_pie_graph.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/resources/cloudtrail_eventname_pie_graph.json rename to scripts/setup/resources/cloudtrail_eventname_pie_graph.json diff --git a/docker/compose/mozdef_bootstrap/files/resources/cloudtrail_eventname_table.json b/scripts/setup/resources/cloudtrail_eventname_table.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/resources/cloudtrail_eventname_table.json rename to scripts/setup/resources/cloudtrail_eventname_table.json diff --git a/docker/compose/mozdef_bootstrap/files/resources/cloudtrail_events_dashboard.json b/scripts/setup/resources/cloudtrail_events_dashboard.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/resources/cloudtrail_events_dashboard.json rename to scripts/setup/resources/cloudtrail_events_dashboard.json diff --git a/docker/compose/mozdef_bootstrap/files/resources/cloudtrail_events_line_graph.json b/scripts/setup/resources/cloudtrail_events_line_graph.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/resources/cloudtrail_events_line_graph.json rename to scripts/setup/resources/cloudtrail_events_line_graph.json diff --git a/docker/compose/mozdef_bootstrap/files/resources/cloudtrail_events_map.json b/scripts/setup/resources/cloudtrail_events_map.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/resources/cloudtrail_events_map.json rename to scripts/setup/resources/cloudtrail_events_map.json diff --git a/docker/compose/mozdef_bootstrap/files/resources/cloudtrail_total_event_count.json b/scripts/setup/resources/cloudtrail_total_event_count.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/resources/cloudtrail_total_event_count.json rename to scripts/setup/resources/cloudtrail_total_event_count.json diff --git a/docker/compose/mozdef_bootstrap/files/resources/cloudtrail_user_identity_table.json b/scripts/setup/resources/cloudtrail_user_identity_table.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/resources/cloudtrail_user_identity_table.json rename to scripts/setup/resources/cloudtrail_user_identity_table.json diff --git a/docker/compose/mozdef_bootstrap/files/resources/destinationip_bar_graph.json b/scripts/setup/resources/destinationip_bar_graph.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/resources/destinationip_bar_graph.json rename to scripts/setup/resources/destinationip_bar_graph.json diff --git a/docker/compose/mozdef_bootstrap/files/resources/sample_dashboard.json b/scripts/setup/resources/sample_dashboard.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/resources/sample_dashboard.json rename to scripts/setup/resources/sample_dashboard.json diff --git a/docker/compose/mozdef_bootstrap/files/resources/sourceip_bar_graph.json b/scripts/setup/resources/sourceip_bar_graph.json similarity index 100% rename from docker/compose/mozdef_bootstrap/files/resources/sourceip_bar_graph.json rename to scripts/setup/resources/sourceip_bar_graph.json