Skip to content

Commit d33c648

Browse files
authored
Provisioning enhancements May 2025 (#2761)
1 parent e48749c commit d33c648

File tree

8 files changed

+399
-117
lines changed

8 files changed

+399
-117
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ permalink: /docs/en-US/changelog/
1414
* Github action improvements ( #2739 )
1515
* Improved noroot to check for vagrant users and fallback if not present ( #2739 )
1616
* Greatly improved database backup and import script checks and output ( #2759 )
17+
* Faster checks for when packages are installed
18+
* Use curl for network checks first, falling back to wget
19+
* New automated Ubuntu EOL checks
20+
* Optional script to remove provisioner logs older than 1 year
21+
* New timing logs for provisioners to track hook/provisioner performance
22+
* Timings no longer show empty leading values
1723

1824
### Bug Fixes
1925

@@ -30,6 +36,7 @@ permalink: /docs/en-US/changelog/
3036
### Maintenance
3137

3238
* Refactored git-lfs signing key to the newer GPG key ( #2739 )
39+
* Various provisioner resilience improvements
3340

3441
## 3.14.1 ( 2025 February 23rd )
3542

provision/core/git/provision.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ set -eo pipefail
44

55
# @noargs
66
function git_register_apt_sources() {
7-
local OSID=$(lsb_release --id --short)
8-
local OSCODENAME=$(lsb_release --codename --short)
7+
local OSCODENAME
8+
local OSID
9+
10+
OSCODENAME=$(lsb_release --codename --short)
11+
OSID=$(lsb_release --id --short)
912

1013
if [ "${OSID}" == "Ubuntu" ]; then
1114
if ! vvv_src_list_has "git-core/ppa"; then

provision/core/php/provision.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,16 @@ vvv_add_hook nginx_upstreams php_nginx_upstream
153153

154154
function vvv_php_memcached_register_packages() {
155155
VVV_PACKAGE_LIST+=(
156-
php${VVV_BASE_PHPVERSION}-memcache
157-
php${VVV_BASE_PHPVERSION}-memcached
156+
"php${VVV_BASE_PHPVERSION}-memcache"
157+
"php${VVV_BASE_PHPVERSION}-memcached"
158158
)
159159
}
160160
export -f vvv_php_memcached_register_packages
161161
vvv_add_hook before_packages vvv_php_memcached_register_packages
162162

163-
164163
function vvv_php_redis_register_packages() {
165164
VVV_PACKAGE_LIST+=(
166-
php${VVV_BASE_PHPVERSION}-redis
165+
"php${VVV_BASE_PHPVERSION}-redis"
167166
)
168167
}
169168
export -f vvv_php_redis_register_packages

provision/core/vvv/provision.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,12 @@ function vvv_register_packages() {
5959
vvv_add_hook register_apt_packages vvv_register_packages 0
6060

6161
function vvv_register_apt_sources() {
62-
local OSID=$(lsb_release --id --short)
63-
local OSCODENAME=$(lsb_release --codename --short)
62+
local OSCODENAME
63+
local OSID
64+
65+
OSID=$(lsb_release --id --short)
66+
OSCODENAME=$(lsb_release --codename --short)
67+
6468
local APTSOURCE="/srv/provision/core/vvv/sources-${OSID,,}-${OSCODENAME,,}.list"
6569
if [ -f "${APTSOURCE}" ]; then
6670
cp -f "${APTSOURCE}" "/etc/apt/sources.list.d/vvv-sources.list"
@@ -82,7 +86,7 @@ vvv_add_hook register_apt_sources vvv_register_keys 0
8286
function vvv_before_packages() {
8387
# this package and another are necessary to ensure certificate trust store is up to date
8488
# without this, some mirrors will faill due to changing letsencrypt intermediate root certificates
85-
if [ $(dpkg-query -W -f='${Status}' ca-certificates 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
89+
if ! vvv_is_apt_pkg_installed "ca-certificates"; then
8690
vvv_info " * Installing updated certificate stores before proceeding"
8791
apt-get --yes install ca-certificates libgnutls30
8892
vvv_info " * Installing updated certificate stores completed with code ${?}"

0 commit comments

Comments
 (0)