Skip to content

Commit

Permalink
fix: big table spin up logic for k8s (#298)
Browse files Browse the repository at this point in the history
tested locally on digital ocean
  • Loading branch information
h4ck3rk3y committed Oct 17, 2023
1 parent 2c64de0 commit e01ce16
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions src/full_beaconchain/full_beaconchain_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -104,28 +104,39 @@ def launch_full_beacon(

# Initialize the db schema
initdbschema = plan.add_service(
name="explorer-initdbschema",
name="explorer-schema-initializer",
config=ServiceConfig(
image=IMAGE_NAME,
files={
"/app/config/": config_files_artifact_name,
},
entrypoint=["./misc"],
cmd=["-config", "/app/config/config.yml", "-command", "applyDbSchema"],
entrypoint=["tail", "-f", "/dev/null"],
),
)

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
initbigtableschema = plan.add_service(
name="explorer-initbigtableschema",
config=ServiceConfig(
image=IMAGE_NAME,
files={
"/app/config/": config_files_artifact_name,
},
entrypoint=["./misc"],
cmd=["-config", "/app/config/config.yml", "-command", "initBigtableSchema"],
plan.exec(
service_name=initdbschema.name,
recipe=ExecRecipe(
[
"./misc",
"-config",
"/app/config/config.yml",
"-command",
"initBigtableSchema",
]
),
)

# Start the indexer
indexer = plan.add_service(
name="explorer-indexer",
Expand Down

0 comments on commit e01ce16

Please sign in to comment.