Skip to content

use docker run --link option to link a new cassandra node to another #21

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

Merged
merged 1 commit into from
Aug 13, 2015

Conversation

clakech
Copy link
Contributor

@clakech clakech commented Aug 6, 2015

Hi,

I am using this image to setup a spark+cassandra cluster and I was wondering if we could use the docker run --link option to link new node to the first one instead of docker inspect command value pass to an environnement variable.

With this change, adding a node to the cluster is simpler, isn't it ?

docker run --name some-cassandra2 -d --link some-cassandra:cassandra cassandra:tag

WDYT? sorry if I am wrong, I am neither a docker expert, nor a C* one ;-)

@yosifkit
Copy link
Member

Seems sane, but I would rather use 'cassandra' as the value if there is a link, so that when the linked container is restarted it can use the updated /etc/hosts entry to find the seed node again. Would it work with a DNS name rather than an IP address?

@clakech
Copy link
Contributor Author

clakech commented Aug 13, 2015

👍 sounds good!

This PR already add value to the container in that state.

I need to test with cassandra hostname. Implementation may bit a bit different to check if link is used then use cassandra hostname but it is easy to do.

@clakech
Copy link
Contributor Author

clakech commented Aug 13, 2015

🏁 update branch and testing done. Seems ok with your proposal!

@yosifkit
Copy link
Member

LGTM

yosifkit added a commit that referenced this pull request Aug 13, 2015
use docker run --link option to link a new cassandra node to another
@yosifkit yosifkit merged commit db8d712 into docker-library:master Aug 13, 2015
@clakech
Copy link
Contributor Author

clakech commented Aug 15, 2015

Thanks,

I send a PR to update the documentation here: docker-library/docs#303

Could someone take a look ?

Bye

tianon added a commit to infosiftr/stackbrew that referenced this pull request Aug 17, 2015
- `cassandra`: `--link` for seeding (docker-library/cassandra#21)
- `drupal`: update Drupal 7 to use PHP 5.6 (docker-library/drupal#9)
- `elasticsearch`: minor template updates (docker-library/elasticsearch#45)
- `logstash`: add 1.4 as a supported version (docker-library/logstash#21)
- `mariadb`: add `initdb` directory support (MariaDB/mariadb-docker#18)
- `owncloud`: 8.0.6, caching modules (docker-library/owncloud#16)
- `percona`: add `initdb` directory support (docker-library/percona#6)
RichardScothern pushed a commit to RichardScothern/official-images that referenced this pull request Jun 14, 2016
- `cassandra`: `--link` for seeding (docker-library/cassandra#21)
- `drupal`: update Drupal 7 to use PHP 5.6 (docker-library/drupal#9)
- `elasticsearch`: minor template updates (docker-library/elasticsearch#45)
- `logstash`: add 1.4 as a supported version (docker-library/logstash#21)
- `mariadb`: add `initdb` directory support (MariaDB/mariadb-docker#18)
- `owncloud`: 8.0.6, caching modules (docker-library/owncloud#16)
- `percona`: add `initdb` directory support (docker-library/percona#6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants