You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42-31Lines changed: 42 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,83 +23,85 @@ This framework has been developed as part of the _"A Bug's Life: Analyzing the L
23
23
width="100"/>
24
24
25
25
26
-
## Usage
27
-
28
-
### Prerequisites
29
-
- Docker (tested with version 24.0.1)
26
+
## Installation
30
27
31
-
### Installing
32
-
BugHog can be installed by following the steps below:
28
+
BugHog is compatible with UNIX systems running Docker, including WSL on Windows.
29
+
Follow these steps to get started:
33
30
34
-
1. Clone this repository:
31
+
1.**Clone this repository:**
35
32
36
33
```bash
37
34
git clone https://github.com/DistriNet/BugHog
38
35
cd BugHog
39
36
```
40
37
41
-
2. Obtain images:
38
+
2. **Obtain images:**
42
39
43
40
You will need at least 5 GB of disk space.
41
+
There are two options available to obtain the BugHog images, and you can switch between them by executing the appropriate command.
44
42
45
-
*Option A: Pulling (fastest)*
43
+
***Option A:** Pulling (fastest)*
46
44
47
45
Use the following command to pull the necessary Docker images:
48
46
```bash
49
47
docker compose pull core worker web
50
48
```
51
49
52
-
*Option B: Building*
50
+
> :bulb: If you prefer to use a version other than the latest, simply modify the `BUGHOG_VERSION` and / or `BUGHOG_WEB_VERSION` variables accordingly.
51
+
52
+
***Option B:** Building*
53
53
54
-
If you want to modify the source code, use the following commands to build the necessary Docker images.
55
-
Run this script again if you make changes to the source code.
54
+
Use the following commands to build the Docker images yourself, for instance after you made changes to the source code:
56
55
```bash
57
56
docker compose build core worker web
58
57
```
59
58
60
59
> :bulb: For reference, building takes about 4 minutes on a machine with 8 CPU cores and 8 GB of RAM.
61
60
62
-
### Starting
63
-
After pulling or building the images, start BugHog with the following command.
64
-
If you switch between pulled and built images, make sure to execute the appropriate commands mentioned above before starting.
61
+
62
+
## Usage
63
+
64
+
Launch BugHog using the following command:
65
65
```bash
66
-
docker compose up core web
66
+
docker compose up
67
67
```
68
68
69
+
> :warning: If you use `sudo` with this command, the `PWD` environment variable won't be passed to the BugHog containers, which is necessary for dynamically starting worker containers.
70
+
> To avoid this, explicitly pass on this variable: `sudo PWD=$PWD docker compose up`.
71
+
69
72
Open your web browser and navigate to [http://localhost:5000](http://localhost:5000) to access the graphical interface.
70
-
If you started BugHog on a remote server, replace localhost with its IP address.
73
+
BugHog is started on a remote server, substitute 'localhost' with its IP address.
74
+
75
+
BugHog can be stopped through:
76
+
```bash
77
+
docker compose down
78
+
```
71
79
72
80
> :warning: BugHog's own MongoDB instance will persist data within the [database](database) folder.
73
81
> Be sure to back-up accordingly, or use your own MongoDB instance as explained below.
74
82
75
-
#### Optional: Use your own MongoDB instance
76
83
77
-
By default, BugHog uses a MongoDB container.
78
-
you might want to prefer all data to be stored on your own MongoDB instance.
84
+
### Optional: Use your own MongoDB instance
85
+
86
+
By default, BugHog uses a MongoDB container to store data.
79
87
If you prefer storing data in your own MongoDB instance, follow these steps:
80
88
81
-
1. Create a `.env` file from `.env.example` (both in the [config](config) folder) and fill in the missing values.
89
+
1. Create a `.env` file from `.env.example` (both in the [config](config) folder) and fill in the missing database values.
82
90
83
91
2. (Re)start BugHog.
84
92
85
-
### Stopping
86
-
To stop BugHog, run the following command:
87
-
88
-
```bash
89
-
docker compose down
90
-
```
91
93
92
-
### Adding Your Own Experiments
94
+
### Adding your new experiments
93
95
94
96
Instructions to add your own custom experiments to the server can be found [here](https://github.com/DistriNet/BugHog-web/blob/main/experiments/README.md).
95
97
Be sure to restart the BugHog framework when you add a new experiment:
96
98
97
99
```bash
98
100
docker compose down
99
-
docker compose up core web
101
+
docker compose up
100
102
```
101
103
102
-
### Development
104
+
## Development
103
105
104
106
For extending or debugging the Vue UI, the most convenient approach is to launch an interactive Node environment.
105
107
The UI can be visited at [http://localhost:5173](http://localhost:5173).
@@ -108,9 +110,18 @@ The UI can be visited at [http://localhost:5173](http://localhost:5173).
108
110
docker compose up node_dev
109
111
```
110
112
111
-
For debugging the core application, consider using the VS Code dev container for an effortless debugging experience.
113
+
For debugging the core application, consider using the VS Code dev container.
112
114
You can utilize the configuration in [.devcontainer](.devcontainer) for this.
113
115
116
+
114
117
## Additional help
115
118
116
119
Don't hesitate to open a [GitHub issue](https://github.com/DistriNet/BugHog/issues/new) if you come across a bug, want to suggest a feature, or have any questions!
120
+
121
+
122
+
## Troubleshooting
123
+
124
+
### WSL on Windows
125
+
126
+
- Ensure you clone the BugHog project to the WSL file system instead of the Windows file system, and launch it from there.
127
+
Virtualization between these file systems can cause complications with file management.
if (host_pwd:=os.getenv('HOST_PWD')) in ['', None]:
33
+
logger.fatal('The "HOST_PWD" variable is not set. If you\'re using sudo, you might have to pass it explicitly, for example "sudo HOST_PWD=$PWD docker compose up"')
0 commit comments