Modernize the Vagrant dev environment and add libvirt support - #6955
Open
millerdev wants to merge 17 commits into
Open
Modernize the Vagrant dev environment and add libvirt support#6955millerdev wants to merge 17 commits into
millerdev wants to merge 17 commits into
Conversation
The script runs as root
- Sync UID:GID of vagrant user with host system to allow write access for files like environments/development/.generated.yml - Reliable "real" file paths. - A second .git bind mount avoids error when git has wrong branch. Also avoids init.sh commit hook error. Prevents git operations in VM from messing with host git state. - Set UV_PROJECT_ENVIRONMENT to avoid conflict with host venv.
Change logs have long since directed operators to upgrade, so the old default is obsolete.
Change logs have long since directed operators to upgrade, so the old default is obsolete.
Disable ecryptfs environment because ES and Kafka fail to start: ecryptfs can't mmap shared libraries with exec permission, so JNA fails to load its native library out of /opt/data, which then makes ES's seccomp/system-call-filter bootstrap check fail and abort startup [WARN ][o.e.b.Natives] [es0] unable to load JNA native support library, native methods will be disabled. java.lang.UnsatisfiedLinkError: /opt/data/elasticsearch-6.8.23/tmp/jna8792826677444915978.tmp: /opt/data/elasticsearch-6.8.23/tmp/jna8792826677444915978.tmp: failed to map segment from shared object ... [INFO ][o.e.e.NodeEnvironment] [es0] using [1] data paths, mounts [[/opt/data (/opt/data)]], ..., types [ecryptfs]
DefaultLimitNPROC [ERROR][o.e.b.Bootstrap] [es0] node validation exception [1] bootstrap checks failed [1]: max number of threads [2369] for user [elasticsearch] is too low, increase to at least [4096]
TASK [Format system data disk] *****************************************
fatal: [192.168.33.16]: FAILED! =>
{"changed": false, "msg": "Device /dev/xvdbb1 not found."}
The development environment did not have it, and all other envs had
matching configurations. Environments that override it will not
be affected.
Fixes deploy-stack error:
TASK [dimagi.commcare_logstash.filebeat : Copy Filebeat configuration.] ********************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleUndefinedVariable: 'filebeat_inputs' is undefined
fatal: [192.168.33.17]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'filebeat_inputs' is undefined"}
millerdev
enabled auto-merge
July 28, 2026 15:15
Contributor
Author
|
Note: auto-merge enabled so it doesn't get stale while I'm offline for a bit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This restores the Vagrant-based dev environment to a working, easier-to-maintain state. It replaces the outdated Ubuntu box, fixes the permission, service-limit, and dependency-install errors that broke provisioning, and adds support for contributors who use
libvirtinstead of VirtualBox.Default service versions (Elasticsearch, CouchDB, HAProxy) are brought up to date. Control-node provisioning has been reworked to bind-mount the repo rather than symlink it, which resolves several errors seen when initializing
commcare-cloudinside the VM. Fixes a handful of other smaller, including minor cleanup of afilebeat_inputssetting that was duplicated identically across environment files.deploy-stackon Vagrant VMs is now possible end-to-end without errors.🐡 Review by commit.
Environments Affected
couchdb_versiondefault now matches whatproduction,staging,eu,indiaalready set explicitly (3.5.0), so no behavior change there.haproxy_versiondefault changes from 1.8 to 2.4 (upgrade long ago via changelog 0071).