Skip to content

Commit

Permalink
Changed names of volumes and containers to distiniguish between cyber…
Browse files Browse the repository at this point in the history
…security and data provenance.
  • Loading branch information
Jesse-Rees committed Dec 4, 2024
1 parent cb34d45 commit 4b3eb12
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Core DW Infrastructure/app/streamlitdw_fe.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def upload_to_minio(file, filename, bucket_name, project, preprocessing_option):

def log_to_elasticsearch(log_data):
try:
response = requests.post("http://logstash:5044", json=log_data)
response = requests.post("http://dp-logstash:5044", json=log_data)
if response.status_code != 200:
print(f"Failed to log to Logstash: {response.text}")
except Exception as e:
Expand Down
20 changes: 10 additions & 10 deletions Core DW Infrastructure/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ services:
ports:
- 5432:5432
volumes:
- postgres-data:/var/lib/postgresql/data
- dp-postgres-data:/var/lib/postgresql/data
- ./db-init:/docker-entrypoint-initdb.d
container_name: postgres
container_name: dp-postgres
networks:
- dw_network

Expand All @@ -95,16 +95,16 @@ services:
- 9200:9200
- 9300:9300
volumes:
- es-data:/usr/share/elasticsearch/data
container_name: elasticsearch
- dp-es-data:/usr/share/elasticsearch/data
container_name: dp-elasticsearch
networks:
- dw_network

kibana:
image: docker.elastic.co/kibana/kibana:7.10.1
ports:
- 5601:5601
container_name: kibana
container_name: dp-kibana
volumes:
- ./kibana_config/kibana.yml:/usr/share/kibana/config/kibana.yml
networks:
Expand All @@ -115,15 +115,15 @@ services:
context: ./logstash
volumes:
- ./logstash/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
- logstash-data:/usr/share/logstash/data
- dp-logstash-data:/usr/share/logstash/data
ports:
- 5044:5044
environment:
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
LOG_LEVEL: debug
env_file:
- ./logstash/.env
container_name: logstash
container_name: dp-logstash
networks:
- dw_network

Expand All @@ -134,11 +134,11 @@ volumes:
external: true
fileuploadservice_dremio-data:
external: true
postgres-data:
dp-postgres-data:
external: true
es-data:
dp-es-data:
external: true
logstash-data:
dp-logstash-data:
external: true

networks:
Expand Down
2 changes: 1 addition & 1 deletion Core DW Infrastructure/kibana_config/kibana.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
server.name: kibana
server.host: "0.0.0.0"
elasticsearch.hosts: ["http://elasticsearch:9200"]
elasticsearch.hosts: ["http://dp-elasticsearch:9200"]
6 changes: 3 additions & 3 deletions Core DW Infrastructure/logstash/logstash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ output {
# Directly pass logs from file upload service to Elasticsearch
if [source] == "upload_service" {
elasticsearch {
hosts => ["http://elasticsearch:9200"]
hosts => ["http://dp-elasticsearch:9200"]
index => "fileupload-%{+YYYY.MM.dd}"
}
}
Expand All @@ -69,12 +69,12 @@ output {
]
}
elasticsearch {
hosts => ["http://elasticsearch:9200"]
hosts => ["http://dp-elasticsearch:9200"]
index => "minio-%{+YYYY.MM.dd}"
}
} else if [event_type] =~ /^s3:ObjectAccessed:/ or [event_type] =~ /^s3:Error:/ or [event_type] =~ /^s3:Audit:/ or [event_type] =~ /^s3:BucketPolicy:/ or [event_type] =~ /^s3:BucketNotification:/ or [event_type] in ["s3:BucketCreated", "s3:BucketRemoved"]{
elasticsearch {
hosts => ["http://elasticsearch:9200"]
hosts => ["http://dp-elasticsearch:9200"]
index => "minio-%{+YYYY.MM.dd}"
}
} else if [event_type] =~ /^s3:ObjectRestore:/ or [event_type] =~ /^s3:ObjectTransition:/ {
Expand Down

0 comments on commit 4b3eb12

Please sign in to comment.