Skip to content

Commit fb4cc07

Browse files
committed
v1
1 parent 2df8b6d commit fb4cc07

File tree

3,117 files changed

+529617
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,117 files changed

+529617
-0
lines changed

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#docker build -t netflow_collector-py:latest ./
2+
FROM python:3.9.10-bullseye
3+
4+
ENV HOST_IP="0.0.0.0"
5+
ENV HOST_PORT=2055
6+
#ENV DB_NAME="netflowDB"
7+
ENV Debug="True"
8+
ENV DB_HOST="http://cratedb01:4200/ http://cratedb02:4200/ http://cratedb03:4200/"
9+
ENV DB_ROOT_USER="root"
10+
ENV DB_ROOT_PASS=" "
11+
ENV GET_DST_COUNTRY="False"
12+
ENV ADD_DNS_NAME="False"
13+
14+
WORKDIR /usr/src/app
15+
COPY . .
16+
17+
RUN pip install --no-cache-dir -r requirements.txt
18+
19+
CMD ["python", "netflowCollector.py"]
20+
#CMD ["python", "test/cratedb.py"]
21+
1.22 KB
Binary file not shown.

__pycache__/lib.cpython-39.pyc

14.8 KB
Binary file not shown.

docker-compose.yaml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
version: '3.1'
2+
3+
services:
4+
netflowCollector-py:
5+
image: netflow_collector-py:latest
6+
restart: always
7+
container_name: netflowCollector-py
8+
depends_on:
9+
- cratedb01
10+
- cratedb02
11+
- cratedb03
12+
ports:
13+
- 2055:2055/udp
14+
volumes:
15+
- /etc/localtime:/etc/localtime
16+
environment:
17+
HOST_IP: "0.0.0.0"
18+
HOST_PORT: 2055
19+
Debug: "True"
20+
DB_HOST: "http://cratedb01:4200/ http://cratedb02:4200/ http://cratedb03:4200/"
21+
DB_ROOT_USER: "crate" #Default User
22+
#DB_ROOT_PASS: "Password" #The default superuser crate has no password.
23+
GET_DST_COUNTRY: "False"
24+
ADD_DNS_NAME: "False"
25+
26+
27+
cratedb01:
28+
image: crate:latest
29+
container_name: cratedb01
30+
restart: unless-stopped
31+
ports:
32+
# Admin UI
33+
- "4201:4200"
34+
command: ["crate",
35+
"-Ccluster.name=crate-docker-cluster",
36+
"-Cnode.name=cratedb01",
37+
"-Cnode.data=true",
38+
"-Cnetwork.host=_site_",
39+
"-Cdiscovery.seed_hosts=cratedb02,cratedb03",
40+
"-Ccluster.initial_master_nodes=cratedb01,cratedb02,cratedb03",
41+
"-Cgateway.expected_nodes=3",
42+
"-Cgateway.recover_after_nodes=2",
43+
"-Chttp.cors.enabled=true"]
44+
environment:
45+
- CRATE_HEAP_SIZE=2g
46+
volumes:
47+
- crate01_Data:/data
48+
49+
cratedb02:
50+
image: crate:latest
51+
container_name: cratedb02
52+
restart: unless-stopped
53+
ports:
54+
# Admin UI
55+
- "4202:4200"
56+
command: ["crate",
57+
"-Ccluster.name=crate-docker-cluster",
58+
"-Cnode.name=cratedb02",
59+
"-Cnode.data=true",
60+
"-Cnetwork.host=_site_",
61+
"-Cdiscovery.seed_hosts=cratedb01,cratedb03",
62+
"-Ccluster.initial_master_nodes=cratedb01,cratedb02,cratedb03",
63+
"-Cgateway.expected_nodes=3",
64+
"-Cgateway.recover_after_nodes=2",
65+
"-Chttp.cors.enabled=true"]
66+
environment:
67+
- CRATE_HEAP_SIZE=2g
68+
volumes:
69+
- crate02_Data:/data
70+
71+
cratedb03:
72+
image: crate:latest
73+
container_name: cratedb03
74+
restart: unless-stopped
75+
ports:
76+
# Admin UI
77+
- "4203:4200"
78+
command: ["crate",
79+
"-Ccluster.name=crate-docker-cluster",
80+
"-Cnode.name=cratedb03",
81+
"-Cnode.data=true",
82+
"-Cnetwork.host=_site_",
83+
"-Cdiscovery.seed_hosts=cratedb01,cratedb02",
84+
"-Ccluster.initial_master_nodes=cratedb01,cratedb02,cratedb03",
85+
"-Cgateway.expected_nodes=3",
86+
"-Cgateway.recover_after_nodes=2",
87+
"-Chttp.cors.enabled=true"
88+
]
89+
environment:
90+
- CRATE_HEAP_SIZE=2g
91+
volumes:
92+
- crate03_Data:/data
93+
94+
grafana:
95+
image: grafana/grafana:latest
96+
container_name: grafana
97+
restart: always
98+
depends_on:
99+
- cratedb01
100+
- cratedb02
101+
- cratedb03
102+
ports:
103+
- "3000:3000"
104+
volumes:
105+
- grafana_Data:/var/lib/grafana
106+
107+
108+
volumes:
109+
crate01_Data:
110+
crate02_Data:
111+
crate03_Data:
112+
grafana_Data:
113+
114+
115+
116+
117+
118+
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import sys, types, os;has_mfs = sys.version_info > (3, 5);p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('crate',));importlib = has_mfs and __import__('importlib.util');has_mfs and __import__('importlib.machinery');m = has_mfs and sys.modules.setdefault('crate', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('crate', [os.path.dirname(p)])));m = m or sys.modules.setdefault('crate', types.ModuleType('crate'));mp = (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp.append(p)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pip

0 commit comments

Comments
 (0)