Skip to content
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
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ cargo 1.69.0 (6e9a83356 2023-04-12)
Currently, iceberg-rust uses Docker to set up environment for integration tests. Native Docker has some limitations, please check (https://github.com/apache/iceberg-rust/pull/748). Please use Orbstack or Podman.

For MacOS users, you can install [OrbStack as a docker alternative](docs/contributing/orbstack.md).

For podman, refer to [Using Podman instead of Docker](docs/contributing/podman.md)
For Podman users, refer to [Using Podman instead of Docker](docs/contributing/podman.md)

## Build

Expand Down
3 changes: 0 additions & 3 deletions crates/integration_tests/testdata/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,3 @@ services:
- AWS_ACCESS_KEY_ID=admin
- AWS_SECRET_ACCESS_KEY=password
- AWS_REGION=us-east-1
links:
- rest:rest
- minio:minio
Comment on lines -83 to -85
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like links and depends_on are doing the same thing, so we can remove this

https://stackoverflow.com/questions/35832095/difference-between-links-and-depends-on-in-docker-compose-yml

2 changes: 2 additions & 0 deletions crates/integration_tests/testdata/spark/provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
.getOrCreate()
)

spark.sql(f"""CREATE NAMESPACE IF NOT EXISTS rest.default""")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 this is due to the new default behavior change for iceberg-rest-fixture
apache/iceberg#13599

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the added context!


spark.sql(
f"""
CREATE OR REPLACE TABLE rest.default.test_positional_merge_on_read_deletes (
Expand Down
27 changes: 21 additions & 6 deletions docs/contributing/podman.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,30 @@

# Using Podman instead of Docker

Iceberg-rust does not require containerization, except for integration tests, where "docker" and "docker-compose" are used to start containers for minio and various catalogs. Below instructions setup "rootful podman" and docker's official docker-compose plugin to run integration tests as an alternative to docker or Orbstack.
Iceberg-rust does not require containerization, except for integration tests, where "docker" and "docker-compose" are used to start containers for minio and various catalogs. Below instructions setup "rootful podman" and docker's official docker-compose plugin to run integration tests as an alternative to docker or Orbstack.

1. Have podman v4 or newer.
```console
```shell
$ podman --version
podman version 4.9.4-rhel
```

2. Open file `/usr/bin/docker` and add the below contents:
2. Create a docker wrapper script:

* Create a fresh `/usr/bin/docker` file and add the below contents:
```bash
#!/bin/sh
[ -e /etc/containers/nodocker ] || \
echo "Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg." >&2
exec sudo /usr/bin/podman "$@"
```

* Set new `/usr/bin/docker` file to executable.
```shell
sudo chmod +x /usr/bin/docker
```
Comment on lines +29 to +42
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: is the goal for the docker wrapper script to alias podman as docker?

can we add an alias instead? https://docs.podman.io/en/latest/#:~:text=Most%20users%20can,the%20running%20containers.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding an alias was a step I forgot to document, but it wouldn't be a replacement for this script. Without the above script I was seeing issues where podman wasn't looking in the correct folder for the docker-compose.yaml file to pass to docker-compose plugin.


3. Install the [docker compose plugin](https://docs.docker.com/compose/install/linux). Check for successful installation.
```console
```shell
$ docker compose version
Docker Compose version v2.28.1
```
Expand All @@ -53,7 +59,7 @@ Iceberg-rust does not require containerization, except for integration tests, wh
```

6. Check that the following symlink exists.
```console
```shell
$ ls -al /var/run/docker.sock
lrwxrwxrwx 1 root root 27 Jul 24 12:18 /var/run/docker.sock -> /var/run/podman/podman.sock
```
Expand Down Expand Up @@ -83,3 +89,12 @@ As of podman v4, ["To be succinct and simple, when running rootless containers,

* <https://www.redhat.com/sysadmin/container-ip-address-podman>
* <https://github.com/containers/podman/blob/main/docs/tutorials/basic_networking.md>

# Debugging Note:
- Fix for error: `Error: short-name "apache/iceberg-rest-fixture" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.conf"`
- Add or modify the `/etc/containers/registries.conf` file:
```toml
[[registry]]
prefix = "docker.io"
location = "docker.io"
```
Loading