CASSANDRA-20181: Remove obsolete cqlsh Dockerfiles on 4.0#4634
Open
arvindKandpal-ksolves wants to merge 2 commits intoapache:cassandra-4.0from
Open
CASSANDRA-20181: Remove obsolete cqlsh Dockerfiles on 4.0#4634arvindKandpal-ksolves wants to merge 2 commits intoapache:cassandra-4.0from
arvindKandpal-ksolves wants to merge 2 commits intoapache:cassandra-4.0from
Conversation
Comment on lines
-17
to
-35
| There are Dockerfiles that can be used to test whether cqlsh works with a default, barebones | ||
| Python installation. Assuming Cassandra's source is checked out at `$CASSANDRA_DIR`. To test, first | ||
| build the Docker image containing the barebones Python installation - | ||
|
|
||
| $ docker build . --file Dockerfile.ubuntu.py3 -t ubuntu-lts-py3 | ||
|
|
||
| Next, run cqlsh inside the newly built image - | ||
|
|
||
| $ docker run -v $CASSANDRA_DIR:/code -it ubuntu-lts-py3:latest /code/bin/cqlsh host.docker.internal | ||
|
|
||
| If `host.docker.internal` isn't supported, then you can use `--net="host"` with `docker run`: | ||
|
|
||
| $ docker run --net="host" -v $CASSANDRA_DIR:/code -it ubuntu-lts-py3:latest /code/bin/cqlsh | ||
|
|
||
| This will try to spawn a cqlsh instance inside the Docker container running Ubuntu LTS (18.04) | ||
| with minimal Python installation. It will try to connect to the Cassandra instance running on the | ||
| Docker host at port 9042. If you have Cassandra running elsewhere, replace host.docker.internal | ||
| with the IP / hostname as usual. Please ensure that the IP / host is accessible from _within_ the | ||
| Docker container. No newline at end of file |
Member
There was a problem hiding this comment.
let's instead keep this, but use publicly available images…
(so it remains useful for folk who have docker but not python installed)
To run cqlsh using publicly available Docker images to connect to Cassandra on the same host, with `$CASSANDRA_DIR` pointing to either the source or install directory where `bin/cqlsh` is located.
For Python 3.8:
docker run -v $CASSANDRA_DIR:/code -it python:3.8-slim /code/bin/cqlsh host.docker.internal
For Python 3.11:
docker run -v $CASSANDRA_DIR:/code -it python:3.11-slim /code/bin/cqlsh host.docker.internal
If `host.docker.internal` isn't supported, then you can use `--net="host"`:
docker run --net="host" -v $CASSANDRA_DIR:/code -it python:3.8-slim /code/bin/cqlsh
This will spawn a cqlsh instance inside the Docker container. It will try to connect to the Cassandra instance running on the Docker host at port 9042. If you have Cassandra running elsewhere, replace host.docker.internal with the IP / hostname as usual.
updating the list^ for the python versions each cassandra branch actually supports (does 4.0 support 3.11 ?)
Contributor
Author
|
Thanks for review, @michaelsembwever ,😃 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses CASSANDRA-20181 on the
cassandra-4.0branch.Originally, these Dockerfiles were failing to build because they relied on EOL Ubuntu images. Following the discussion in the Jira ticket, it was decided to remove these files entirely to reduce the maintenance burden, as there are alternative ways to run these tests.
Changes
pylib/Dockerfile.ubuntu.py2pylib/Dockerfile.ubuntu.py3pylib/Dockerfile.ubuntu.py37pylib/Dockerfile.ubuntu.py38pylib/README.ascto remove documentation referencing these Dockerfiles.Verification
I verified locally that the files are removed and
README.ascno longer contains the obsolete instructions.patch by Arvind Kandpal; for CASSANDRA-20181