This is an automated email from the ASF dual-hosted git repository.

eamonford pushed a commit to branch install-deletebyquery-in-image
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git


The following commit(s) were added to refs/heads/install-deletebyquery-in-image 
by this push:
     new e9b1421  Readme
e9b1421 is described below

commit e9b1421112994151e0f9938e6c12cd7e429e0a16
Author: Eamon Ford <[email protected]>
AuthorDate: Wed Nov 25 10:40:25 2020 -0800

    Readme
---
 docker/nexus-webapp/Dockerfile |  2 ++
 tools/deletebyquery/README.md  | 25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/docker/nexus-webapp/Dockerfile b/docker/nexus-webapp/Dockerfile
index ee9589d..d789bc2 100644
--- a/docker/nexus-webapp/Dockerfile
+++ b/docker/nexus-webapp/Dockerfile
@@ -94,6 +94,8 @@ WORKDIR /incubator-sdap-nexus/tools/deletebyquery
 RUN pip install -r requirements.txt
 RUN rm requirements.txt
 
+WORKDIR /incubator-sdap-nexus
+
 # Upgrade kubernetes client jar from the default version
 RUN rm /opt/spark/jars/kubernetes-client-4.1.2.jar
 ADD 
https://repo1.maven.org/maven2/io/fabric8/kubernetes-client/4.4.2/kubernetes-client-4.4.2.jar
 /opt/spark/jars
diff --git a/tools/deletebyquery/README.md b/tools/deletebyquery/README.md
new file mode 100644
index 0000000..97cf4db
--- /dev/null
+++ b/tools/deletebyquery/README.md
@@ -0,0 +1,25 @@
+# Deleting Datasets from SDAP
+
+## Prerequisites
+
+_If you are running the `deletebyquery.py` script from within the 
nexus-webapp-driver Docker image, the following prerequisites are not 
necessary._
+
+* Run `python setup.py install` in `incubator-sdap-nexus/data-access` 
+* Run `python setup.py install` in `incubator-sdap-nexus/analysis` 
+* Run `pip install -r requirements.txt` in 
`incubator-sdap-nexus/tools/deletebyquery`
+
+## Running the Script
+_Note: It is recommended to run this from within the nexus-webapp-driver 
Docker image._
+
+```
+python deletebyquery.py --solr <solr host>:8983 --cassandra <cassandra host> 
--cassandraUsername <cassandra username> --cassandraPassword <cassandra 
password> --query '<solr query>'
+```
+
+Run `python deletebyquery.py` without any arguments to see the full list of 
options.
+
+## Usage Example
+To delete a dataset called `my_dataset`, with SDAP deployed using the Helm 
chart, run the following from within the nexus-webapp-driver Docker image:
+```
+cd /incubator-sdap-nexus/tools/deletebyquery
+python deletebyquery.py --solr sdap-solr-svc:8983 --cassandra sdap-cassandra 
--cassandraUsername cassandra --cassandraPassword cassandra --query 
'dataset_s:"my_dataset"'
+```
\ No newline at end of file

Reply via email to