diff --git a/src/runboat/kubefiles/runboat-clone-and-install.sh b/src/runboat/kubefiles/runboat-clone-and-install.sh index 3b1b05a..d29f4d0 100755 --- a/src/runboat/kubefiles/runboat-clone-and-install.sh +++ b/src/runboat/kubefiles/runboat-clone-and-install.sh @@ -2,13 +2,15 @@ set -exo pipefail -# Remove initialization sentinel, in case we are reinitializing. -rm -fr /mnt/data/initialized +# Remove initialization sentinel and data, in case we are reinitializing. +rm -fr /mnt/data/* # Remove addons dir, in case we are reinitializing after a previously # failed installation. rm -fr $ADDONS_DIR # Download the repository at git reference into $ADDONS_DIR. +# We use curl instead of git clone because the git clone method used more than 1GB RAM, +# which exceeded the default pod memory limit. mkdir -p $ADDONS_DIR cd $ADDONS_DIR curl -sSL https://github.com/${RUNBOAT_GIT_REPO}/tarball/${RUNBOAT_GIT_REF} | tar zxf - --strip-components=1 @@ -25,7 +27,6 @@ else fi # Keep a copy of the venv that we can re-use for shorter startup time. -DEBIAN_FRONTEND=noninteractive apt-get -yqq install rsync -rsync -a --delete /opt/odoo-venv/ /mnt/data/odoo-venv +cp -ar /opt/odoo-venv/ /mnt/data/odoo-venv touch /mnt/data/initialized