Skip to content

Commit c390ad3

Browse files
Updates Podman Instructions, Docker-Compose, & Spark Script (#1553)
## Which issue does this PR close? - No current PR, was found while testing 0.6.0 RC ## What changes are included in this PR? `CONTRIBUTING.md` `docs/contributing/podman.md` - Podman instructions have been updated for clarity and to emphasis its usage in a Linux environment. `crates/integration_tests/testdata/docker-compose.yaml` - Updated to remove deprecated Link feature, which breaks when used with Podman. https://stackoverflow.com/questions/35832095/difference-between-links-and-depends-on-in-docker-compose-yml `crates/integration_tests/testdata/spark/provision.py` - Added Create Namespace `default` to fix breaking tests. ## Are these changes tested? - Tested by running `make build && make test` against the following platforms: * Arch Linux x86_64 with Podman && Docker-Compose * MacOS M1 arm64 with Orbstack
1 parent 195fb73 commit c390ad3

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ cargo 1.69.0 (6e9a83356 2023-04-12)
104104
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.
105105

106106
For MacOS users, you can install [OrbStack as a docker alternative](docs/contributing/orbstack.md).
107-
108-
For podman, refer to [Using Podman instead of Docker](docs/contributing/podman.md)
107+
For Podman users, refer to [Using Podman instead of Docker](docs/contributing/podman.md)
109108

110109
## Build
111110

crates/integration_tests/testdata/docker-compose.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,3 @@ services:
8080
- AWS_ACCESS_KEY_ID=admin
8181
- AWS_SECRET_ACCESS_KEY=password
8282
- AWS_REGION=us-east-1
83-
links:
84-
- rest:rest
85-
- minio:minio

crates/integration_tests/testdata/spark/provision.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
.getOrCreate()
3131
)
3232

33+
spark.sql(f"""CREATE NAMESPACE IF NOT EXISTS rest.default""")
34+
3335
spark.sql(
3436
f"""
3537
CREATE OR REPLACE TABLE rest.default.test_positional_merge_on_read_deletes (

docs/contributing/podman.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,30 @@
1919

2020
# Using Podman instead of Docker
2121

22-
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.
22+
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.
2323

2424
1. Have podman v4 or newer.
25-
```console
25+
```shell
2626
$ podman --version
2727
podman version 4.9.4-rhel
2828
```
29-
30-
2. Open file `/usr/bin/docker` and add the below contents:
29+
2. Create a docker wrapper script:
30+
31+
* Create a fresh `/usr/bin/docker` file and add the below contents:
3132
```bash
3233
#!/bin/sh
3334
[ -e /etc/containers/nodocker ] || \
3435
echo "Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg." >&2
3536
exec sudo /usr/bin/podman "$@"
3637
```
3738

39+
* Set new `/usr/bin/docker` file to executable.
40+
```shell
41+
sudo chmod +x /usr/bin/docker
42+
```
43+
3844
3. Install the [docker compose plugin](https://docs.docker.com/compose/install/linux). Check for successful installation.
39-
```console
45+
```shell
4046
$ docker compose version
4147
Docker Compose version v2.28.1
4248
```
@@ -53,7 +59,7 @@ Iceberg-rust does not require containerization, except for integration tests, wh
5359
```
5460

5561
6. Check that the following symlink exists.
56-
```console
62+
```shell
5763
$ ls -al /var/run/docker.sock
5864
lrwxrwxrwx 1 root root 27 Jul 24 12:18 /var/run/docker.sock -> /var/run/podman/podman.sock
5965
```
@@ -83,3 +89,12 @@ As of podman v4, ["To be succinct and simple, when running rootless containers,
8389
8490
* <https://www.redhat.com/sysadmin/container-ip-address-podman>
8591
* <https://github.com/containers/podman/blob/main/docs/tutorials/basic_networking.md>
92+
93+
# Debugging Note:
94+
- 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"`
95+
- Add or modify the `/etc/containers/registries.conf` file:
96+
```toml
97+
[[registry]]
98+
prefix = "docker.io"
99+
location = "docker.io"
100+
```

0 commit comments

Comments
 (0)