aboutsummaryrefslogtreecommitdiffstats
path: root/asdctool/src/main/resources/es-resources/README.txt
blob: a7006efa80cc38ad8b9b942bbe471e3506a9a112 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
ASDC elasticsearch tool
========================

This tool purpose is to ease and allow updating elasticsearch indices.

In order to use the scripts, you need to verify Python is installed and to install the elasticsearc-py library:
	Verify pip is installed:		$command -v pip
	if not installed:	
		Download https://bootstrap.pypa.io/get-pip.py
		$python get-pip.py  (see instruction: https://pip.pypa.io/en/latest/installing/#installing-with-get-pip-py)
	$pip install elasticsearch


Tool contains:
	- index_ops.py
	  This script includes operations on elasticsearch index:
	  
	  create index:
		$python index_ops.py -o create -a <elasticsearch hostname> -n <indexName> -f <index mapping file>
		
	  delete index:
		$python index_ops.py -o delete -a <elasticsearch hostname> -n <indexName>
	  
	  copy index (assumes destination index already exists):
	    $python index_ops.py -o move -a <elasticsearch hostname> -n <indexName> -t <toIndex>
		
		
	- file_utils.py
	  This script includes operations on files 
	  
	- audit_migration_1602.py
	  This script run full flow to migrate audit information from previous versions to ASDC 1602
	  It has 2 inputs:
	   1. config_properties.py - this file holds configuration (hostname, index name, index mapping file etc.)
	   2. folder of fields mapping per elasticsearch type (map old field to new field)
	  The flow of this script is as follow:
	   * create temp index with correct index mapping
	   * scan the audit index to get all records
	   * manipulate fields data and insert it to temp index
	   * delete audit index 
	   * create audit index with correct mapping
	   * copy from temp index to newly created audit index
	   * delete temp index