Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to buildx, and wait for daemon to start #378

Merged
merged 3 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ about: Create a report to help us improve
* Mquery version (from the /status page):
* Ursadb version (from the /status page):
* Installation method:
- [ ] Generic docker-compose
- [ ] Dev docker-compose
- [ ] Generic docker compose
- [ ] Dev docker compose
- [ ] Native (from source)
- [ ] Other (please explain)

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
submodules: recursive
- name: build test image
run: docker build -t mquery_tests:latest -f src/e2etests/Dockerfile .
- name: run web with docker-compose
- name: run web with docker compose
run: docker compose up --build -d web --wait
- name: init the database
run: docker compose exec -it -w /usr/src/app/src/ web alembic upgrade head
Expand Down
8 changes: 4 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ mkdir samples
# empty directory for database files to live in. By default database will
# expect files in ./samples directory, and keep index in ./index.
vim .env
docker-compose up --scale daemon=3 # this will take a while
docker-compose exec web python3 -m mquery.db
docker compose up --scale daemon=3 # this will take a while
docker compose exec web python3 -m mquery.db
```

- Good for testing mquery and production deployments on a single server
Expand All @@ -37,8 +37,8 @@ cd mquery
# empty directory for database files to live in. By default database will
# expect files in ./samples directory, and keep index in ./index.
vim .env
docker-compose -f docker-compose.dev.yml up # this will take a while
docker-compose exec dev-web python3 -m mquery.db
docker compose -f docker-compose.dev.yml up # this will take a while
docker compose exec dev-web python3 -m mquery.db
```

- Good for development - all file changes will be picked up automatically.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ Public instance will be created soon, stay tuned...

### 1. Install and start

The easiest way to do this is with `docker-compose`:
The easiest way to do this is with `docker compose`:

```
git clone https://github.com/CERT-Polska/mquery.git
cd mquery
vim .env # optional - change samples and index directory locations
docker-compose up --scale daemon=3 # building the images will take a while
docker-compose exec web python3 -m mquery.db
docker compose up --scale daemon=3 # building the images will take a while
docker compose exec web python3 -m mquery.db
```

The web interface should be available at `http://localhost`.
Expand All @@ -44,7 +44,7 @@ configurable with variable in the `.env` file).
Launch ursacli in docker:

```shell
sudo docker-compose exec ursadb ursacli
docker compose exec ursadb ursacli
[2023-06-14 17:20:24.940] [info] Connecting to tcp://localhost:9281
[2023-06-14 17:20:24.942] [info] Connected to UrsaDB v1.5.1+98421d7 (connection id: 006B8B46B6)
ursadb>
Expand Down
10 changes: 5 additions & 5 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ together and depend on each other for optimal performance.
Mquery currently does not allow you to configure UrsaDB nicely.
You have to do it "manually", by connecting with `ursacli` program to the
TCP port exposed by UrsaDB. This program is built together with UrsaDB, and
available in all official docker images. You can execute it in docker-compose
available in all official docker images. You can execute it in docker compose
like this:

```
sudo docker-compose -f docker-compose.dev.yml exec ursadb ursacli
docker compose exec ursadb ursacli
```

Or you can download the latest ursadb release and run a client from there.
Expand Down Expand Up @@ -107,7 +107,7 @@ Mquery does not use it in any way, but it's read by Docker.

```bash
$ cat .env
# This file is only relevant for docker-compose deployments.
# This file is only relevant for docker compose deployments.

# Directory where your samples are stored. By default you have to copy them
# to ./samples subdirectory in this repository.
Expand All @@ -117,7 +117,7 @@ SAMPLES_DIR=./samples
INDEX_DIR=./index
```

If you use docker-compose to start mquery, you can use this file to specify
If you use docker compose to start mquery, you can use this file to specify
a location on the host for your samples_dir and index_dir. These variables are
then used when creating containers. See for example ursadb container spec:

Expand All @@ -134,5 +134,5 @@ then used when creating containers. See for example ursadb container spec:
```

As you can see, variables from `.env` are used to specify mount point for
the data volumes. You can also ignore this file, and edit docker-compose
the data volumes. You can also ignore this file, and edit docker compose
directly to your liking.
2 changes: 1 addition & 1 deletion docs/how-to/integrate-with-s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Mquery with existing S3 deployment.
* Linux system with at least 4GB RAM and enough disk space for your samples
and index
* Sudo access
* Mquery is installed natively (not from docker-compose). We will have to
* Mquery is installed natively (not from docker compose). We will have to
install additional dependencies, and it's not trivial with existing images.
To make things simpler, we assume you installed mquery natively (see
[Install mquery natively (without docker)](./install-native.md) if you want to
Expand Down
6 changes: 3 additions & 3 deletions docs/indexing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ There are many ways to do it, unfortunately not all are equally good.

## Method 1: ursacli

Run the `ursacli` executable. For docker-compose deployment, go to the mquery
directory and run `sudo docker-compose exec ursadb ursacli`:
Run the `ursacli` executable. For docker compose deployment, go to the mquery
directory and run `sudo docker compose exec ursadb ursacli`:

```
sudo docker-compose exec ursadb ursacli
sudo docker compose exec ursadb ursacli
[2020-05-10 05:23:27.216] [info] Connecting to tcp://localhost:9281
[2020-05-10 05:23:27.219] [info] Connected to UrsaDB v1.3.2+be20951 (connection id: 006B8B45B4)
ursadb>
Expand Down
4 changes: 2 additions & 2 deletions docs/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ to another database. What we can do is to document the current data format.

### Redis quickstart

To connect to redis use `redis-cli`. For docker-compose use
`docker-compose -f docker-compose.dev.yml exec redis redis-cli`.
To connect to redis use `redis-cli`. For docker compose use
`docker compose exec redis redis-cli`.

Redis command documentation is pretty good and available at https://redis.io/commands/.

Expand Down
2 changes: 1 addition & 1 deletion docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Similarly to Redis, it's best to restrict network access to the UrsaDB instance.
unauthenticated users can, for example, remove indexed data from the database,
or cause a denial of service.

In the provided docker-compose files, the UrsaDB user is overridden to root by
In the provided docker compose files, the UrsaDB user is overridden to root by
default. This is for
backwards compatibility, and to simplify deployment. For production instances
consider running ursadb with the default user (`ursa`, UID 1000). This means
Expand Down
2 changes: 1 addition & 1 deletion docs/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ as necessary for your deployment.
**Warning** the proces is tricky, and right now it's missing a proper validation.
It's possible to lock yourself out (by enabling auth before configuring it
correctly). If you do this, you have to disable auth manually, by running
`redis-cli` (`sudo docker-compose exec redis redis-cli` for docker) and
`redis-cli` (`sudo docker compose exec redis redis-cli` for docker) and
executing `HMSET plugin:Mquery auth_enabled ""`.

**Step 0 (optional): enable auth in non-enforcing mode**
Expand Down
2 changes: 1 addition & 1 deletion src/e2etests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ so you don't have to. But if you want to test locally, run (from the main direct

```bash
$ rm -r e2e-state
$ docker-compose -f docker-compose.e2etests-local.yml up --build --exit-code-from e2etests-local
$ docker compose -f docker-compose.e2etests-local.yml up --build --exit-code-from e2etests-local
```
Loading