You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Paulo Motta (Jira)" <ji...@apache.org> on 2022/12/19 22:12:00 UTC

[jira] [Commented] (CASSANDRA-18035) Add quick start development guide and docker ant targets

    [ https://issues.apache.org/jira/browse/CASSANDRA-18035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17649490#comment-17649490 ] 

Paulo Motta commented on CASSANDRA-18035:
-----------------------------------------

I've updated the quick start development guide with more detailed macOS setup instructions and common troubleshooting tips.

I've tested the quick start guide with a few internal users and they were able to set up their environments and test local changes in a docker container within a few minutes. I believe this will improve the onboarding experience of new developers.

I plan to keep this guide updated as more users test it and report any issues with the instructions.

[~mck] [~stefan.miklosovic]  [~edimitrova] Would you be interested/have cycles to review this?

Summary of changes to reviewers:
 * Add new ant targets to manipulate a local Cassandra build container:
 ** [ant docker-build|https://github.com/pauloricardomg/cassandra/blob/CASSANDRA-18035/build.xml#L2007]: Builds a local "cassandra-test" image - this does not publish the image as it is initially intended for local development only.
 ** [ant docker-start|https://github.com/pauloricardomg/cassandra/blob/CASSANDRA-18035/build.xml#L2046]: Starts a local container based on the "cassandra-test" image
 ** [ant docker-stop|https://github.com/pauloricardomg/cassandra/blob/CASSANDRA-18035/build.xml#L2061]: Stops a local "cassandra-test" container
 ** Docker manifest and scripts are located in [.build/docker|https://github.com/pauloricardomg/cassandra/tree/CASSANDRA-18035/.build/docker]
 * Add quick start development guide to project's [README|https://github.com/pauloricardomg/cassandra/tree/CASSANDRA-18035#quick-start-development-guide], with the following sections:
 ** [Installing pre-requisites|https://github.com/pauloricardomg/cassandra/tree/CASSANDRA-18035#installing-pre-requisites]
 ** [Setting up IDE|https://github.com/pauloricardomg/cassandra/tree/CASSANDRA-18035#setting-up-ide]
 ** [Running a local Cassandra build in Docker|https://github.com/pauloricardomg/cassandra/tree/CASSANDRA-18035#running-a-local-cassandra-build-in-docker]
 ** [Testing local changes with docker|https://github.com/pauloricardomg/cassandra/tree/CASSANDRA-18035#testing-local-changes-with-docker]
 ** This in-tree guide provides an complement to the more extensive [Contributing to Cassandra|https://cassandra.apache.org/_/development/index.html] guide, which is still the authoritative source of information for development/contribution guides.

I plan to eventually extend the ant docker targets to support launching multi-node clusters with Docker-compose, and perhaps allow in-tree [cqlsh tests|https://github.com/apache/cassandra/tree/trunk/pylib] to use this image, which could eliminate the ccm dependency for these tests.

> Add quick start development guide and docker ant targets
> --------------------------------------------------------
>
>                 Key: CASSANDRA-18035
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18035
>             Project: Cassandra
>          Issue Type: Task
>          Components: Documentation
>            Reporter: Paulo Motta
>            Assignee: 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-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org