PR to pull over pm-mobymask-v3-demo to upstream repo branch for testing #761

Merged
dboreham merged 14 commits from deep-stack/stack-orchestrator:pm-mobymask-v3-demo into dboreham/mobymask-v3-demo-test 2024-02-22 21:43:31 +00:00
Showing only changes of commit 3d3d617531 - Show all commits

View File

@ -16,6 +16,7 @@
from stack_orchestrator.deploy.deployment_context import DeploymentContext
from ruamel.yaml import YAML
def create(context: DeploymentContext, extra_args):
fixturenet_eth_compose_file = context.deployment_dir.joinpath('compose', 'docker-compose-fixturenet-eth.yml')
@ -32,18 +33,28 @@ def create(context: DeploymentContext, extra_args):
yaml.dump(yaml_data, yaml_file)
# load fixturenet-optimism compose file
fixturenet_optimism_compose_file = context.deployment_dir.joinpath('compose', 'docker-compose-fixturenet-optimism.yml')
fixturenet_optimism_compose_file = context.deployment_dir.joinpath(
"compose",
"docker-compose-fixturenet-optimism.yml"
)
with open(fixturenet_optimism_compose_file, 'r') as yaml_file:
yaml = YAML()
yaml_data = yaml.load(yaml_file)
# mount the funding script to volumes
fund_accounts_script = '../config/watcher-mobymask-v3-demo/local/fund-accounts-on-l2.sh:/app/packages/contracts-bedrock/fund-accounts-on-l2.sh'
fund_accounts_script = (
'../config/watcher-mobymask-v3-demo/local/fund-accounts-on-l2.sh'
':/app/packages/contracts-bedrock/fund-accounts-on-l2.sh'
)
yaml_data['services']['fixturenet-optimism-contracts']['volumes'].append(fund_accounts_script)
# update command to run the script
yaml_data['services']['fixturenet-optimism-contracts']['command'] = '"./wait-for-it.sh -h ${CERC_L1_HOST:-$${DEFAULT_CERC_L1_HOST}} -p ${CERC_L1_PORT:-$${DEFAULT_CERC_L1_PORT}} -s -t 60 -- ./deploy-contracts.sh && ./fund-accounts-on-l2.sh"'
yaml_data['services']['fixturenet-optimism-contracts']['command'] = (
'"./wait-for-it.sh -h ${CERC_L1_HOST:-$${DEFAULT_CERC_L1_HOST}}'
' -p ${CERC_L1_PORT:-$${DEFAULT_CERC_L1_PORT}} -s -t 60'
' -- ./deploy-contracts.sh && ./fund-accounts-on-l2.sh"'
)
# update port mapping for op-geth: 0.0.0.0:8545:8545
existing_ports = yaml_data['services']['op-geth']['ports']