Commit e01ce160 authored by Gyanendra Mishra's avatar Gyanendra Mishra Committed by GitHub

fix: big table spin up logic for k8s (#298)

tested locally on digital ocean
parent 2c64de05
...@@ -104,28 +104,39 @@ def launch_full_beacon( ...@@ -104,28 +104,39 @@ def launch_full_beacon(
# Initialize the db schema # Initialize the db schema
initdbschema = plan.add_service( initdbschema = plan.add_service(
name="explorer-initdbschema", name="explorer-schema-initializer",
config=ServiceConfig( config=ServiceConfig(
image=IMAGE_NAME, image=IMAGE_NAME,
files={ files={
"/app/config/": config_files_artifact_name, "/app/config/": config_files_artifact_name,
}, },
entrypoint=["./misc"], entrypoint=["tail", "-f", "/dev/null"],
cmd=["-config", "/app/config/config.yml", "-command", "applyDbSchema"],
), ),
) )
plan.print("applying db schema")
plan.exec(
service_name=initdbschema.name,
recipe=ExecRecipe(
["./misc", "-config", "/app/config/config.yml", "-command", "applyDbSchema"]
),
)
plan.print("applying big table schema")
# Initialize the bigtable schema # Initialize the bigtable schema
initbigtableschema = plan.add_service( plan.exec(
name="explorer-initbigtableschema", service_name=initdbschema.name,
config=ServiceConfig( recipe=ExecRecipe(
image=IMAGE_NAME, [
files={ "./misc",
"/app/config/": config_files_artifact_name, "-config",
}, "/app/config/config.yml",
entrypoint=["./misc"], "-command",
cmd=["-config", "/app/config/config.yml", "-command", "initBigtableSchema"], "initBigtableSchema",
]
), ),
) )
# Start the indexer # Start the indexer
indexer = plan.add_service( indexer = plan.add_service(
name="explorer-indexer", name="explorer-indexer",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment