Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup golden DB in merge-ci #141

Open
joshmoore opened this issue May 17, 2019 · 1 comment
Open

Setup golden DB in merge-ci #141

joshmoore opened this issue May 17, 2019 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@joshmoore
Copy link
Member

cc: @pwalczysko

@sbesson sbesson added enhancement New feature or request help wanted Extra attention is needed labels May 17, 2019
@sbesson
Copy link
Member

sbesson commented May 17, 2019

Added some notes capturing how this feature had been implemented in ci.openmicroscopy.org a few years back with @pwalczysko.

Minimally, this implementation can be seen as an extension of the PURGE_DATA option in devspace 0.11.0 as:

if [ "$PURGE_DATA" = "true" ]; then
dropdb -h $OMERO_DB_HOST -U $OMERO_DB_USER $OMERO_DB_NAME || echo "First run or already exists"
rm -rf $OMERO_DATA_DIR
else
echo "Skipping PURGE_DATA:CleanDbAndRepo"
fi

In addition to these comamnds purging the database and the binary repository, a subsequent step is to restore an existing reference DB + binary repo. There are a few assumptions here:

  • the database and the binary repo need to be available from the Jenkins environment

  • the golden DB to be created in a systematic way (pg_dump format, disk layout)

  • enough space need to be provisioned esp. for large valuable DBs. By default, the data directory is in the same place as the devspace clone.

    <hudson.model.StringParameterDefinition>
    <name>DATA_DIR</name>
    <description>Default is $HOME/omero-server-data</description>
    <defaultValue>$HOME/omero-server-data</defaultValue>
    </hudson.model.StringParameterDefinition>

    Minimally, this variable would need to be overriden or the path on disk symlinked to a larger volume with appropriate write permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants