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

Use cp instead of rsync #50

Merged
merged 2 commits into from
Mar 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/runboat/kubefiles/runboat-clone-and-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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