[ https://issues.apache.org/jira/browse/CASSANDRA-18035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17635016#comment-17635016 ]
Paulo Motta commented on CASSANDRA-18035: ----------------------------------------- Thanks everyone for reviews and feedback! In order to make local docker-based development easier to use, I wrapped local docker setup tasks in the following ant targets: * [docker-build|https://github.com/pauloricardomg/cassandra/blob/CASSANDRA-18035/build.xml#L1994]: Builds a local cassandra-test docker image ** Fails if docker does not exist or is not running. * [docker-start|https://github.com/pauloricardomg/cassandra/blob/CASSANDRA-18035/build.xml#L2033]: Starts a local cassandra-test docker container ** Fails if docker does not exist or is not running. ** Fails if image is not built. ** Fails if container is already running. * [docker-stop|https://github.com/pauloricardomg/cassandra/blob/CASSANDRA-18035/build.xml#L2048]: Stops a local cassandra-test docker container ** Fails if docker does not exist or is not running. ** Fails if docker if container is not running. [~mshuler] can you check if these new ant targets are working for you? In order to prevent the cassandra-test image from being (mis)used from outside these ant tasks, I've placed the Dockerfile templates in the hidden [.build/docker|https://github.com/pauloricardomg/cassandra/tree/CASSANDRA-18035/.build/docker] directory, since this Dockerfile is intended for local development testing only. In order to avoid fragmenting documentation into multiple files, I've placed the [Quick Start Development Guide|https://github.com/pauloricardomg/cassandra/tree/CASSANDRA-18035#quick-start-development-guide] into the project's main [README|https://github.com/pauloricardomg/cassandra/tree/CASSANDRA-18035#readme] file instead of the original approach of having additional QUICKSTART.md file - I think this is acceptable since the quick start development guide is pretty small. While we have detailed instructions in the [Contributing to Cassandra|https://cassandra.apache.org/_/development/index.html] section of the website, the idea is to ship some basic environment setup and validation instructions in the project README so users can get easily started when cloning/forking the project. If anyone is interested in reviewing, a rendered version of the proposed "Quick Start Development Guide" can be found in [https://github.com/pauloricardomg/cassandra/tree/CASSANDRA-18035#quick-start-development-guide]. I have pointed out in the new guide that more detailed contributor instructions can be found in the [Contributing to Cassandra|https://cassandra.apache.org/_/development/index.html] section of the website. I have created a [cassandra-website PR|https://github.com/apache/cassandra-website/pull/195] to add a reference to the new [Quick Start Development Guide|https://github.com/pauloricardomg/cassandra/tree/CASSANDRA-18035#quick-start-development-guide] in the [Contributing to Cassandra |https://cassandra.apache.org/_/development/index.html]section of the website. Does this work [~jmckenzie] ? > Add "Hello World" docker-based quick start development guide > ------------------------------------------------------------ > > Key: CASSANDRA-18035 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18035 > Project: Cassandra > Issue Type: Task > Reporter: Paulo Motta > Priority: Normal > Time Spent: 40m > Remaining Estimate: 0h > > I propose adding a new {{QUICKSTART.md}} guide that provides instructions to > beginner contributors on how to: > a) Setup a development environment and IDE from scratch on WSL/Ubuntu/Debian > environments > b) Run a simple unit test from the IDE > c) Create a simple patch that prints "Hello World" during Cassandra > initialization > d) Test the patch on a local docker instance > A new {{docker/}} directory is added along with the guide with the following > utilities: > a) Dockerfile: unoptimized vanilla docker image manifest suitable only for > local dev testing. > b) build.sh: build a cassandra artifact and cassandra-test image. > c) start.sh: start local cassandra-test container. > d) stop.sh: stop local-cassandra test container. > A couple of follow-up improvements that come to mind: > - Add ant targets to build/start/stop cassandra-test container. > - Add OSX instructions. > - More IDE setup instructions (ie. Eclipse/VScode). > - A more involved Hello World example, perhaps creating a dummy VirtualTable > with unit/dtests. > - Update Dockerfile to point to build/ instead of creating an artifact. > A DEV mailing list message was sent to gather community feedback on this > proposal: https://lists.apache.org/thread/gmb0q5yb2bzbs0cjw7mlcz1vwk2l23g2 -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org