Skip to content
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

Docker compose environment #136

Merged
merged 3 commits into from
Jul 18, 2017
Merged

Conversation

joaquincasares
Copy link
Contributor

@joaquincasares joaquincasares commented Jul 8, 2017

This PR is dependent on #135.

This is the last PR in an effort to to deprecate #46.

This adds a sample Cassandra node, including all the required settings and Docker Compose services in order to run Reaper in a clean and isolated environment with the only dependencies being Docker and Docker Compose.

I've also included a semi-lengthy, in-depth view of Docker Compose infrastructure within ./docker/README.md. At the end of this README, are instructions for how to run Dockerized Reaper within production environments.

# create the required reaper_db keyspace to allow Reaper to store scheduling data
CMD set -x \
&& cqlsh cassandra -e \
"CREATE KEYSPACE IF NOT EXISTS reaper_db WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 };"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be assuming RF=1 anywhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this RF (i presume) it only for the one-node-cassandra within the docker container.

Maybe it's the applicaton's responsibility to log a warning at startup if RF=1 and N>1
wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on having an application logging if the RF is set lower than expected.

@michaelsembwever
Copy link
Member

@joaquincasares you can't merge master into branches.
ref 01c939a

Branches (that are intended for master) must be rebased off master.

@michaelsembwever
Copy link
Member

michaelsembwever commented Jul 15, 2017

I don't think it's related to this PR, but
make all fails for me (linux) with

fpm -s dir -t deb -n reaper -v `mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\['` --pre-install debian/preinstall.sh -C build .

@ossarga
Copy link
Contributor

ossarga commented Jul 17, 2017

Fails for me on (Mac OS X). You are right @michaelsembwever it is unrelated because I see the same problem on the master branch.

@michaelsembwever
Copy link
Member

The docker commands now work for me! (a couple of local pax issues i had to overcome)

@joaquincasares joaquincasares force-pushed the docker-compose-environment branch from 01c939a to 81d42b1 Compare July 17, 2017 19:51
@joaquincasares
Copy link
Contributor Author

reaper_db Replication Factor

@rustyrazorblade @michaelsembwever reaper_db now defaults to an RF of 1, but providing an additional argument will overwrite the default of 1, for 3, for example:

docker-compose run initialize-reaper_db 3

Rebased

@michaelsembwever I've rebased and force pushed into the same branch.

Makefile

@michaelsembwever @ossarga I did change the Make command on #134 to move from $() to using backticks (`) in order to get the build command working within an Ubuntu Docker container. I know it definitely works within Docker, but not sure how to support both, or to instead just name Docker as the only prerequisite for the build process.

I'd vote for the latter to simplify all documentation around the Make command and ensure the process works across all flavors of Linux and versions of OS X, without the need for many dependencies as the dependency list is currently quite high:

While I do notice that nodejs is only needed for building the UI, and that git and ruby-dev are downstream dependencies for also building the UI, if we were to not go along the Docker-first path for building our packages, we'll have to update our documentation for the following processes:

  • How to build on OS X
  • How to build on Linux
  • How to build with Docker
  • How to build the UI in OS X
  • How to build the UI in Linux
  • How to build the UI in Docker

The current documenation is essentially:

Local pax Issues

@michaelsembwever could you elaborate please?

@michaelsembwever
Copy link
Member

@michaelsembwever could you elaborate please?

i've solved this, it was a local issue around PaX controls.

@joaquincasares joaquincasares merged commit 43cdb4b into master Jul 18, 2017
@joaquincasares joaquincasares deleted the docker-compose-environment branch July 18, 2017 01:43
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.

4 participants