-
Notifications
You must be signed in to change notification settings - Fork 3.7k
CASSANDRA-18035: Add quick start development guide and ant targets for local docker development #1996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
2d79c03
to
af6d62b
Compare
af6d62b
to
d1f5759
Compare
c934c6b
to
0ccf661
Compare
0ccf661
to
058fd52
Compare
…velopment Patch by Paulo Motta; Reviewed by X for CASSANDRA-18035
058fd52
to
18e77fe
Compare
@@ -11,16 +11,18 @@ For more information, see http://cassandra.apache.org/[the Apache Cassandra web | |||
|
|||
Issues should be reported on https://issues.apache.org/jira/projects/CASSANDRA/issues/[The Cassandra Jira]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pauloricardomg this whole file should be called "README.adoc". "asc" suffix does not make the document rendered in IDEA automatically.
----- | ||
|
||
[start=2] | ||
2. On IntelliJ IDEA startup screen, open the the directory of your Cassandra project (/path/to/cassandra). It may take a little bit until the IDE loads all dependencies and indexes the project. Please refer to the troubleshooting items below if you face any issues when loading Cassandra on IntelliJ IDEA: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double "the the"
* ⛔ If a `JDK11 is missing` error message pops up, click `configure` > `Add new JDK` and point to the installed JDK, usually located in `/usr/lib/jvm/<jdk>` in Debian-based systems or `/Library/Java/JavaVirtualMachines/<jdk>` on macOS. | ||
|
||
[start=3] | ||
3. In order to check that the project is loaded orrectly, open the test class https://github.com/apache/cassandra/blob/trunk/test/distributed/org/apache/cassandra/distributed/test/RepairTest.java[test/distributed/org/apache/cassandra/distributed/test/RepairTest.java] and attempt to run this test suite by right-clicking in the test class name (`RepairTest`) and selecting the option `Run RepairTest` or using the shortcut `Ctrl+Shift+F10` after clicking on the class name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing "c" in "orrectly"
@@ -0,0 +1,33 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt this be #!/bin/sh
?
fi | ||
|
||
if [ $( docker ps -a -f name=cassandra-test | wc -l ) -eq 2 ]; then | ||
CONTAINER=`docker rm --force cassandra-test` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEA says Use $(...) notation instead of legacy backticked
....
## Create network if does not exist | ||
docker network create cassandra-test 2>/dev/null || true | ||
|
||
CONTAINER_ID=`docker run --rm --name cassandra-test --network cassandra-test -d apache/cassandra-test` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEA says: Use $(...) notation instead of legacy backticked
fi | ||
|
||
# Check if container is already running | ||
if [ $( docker ps -a -f name=cassandra-test | wc -l ) -eq 2 ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEA says: Quote this to prevent word splitting.
Probably should be something like this:
if [ "$(docker ps -a -f name=cassandra-test | wc -l)" -eq 2 ]; then
@@ -0,0 +1,64 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#!/bin/sh
?
EXPOSE 7000 7001 7199 9042 9160 | ||
|
||
# Container is healthy when JMX port is up | ||
HEALTHCHECK CMD /usr/bin/nc localhost -z 7199 || exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be replaced by nodetool status returning 0 exit code. The fact that this port is up does not necessarily mean that nodetool status will be successful as port is open but the node is still booting anyway under the hood.
} | ||
|
||
if [ "$1" = 'cassandra' ]; then | ||
: ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of these in this if
in IDEA emit issues like: "This default assignment may cause DoS due to globbing. Quote it."
fi | ||
|
||
# allow the container to be started with `--user` | ||
if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
See SC2166.
No description provided.