Skip to content
This repository has been archived by the owner on May 29, 2020. It is now read-only.

Commit

Permalink
Fixes for finalized ability to provision a vm completely offline - re…
Browse files Browse the repository at this point in the history
…solves #11

- bumps the yum cache TTL from 12 to 24 hours
- sets a cache-min value of 24 hours to mitigate it incessantly issuing GET requests even when items are cached
- silenced one last protocol of host resolution errors which show up when yum tries to update meta-data (and fails)
  • Loading branch information
David Alger committed Mar 29, 2016
1 parent bebc9d8 commit 63d91d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vagrant/etc/filters/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
^npm http 304
^npm http 200
^Trying other mirror
^(http|https)://.*/repomd.xml: \[Errno 14\] PYCURL ERROR 6 - "Couldn't resolve host '.*'"$
^(ftp|http|https)://.*/repomd.xml: \[Errno 14\] PYCURL ERROR 6 - "Couldn't resolve host '.*'"$
^chown: changing ownership of `/var/lib/mysql/data': Operation not permitted$
^\[.*\] \[warn\] NameVirtualHost .* has no VirtualHosts$
3 changes: 2 additions & 1 deletion vagrant/scripts/node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fi
########################################

# enable rpm caching and set higher metadata cache
sed -i 's/keepcache=0/keepcache=1\nmetadata_expire=12h/' /etc/yum.conf
sed -i 's/keepcache=0/keepcache=1\nmetadata_expire=24h/' /etc/yum.conf

# append exclude rule to avoid updating the yum tool and kernel packages (causes issues with VM Ware tools on re-create)
printf "\n\nexclude=yum kernel*\n" >> /etc/yum.conf
Expand Down Expand Up @@ -83,6 +83,7 @@ yum update -y

yum install -y npm --disableexcludes=all
npm -g config set cache /var/cache/npm
npm -g config set cache-min 86400

# fix npm install problem by overwriting symlink with copy of linked version
if [[ -L /usr/lib/node_modules/inherits ]]; then
Expand Down

0 comments on commit 63d91d9

Please sign in to comment.