grapl-security / grapl

Graph platform for Detection and Response
https://www.graplsecurity.com
Apache License 2.0
686 stars 78 forks source link

Review OSX deployment steps, compatibility #397

Closed alexjmacdonald closed 4 years ago

alexjmacdonald commented 4 years ago

I've been getting grapl running locally on Mac OSX, though I haven't really used it much. We don't offer any kind of official support outside of Linux, and I suspect a lot of engineers are able to run locally on their MBP but would see an obstacle in deploying grapl on AWS.

Known issues:

Goals:

alexjmacdonald commented 4 years ago

sidenote:

fresh build (delete all images first) clocks 17.74gb of disk space upon completion. clean-build brings that down to 9.9gb, rerunning build gets me up to 18.67gb. clean back down to 10.83gb, build back up to 19.61. Looks like a consistent leak of 0.94gb in <none> images:

REPOSITORY                                    TAG                 IMAGE ID            CREATED             SIZE
grapl/grapl-graphql-endpoint                  latest              6594e9ebdb6f        8 minutes ago       321MB
grapl/grapl-cdk-build                         latest              107eb859cb74        8 minutes ago       546MB
grapl/grapl-graphql-endpoint-build            latest              62e81480bf4f        9 minutes ago       349MB
grapl/grapl-provision                         latest              c3b3232fc38a        10 minutes ago      546MB
grapl/grapl-model-plugin-deployer             latest              ddc32da898a4        10 minutes ago      233MB
grapl/grapl-dgraph-ttl                        latest              b3388d4d51af        10 minutes ago      227MB
grapl/grapl-engagement-edge                   latest              dd6a9e5d3676        10 minutes ago      227MB
grapl/grapl-engagement-creator                latest              61c47b8ef0d1        10 minutes ago      234MB
grapl/grapl-analyzer-executor                 latest              2b0b3be13985        10 minutes ago      228MB
grapl/analyzer-deployer                       latest              3e06bbf4d9bc        10 minutes ago      220MB
grapl/grapl-model-plugin-deployer-build       latest              8d9a086f6c04        11 minutes ago      621MB
grapl/grapl-dgraph-ttl-build                  latest              12c77cc23575        11 minutes ago      613MB
grapl/engagement-edge-build                   latest              85cd101ad047        11 minutes ago      613MB
grapl/engagement-creator-build                latest              923d567cda53        12 minutes ago      622MB
grapl/analyzer-executor-build                 latest              a2854f40fd97        12 minutes ago      614MB
grapl/grapl-analyzerlib-python-build          latest              8c5e8ac1e369        12 minutes ago      548MB
grapl/grapl-common-python-build               latest              514b309ece83        13 minutes ago      536MB
grapl/grapl-graph-descriptions-python-build   latest              0ae8ef56c4ce        13 minutes ago      546MB
grapl/analyzer-deployer-build                 latest              f93c270156e8        13 minutes ago      663MB
grapl/grapl-rust-src-build                    latest              6a92a9c57806        14 minutes ago      6.73GB
<none>                                        <none>              63a0791b9383        28 minutes ago      321MB
<none>                                        <none>              523722407590        30 minutes ago      546MB
<none>                                        <none>              af4d8c818d12        30 minutes ago      233MB
<none>                                        <none>              075a97079d85        30 minutes ago      227MB
<none>                                        <none>              195980aea3a5        30 minutes ago      227MB
<none>                                        <none>              22ffffd9af00        30 minutes ago      234MB
<none>                                        <none>              eeed4d99eb0a        30 minutes ago      228MB
<none>                                        <none>              288d3a2c0c62        30 minutes ago      220MB
grapl/grapl-engagement-view                   latest              250f5039e56d        40 minutes ago      28.3MB
<none>                                        <none>              9fb65990d594        40 minutes ago      1.05GB
<none>                                        <none>              ba88f876142c        45 minutes ago      321MB
<none>                                        <none>              a84754b9f917        47 minutes ago      551MB
<none>                                        <none>              490d7e37a829        47 minutes ago      546MB
grapl/grapl-notebook                          latest              4035889f9952        48 minutes ago      1.68GB
<none>                                        <none>              7adf94ea1b67        49 minutes ago      233MB
<none>                                        <none>              6538549a9d67        49 minutes ago      227MB
<none>                                        <none>              2baab0adc34d        49 minutes ago      227MB
<none>                                        <none>              49de1796934a        49 minutes ago      234MB
<none>                                        <none>              abdb7d088bea        49 minutes ago      228MB
<none>                                        <none>              51eb8a3c3f46        49 minutes ago      220MB
grapl/grapl-python-deploy                     latest              5a8c1a4c9dc6        49 minutes ago      112MB
grapl/grapl-python-build                      latest              4ebf25836831        52 minutes ago      453MB
grapl/grapl-sysmon-subgraph-generator         latest              b35ed206507d        53 minutes ago      187MB
grapl/grapl-node-identifier-retry-handler     latest              68fa7f70afa6        53 minutes ago      191MB
grapl/grapl-node-identifier                   latest              6b5a03b6bb89        53 minutes ago      191MB
grapl/grapl-metric-forwarder                  latest              113b4402417a        53 minutes ago      151MB
grapl/grapl-graph-merger                      latest              eaace98c13c8        53 minutes ago      203MB
grapl/grapl-generic-subgraph-generator        latest              15297195d0cd        53 minutes ago      183MB
grapl/grapl-analyzer-dispatcher               latest              4db93b7f68ff        53 minutes ago      176MB
<none>                                        <none>              ab17b49129a1        58 minutes ago      4.01GB

I'm running against staging, I suspect there were some Docker improvements since I was building.

Not sure if this is specific to OSX?

alexjmacdonald commented 4 years ago

We use readlink -f:

etc/local_grapl/bin/upload_analyzer_local.sh
1:ANALYZER_UPLOAD_SCRIPT_PATH=$(dirname "$(readlink -f "$0")")

for very cool historical reasons, OSX doesn't support the -f flag

https://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac

alexjmacdonald commented 4 years ago

Looks like we're good as far as OSX-specific work goes. There are some documentation updates to make, but they apply equally to Linux environments.