From getting barge going, here's how it calls specific pdr-backend components and passes arguments.
- user calls
/barge/start_ocean.sh
to get barge going- then,
start_ocean.sh
fillsCOMPOSE_FILES
incrementally. EgCOMPOSE_FILES+=" -f ${COMPOSE_DIR}/pdr-publisher.yml"
barge/compose-files/pdr-publisher.yml
sets:pdr-publisher: image: oceanprotocol/pdr-backend:${PDR_BACKEND_VERSION:-latest}
pdr-publisher: command: publisher
pdr-publisher: networks: backend: ipv4_address: 172.15.0.43
pdr-publisher: environment:
RPC_URL: ${NETWORK_RPC_URL}
(=http://localhost:8545
viastart_ocean.sh
)ADDRESS_FILE: /root/.ocean/ocean-contracts/artifacts/address.json
- (many
PRIVATE_KEY_*
) - then,
start_ocean.sh
pulls the$COMPOSE_FILES
as needed:[ ${FORCEPULL} = "true" ] && eval docker-compose "$DOCKER_COMPOSE_EXTRA_OPTS" --project-name=$PROJECT_NAME "$COMPOSE_FILES" pull
- then,
start_ocean.sh
runs docker-compose including all$COMPOSE_FILES
:eval docker-compose "$DOCKER_COMPOSE_EXTRA_OPTS" --project-name=$PROJECT_NAME "$COMPOSE_FILES" up --remove-orphans
- it executes each of the
"command"
entries in compose files.- (Eg for pdr-publisher.yml,
"command" = "publisher ppss.yaml development"
) - Which then goes to
pdr-backend/entrypoint.sh
via"python /app/pdr_backend/pdr $@"
- (where
@
is unpacked as egpublisher ppss.yaml development
) Ref.
- (where
- (Eg for pdr-publisher.yml,
- Then it goes through the usual CLI at
pdr-backend/pdr_backend/util/cli_module.py
- then,
If you made a change to pdr-backend CLI interface, then barge must call using the updated CLI command.
How:
- change the relevant compose file's
"command"
. Eg changebarge/compose-files/pdr-publisher.yml
's "command" value topublisher ppss.yaml development
- also, change envvar setup as needed. Eg in compose file, remove
RPC_URL
andADDRESS_FILE
entry. - ultimately, ask: "does Docker have everything it needs to succesfully run the component?"
- barge.md: the main Barge README
- barge-calls.md: order of execution from Barge and pdr-backend code
- release-process.md: pdr-backend Dockerhub images get published with each push to
main
, and sometimes other branches. In turn these are used by Barge.