You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p><ahref="https://docs.docker.com/engine/installation/">Docker</a> and <ahref="https://docs.docker.com/compose/install/">Docker Compose</a> will need to be installed in order to use the commands in this section.</p>
586
586
587
-
<p>First, build the Docker image and add it to your local image cache using the
588
-
<code>cassandra-reaper:latest</code> tag:</p>
587
+
<h3id="building-reaper-packages-with-docker">Building Reaper Packages with Docker</h3>
<p>Building Reaper packages requires quite a few dependencies, especially when making changes to the web interface code. In an effort to simplify the build process, Dockerfiles have been created that implement the build actions required to package Reaper.</p>
590
+
591
+
<p>To build the JAR and other packages which are then placed in the <em>packages</em> directory run the following commands from the top level directory:</p>
592
+
593
+
<pre><codeclass="language-bash">cd src/packaging
594
+
docker-compose build reaper-build-packages && docker-compose run reaper-build-packages
<p>To build the Reaper Docker Image which is then added to the local image cache using the <code>cassandra-reaper:latest</code> tag, run the following commands from the top level directory:</p>
600
+
601
+
<pre><codeclass="language-bash">cd src/server
602
+
mvn package docker:build
603
+
</code></pre>
604
+
605
+
<p>Note that the above command will build the Reaper JAR and place it in the <em>src/server/target</em> directory prior to creating the Docker Image. It is also possible to build the JAR file using the <ahref="building-reaper-packages-with-docker">Docker package build</a> instructions and omitting the <code>package</code> command from the above Maven commands.</p>
<p>The <code>docker-compose</code> services available allow for orchestration of an environment that uses default settings. In addition, services are provided that allow orchestration of an environment in which the connections between the services are SSL encrypted. Services which use SSL encryption contain a <code>-ssl</code> suffix in their name.</p>
<p>From the top level directory change to the <em>src/packaging</em> directory:</p>
597
614
598
-
<p>You can use the <code>nodetool</code> Docker Compose service to check on the Cassandra
599
-
node’s status:</p>
615
+
<pre><codeclass="language-bash">cd src/packaging
616
+
</code></pre>
600
617
601
-
<p><code>docker-compose run nodetool status</code></p>
618
+
<p>Start the Cassandra cluster:</p>
602
619
603
-
<p>Once the Cassandra node is online and accepting CQL connections,
604
-
create the required <code>reaper_db</code> Cassandra keyspace to allow Reaper to save
605
-
its cluster and scheduling data.</p>
620
+
<pre><codeclass="language-bash">docker-compose up cassandra
621
+
</code></pre>
606
622
607
-
<p>By default, the <code>reaper_db</code> keyspace is created using a replication factor
608
-
of 1. To change this replication factor, provide the intended replication
609
-
factor as an optional argument:</p>
623
+
<p>The <code>nodetool</code> Docker Compose service can be used to check on the Cassandra node’s status:</p>
610
624
611
-
<p><code>docker-compose run initialize-reaper_db [$REPLICATION_FACTOR]</code></p>
625
+
<pre><codeclass="language-bash">docker-compose run nodetool status
626
+
</code></pre>
612
627
613
-
<p>Wait a few moments for the <code>reaper_db</code> schema change to propagate,
614
-
then start Reaper:</p>
628
+
<p>Once the Cassandra node is online and accepting CQL connections, create the required <code>reaper_db</code> Cassandra keyspace to allow Reaper to save its cluster and scheduling data.</p>
615
629
616
-
<p><code>docker-compose up reaper</code></p>
630
+
<p>By default, the <code>reaper_db</code> keyspace is created using a replication factor of 1. To change this replication factor, provide the intended replication factor as an optional argument:</p>
631
+
632
+
<pre><codeclass="language-bash">docker-compose run cqlsh-initialize-reaper_db [$REPLICATION_FACTOR]
633
+
</code></pre>
634
+
635
+
<p>Wait a few moments for the <code>reaper_db</code> schema change to propagate, then start Reaper:</p>
636
+
637
+
<pre><codeclass="language-bash">docker-compose up reaper
<p>From the top level directory change to the <em>src/packaging</em> directory:</p>
643
+
644
+
<pre><codeclass="language-bash">cd src/packaging
645
+
</code></pre>
646
+
647
+
<p>Generate the SSL Keystore and Truststore which will be used to encrypt the connections between Reaper and Cassandra.</p>
648
+
649
+
<pre><codeclass="language-bash">docker-compose run generate-ssl-stores
650
+
</code></pre>
651
+
652
+
<p>Start the Cassandra cluster which encrypts both the JMX and Native Protocol:</p>
653
+
654
+
<pre><codeclass="language-bash">docker-compose up cassandra-ssl
655
+
</code></pre>
656
+
657
+
<p>The <code>nodetool-ssl</code> Docker Compose service can be used to check on the Cassandra node’s status:</p>
658
+
659
+
<pre><codeclass="language-bash">docker-compose run nodetool-ssl status
660
+
</code></pre>
661
+
662
+
<p>Once the Cassandra node is online and accepting encrypted SSL connections via the Native Transport protocol, create the required <code>reaper_db</code> Cassandra keyspace to allow Reaper to save its cluster and scheduling data.</p>
663
+
664
+
<p>By default, the <code>reaper_db</code> keyspace is created using a replication factor of 1. To change this replication factor, provide the intended replication factor as an optional argument:</p>
665
+
666
+
<pre><codeclass="language-bash">docker-compose run cqlsh-initialize-reaper_db-ssl [$REPLICATION_FACTOR]
667
+
</code></pre>
668
+
669
+
<p>Wait a few moments for the <code>reaper_db</code> schema change to propagate, then start the Reaper service that will establish encrypted connections to Cassandra:</p>
670
+
671
+
<pre><codeclass="language-bash">docker-compose up reaper-ssl
672
+
</code></pre>
617
673
618
674
<h3id="access-the-environment">Access The Environment</h3>
619
675
@@ -623,22 +679,33 @@ <h3 id="access-the-environment">Access The Environment</h3>
623
679
624
680
<p>When adding the Cassandra node to the Reaper UI, use the IP address found via:</p>
625
681
626
-
<p><code>docker-compose run nodetool status</code></p>
682
+
<pre><codeclass="language-bash">docker-compose run nodetool status
683
+
</code></pre>
684
+
685
+
<p>The helper <code>cqlsh</code> Docker Compose service has also been included for both the default and SSL encrypted environments:</p>
627
686
628
-
<p>The helper <code>cqlsh</code> Docker Compose service has also been included:</p>
0 commit comments