-
Notifications
You must be signed in to change notification settings - Fork 3
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
Index version path #1012
Merged
Merged
Index version path #1012
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b3641bf
Rename update_stage_index to index_collection
amywieliczka 23fca8a
Indexer: Add rikolti.version_path, indexed_at, and page
amywieliczka a70d3a3
Write a migration script for currently indexed content
amywieliczka 36387ea
Add an opensearch dashboard (and required cluster) to docker-compose
amywieliczka 6412944
Rename add_page_to_index to index_page
amywieliczka e566075
Don't need rikolti harvest data on child record
amywieliczka e2dcb72
Update indexing/deletion process - refresh: true
amywieliczka 93780b5
Indexing reporting output; experiment with str formatting
amywieliczka 2f40459
Add calisphere-stage and version name to task output
amywieliczka 83ba28f
Add index and version to registry message
amywieliczka 7fa6b20
Create publish_collection_task
amywieliczka cc62ec4
Create Publish Collection DAG
amywieliczka 04133ad
Add rikolti-prd index to initialization script
amywieliczka d1ab7b4
Assigned indexing tasks to rikolti_opensearch_pool & updated docs
amywieliczka 60ab54c
Add lowercase_trim normalizer to type.raw field
amywieliczka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from datetime import datetime | ||
|
||
from airflow.decorators import dag | ||
from airflow.models.param import Param | ||
|
||
from rikolti.dags.shared_tasks.indexing_tasks import ( | ||
publish_collection_task, get_version_pages) | ||
from rikolti.dags.shared_tasks.shared import get_registry_data_task | ||
from rikolti.dags.shared_tasks.shared import notify_dag_success | ||
from rikolti.dags.shared_tasks.shared import notify_dag_failure | ||
|
||
|
||
@dag( | ||
dag_id="publish_collection", | ||
schedule=None, | ||
start_date=datetime(2023, 1, 1), | ||
catchup=False, | ||
params={ | ||
'collection_id': Param(None, description="Collection ID to publish"), | ||
'version': Param(None, description="Version path to publish") | ||
}, | ||
tags=["rikolti"], | ||
on_failure_callback=notify_dag_failure, | ||
on_success_callback=notify_dag_success, | ||
) | ||
def publish_collection_dag(): | ||
collection = get_registry_data_task() | ||
version_pages = get_version_pages() | ||
publish_collection_task(collection, version_pages) | ||
|
||
publish_collection_dag() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,68 @@ | ||
--- | ||
version: '3' | ||
services: | ||
opensearch-node: | ||
opensearch-node1: | ||
image: opensearchproject/opensearch:latest | ||
container_name: opensearch-node1 | ||
environment: | ||
- cluster.name=opensearch-cluster | ||
- node.name=opensearch-node1 | ||
- discovery.seed_hosts=opensearch-node1,opensearch-node2 | ||
- cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2 | ||
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping | ||
- OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m # minimum and maximum Java heap size, recommend setting both to 50% of system RAM | ||
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=Rikolti_05 # Sets the demo admin user password when using demo configuration, required for OpenSearch 2.12 and higher | ||
ulimits: | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
nofile: | ||
soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems | ||
hard: 65536 | ||
volumes: | ||
- opensearch-data1:/usr/share/opensearch/data | ||
ports: | ||
- "9200:9200" | ||
- "9600:9600" | ||
- 9200:9200 | ||
- 9600:9600 # required for Performance Analyzer | ||
networks: | ||
- opensearch-net | ||
opensearch-node2: | ||
image: opensearchproject/opensearch:latest | ||
container_name: opensearch-node2 | ||
environment: | ||
- "discovery.type=single-node" | ||
- cluster.name=opensearch-cluster | ||
- node.name=opensearch-node2 | ||
- discovery.seed_hosts=opensearch-node1,opensearch-node2 | ||
- cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2 | ||
- bootstrap.memory_lock=true | ||
- OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m | ||
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=Rikolti_05 | ||
ulimits: | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
nofile: | ||
soft: 65536 | ||
hard: 65536 | ||
volumes: | ||
- opensearch-data2:/usr/share/opensearch/data | ||
networks: | ||
- opensearch-net | ||
opensearch-dashboards: | ||
image: opensearchproject/opensearch-dashboards:latest | ||
container_name: opensearch-dashboards | ||
ports: | ||
- 5601:5601 | ||
expose: | ||
- '5601' | ||
environment: | ||
OPENSEARCH_HOSTS: '["https://opensearch-node1:9200","https://opensearch-node2:9200"]' | ||
networks: | ||
- opensearch-net | ||
|
||
volumes: | ||
opensearch-data1: | ||
opensearch-data2: | ||
|
||
networks: | ||
opensearch-net: |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You verbed the noun verb!