Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Caching bundle installs to speed up deployments #35

Merged
merged 1 commit into from
Aug 30, 2016

Conversation

beirigo
Copy link
Contributor

@beirigo beirigo commented Aug 30, 2016

Gems are currently being installed in the release path. When a new release is created, all the gems must be installed again. By caching the gems in the shared folder we can speed up the deployments considerably.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 7b48a06 on guavapass:develop into 58f840c on ajgon:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 7e93c5b on guavapass:develop into 58f840c on ajgon:master.

@ajgon
Copy link
Owner

ajgon commented Aug 30, 2016

I like the idea, but there is a problem. The migrate deploy callback is fired up before the symlink callback. Which means, when the migrations are run, there is no vendor/bundle yet (the symlink is not created), and migrations will fail (gems missing error).

If we wish to implement that, we need to think about different approach.

@beirigo
Copy link
Contributor Author

beirigo commented Aug 30, 2016

Hi @ajgon,

It just occured to me that the way I've set the bundle install command will cause the .bundle/config file to be created like this:

---
BUNDLE_FROZEN: '1'
BUNDLE_PATH: "/srv/www/<myappname>/releases/20160830071207/../../shared/vendor/bundle"
BUNDLE_WITHOUT: development:test
BUNDLE_DISABLE_SHARED_GEMS: true

As you can see, bundle is set to look for gems directly into the shared folder so the <release_path>/vendor/bundle symlink is not even required to exist.

What do you think of just removing the symlinks altogether?

@ajgon
Copy link
Owner

ajgon commented Aug 30, 2016

Looking good, let's just use "/srv/www/<myappname>/shared/vendor/bundle as BUNDLE_PATH :)

@beirigo
Copy link
Contributor Author

beirigo commented Aug 30, 2016

Oh that makes... a lot of sense lol 👍

@beirigo
Copy link
Contributor Author

beirigo commented Aug 30, 2016

@ajgon just updated it

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling e54e7ec on guavapass:develop into 58f840c on ajgon:master.

@ajgon
Copy link
Owner

ajgon commented Aug 30, 2016

Great, can you squash those commits, and add feat: at the beginning of the commit message? (We're following AngularJS Git Commit Message Conventions)

Gems are currently being installed in the release path. When a new release is
created, all the gems must be installed again. By caching the gems in the
shared folder we can speed up the deployments considerably.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling baa0f44 on guavapass:develop into 2567b71 on ajgon:master.

@ajgon ajgon merged commit f13e4d1 into ajgon:master Aug 30, 2016
dotnofoolin pushed a commit to dotnofoolin/opsworks_ruby that referenced this pull request Nov 23, 2021
Caching bundle installs to speed up deployments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants