Changeset View
Changeset View
Standalone View
Standalone View
dockerfiles/swh-scheduler-api/entrypoint.sh
- This file was added.
Property | Old Value | New Value |
---|---|---|
File Mode | null | 100755 |
#!/bin/bash | |||||
set -e | |||||
if [[ -d /src ]] ; then | |||||
for srcrepo in /src/swh-* ; do | |||||
pushd $srcrepo | |||||
pip install -e . | |||||
popd | |||||
done | |||||
fi | |||||
echo "${PGHOST}:5432:${POSTGRES_DB}:${PGUSER}:${POSTGRES_PASSWORD}" > ~/.pgpass | |||||
cat > ~/.pg_service.conf <<EOF | |||||
[swh] | |||||
dbname=${POSTGRES_DB} | |||||
host=${PGHOST} | |||||
port=5432 | |||||
user=${PGUSER} | |||||
EOF | |||||
chmod 0400 ~/.pgpass | |||||
case "$1" in | |||||
"shell") | |||||
exec bash -i | |||||
;; | |||||
*) | |||||
echo Setup the database | |||||
swh-db-init scheduler --db-name ${POSTGRES_DB} | |||||
ardumont: In D816, i improved the initialization part to be idempotent (not perfect but it works ;)
In… | |||||
Done Inline Actions
yes! douardda: > Should i go do the cascading?
yes! | |||||
Not Done Inline Actions
It's in progress btw (core is deployed and pushed to pypi, storage and scheduler should be soon too). ardumont: > yes!
It's in progress btw (core is deployed and pushed to pypi, storage and scheduler should… | |||||
Not Done Inline ActionsDone, we can now merge the db initialization step and the starting one (cf. D817). ardumont: Done, we can now merge the db initialization step and the starting one (cf. D817). | |||||
Not Done Inline ActionsAnd remove the --no-create! ardumont: And remove the --no-create! | |||||
Not Done Inline Actionslog says swh-storage, should say swh-scheduler. ardumont: log says swh-storage, should say swh-scheduler. | |||||
echo Starting the swh-storage API server | |||||
exec python -m swh.scheduler.api.server /scheduler.yml | |||||
esac |
In D816, i improved the initialization part to be idempotent (not perfect but it works ;)
In D817, i used it so the init takes place prior to the server's startup.
This is usable as long as we use the docker-compose.override.yml for now.
the real fix would be to cascade a tag version from swh.core to swh.storage and now to swh.scheduler (tagging them also).
Should i go do the cascading?