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
Copy file name to clipboardExpand all lines: README.md
+71-57Lines changed: 71 additions & 57 deletions
Original file line number
Diff line number
Diff line change
@@ -18,38 +18,48 @@ TIMDEX! Index Manager (TIM) is a Python CLI application for managing TIMDEX indi
18
18
19
19
1. Run the following command:
20
20
21
-
```bash
22
-
docker run -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" \
23
-
-e "plugins.security.disabled=true" \
24
-
opensearchproject/opensearch:2.11.1
25
-
```
21
+
```bash
22
+
docker run -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" \
23
+
-e "plugins.security.disabled=true" \
24
+
opensearchproject/opensearch:2.11.1
25
+
```
26
26
27
27
2. To confirm the instance is up, run `pipenv run tim -u localhost ping` or visit http://localhost:9200/. This should produce a log that looks like the following:
28
-
```
29
-
2024-02-08 13:22:16,826 INFO tim.cli.main(): OpenSearch client configured for endpoint 'localhost'
28
+
29
+
```text
30
+
2024-02-08 13:22:16,826 INFO tim.cli.main(): OpenSearch client configured for endpoint 'localhost'
30
31
31
-
Name: docker-cluster
32
-
UUID: RVCmwQ_LQEuh1GrtwGnRMw
33
-
OpenSearch version: 2.11.1
34
-
Lucene version: 9.7.0
32
+
Name: docker-cluster
33
+
UUID: RVCmwQ_LQEuh1GrtwGnRMw
34
+
OpenSearch version: 2.11.1
35
+
Lucene version: 9.7.0
35
36
36
-
2024-02-08 13:22:16,930 INFO tim.cli.log_process_time(): Total time to complete process: 0:00:00.105506
37
-
```
37
+
2024-02-08 13:22:16,930 INFO tim.cli.log_process_time(): Total time to complete process: 0:00:00.105506
38
+
```
38
39
39
40
### Running Opensearch and OpenSearch Dashboards locally with Docker
40
41
41
42
You can use the included Docker Compose file ([compose.yaml](compose.yaml)) to start an OpenSearch instance along with OpenSearch Dashboards, "[the user interface that lets you visualize your Opensearch data and run and scale your OpenSearch clusters](https://opensearch.org/docs/latest/dashboards/)". Two tools that are useful for exploring indices are [DevTools](https://opensearch.org/docs/latest/dashboards/dev-tools/index-dev/) and [Discover](https://opensearch.org/docs/latest/dashboards/discover/index-discover/).
42
43
43
44
**Note:** To use Discover, you'll need to create an index pattern. When creating the index pattern, decline the option to set a date field. When set, it detects a date field in our indices but then crashes trying to use it. When prompted, enter an index or alias to pull patterns from, and it will automatically be configured to work well enough for initial data exploration.
44
45
46
+
First, ensure the following environment variables are set:
2. To confirm the instance is up, run `pipenv run tim ping` or visit http://localhost:9200/.
53
63
54
64
3. Access OpenSearch Dashboards through <http://localhost:5601>.
55
65
@@ -60,25 +70,28 @@ For a more detailed example with test data, please refer to the Confluence docum
60
70
1. Follow the instructions in either [Running Opensearch locally with Docker](#running-opensearch-locally-with-docker) or [Running Opensearch and OpenSearch Dashboards locally with Docker](#running-opensearch-and-opensearch-dashboards-locally-with-docker).
61
71
62
72
2. Open a new terminal, and create a new index. Copy the name of the created index printed to the terminal's output.
63
-
```
64
-
pipenv run tim create -s <source-name>
65
-
```
73
+
74
+
```shell
75
+
pipenv run tim create -s <source-name>
76
+
```
66
77
67
78
3. Copy the index name and promote the index to the alias.
68
79
69
-
```
70
-
pipenv run tim promote -a <source-name> -i <index-name>
71
-
```
80
+
```shell
81
+
pipenv run tim promote -a <source-name> -i <index-name>
82
+
```
72
83
73
84
4. Bulk index records from a specified directory (e.g., including S3).
74
-
```
75
-
pipenv run tim bulk-index -s <source-name><filepath-to-records>
76
-
```
85
+
86
+
```shell
87
+
pipenv run tim bulk-index -s <source-name><filepath-to-records>
88
+
```
77
89
78
90
5. After verifying that the bulk-index was successful, clean up your local OpenSearch instance by deleting the index.
79
-
```
80
-
pipenv run tim delete -i <index-name>
81
-
```
91
+
92
+
```shell
93
+
pipenv run tim delete -i <index-name>
94
+
```
82
95
83
96
### Running OpenSearch on AWS
84
97
@@ -115,31 +128,32 @@ SENTRY_DSN=### If set to a valid Sentry DSN, enables Sentry exception monitoring
115
128
All CLI commands can be run with `pipenv run`.
116
129
117
130
```
118
-
Usage: tim [OPTIONS] COMMAND [ARGS]...
119
-
120
-
TIM provides commands for interacting with OpenSearch indexes.
121
-
For more details on a specific command, run tim COMMAND -h.
0 commit comments