-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add support for Vagrant VMs in testing #20353
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
Merged
Merged
Changes from all commits
Commits
Show all changes
97 commits
Select commit
Hold shift + click to select a range
5719504
vendor gstatus
NouemanKHAL 58e04f5
fix mocks
NouemanKHAL ce7bb12
fix unit tests and mocks
NouemanKHAL 9220006
remove gstatus from Dockerfile
NouemanKHAL 2278322
add CheckVMLogs helper
NouemanKHAL 579a08a
add support for vm_run context manager
NouemanKHAL 4f70c80
test with glusterfs integration
NouemanKHAL 9ea3d51
cleanup CheckVMLogs implementation
NouemanKHAL 0344885
WIP: working VM setup + agent install , working ddev env agent commands
NouemanKHAL 7f39a1d
working check command and config mounting
NouemanKHAL bbe7070
add support for vagrant in env_type in the plugin README
NouemanKHAL 4c10969
fix glusterfs init config
NouemanKHAL 4774f79
add gluster volumes -> E2E tests passing
NouemanKHAL f21b7ba
fix glusterfs version to 7
NouemanKHAL 17364fa
revert plugin/pytest.py single quote -> double quote changes
NouemanKHAL 6e7a8af
remove unnecessary formatting file changes
NouemanKHAL ac8527e
clean README changes
NouemanKHAL 95b645f
add comment for CheckVMLogs condition
NouemanKHAL 6083061
remove quote -> double quotes changes
NouemanKHAL a571131
conftest cleanup
NouemanKHAL 6f87de2
add support for custom agent build via pipeline-id
NouemanKHAL efda745
wip: fix pip install command for local package
NouemanKHAL 265d208
working --dev flag for local package installation
NouemanKHAL 469d928
fix agent_env_vars keyword name and cleanup code
NouemanKHAL d05aebc
add support for custom memory and cpus for the vagrant VM
NouemanKHAL 2a8ea78
fix exporting env vars + fix vm cpus and memory fields error
NouemanKHAL 9bd48b1
add env metadata key
NouemanKHAL 15af706
small cleanup
NouemanKHAL 003ebac
refactor + fix dd_hostname handling
NouemanKHAL 4f42406
more cleanup + fix agent restart cmd + use jinja for VagrantFile temp…
NouemanKHAL df351c2
remove checkVMLogs unused conditions
NouemanKHAL 39bc26e
revert deleting the conditions.py file, only delete the new CheckVMLo…
NouemanKHAL 132ee85
lint
NouemanKHAL f9535dd
fix version number committed by accident
NouemanKHAL 870c184
wip
NouemanKHAL f637fe1
fix --dev local package installation, fix agent service restart, remo…
NouemanKHAL dd4858a
fix sudeoers config interface, fix sudoers bug in format and file nam…
NouemanKHAL 739355f
Merge branch 'master' into noueman/glusterfs-vendor-gstatus
NouemanKHAL 18a72a6
Merge branch 'noueman/glusterfs-vendor-gstatus' into noueman/add-supp…
NouemanKHAL f929b11
lint
NouemanKHAL 7811862
ddev dep freeze
NouemanKHAL ebb6d9f
add paramiko dependency to ddev
NouemanKHAL b09b284
SKIP E2E tests on CI for glusterfs
NouemanKHAL 3ec738d
fix SKIP E2E tests on CI for glusterfs
NouemanKHAL 224c7e4
one more attempt to skip e2e tests on CI
NouemanKHAL 113aba8
skip env provisioning when agent_type is vagrant on CI for the start …
NouemanKHAL a417392
fix running_on_ci check
NouemanKHAL 0db2a02
remove paramiko
NouemanKHAL af575e9
add support for %HOST% template var and fix post_install_commands
NouemanKHAL c78d55f
always install glusterfs 11.1
NouemanKHAL a36c827
address review comments + refactor
NouemanKHAL 9df460e
delete test_version_metadata from the e2e test
NouemanKHAL b06d000
improve logging, fix lint, fix commands output, use self.platform sub…
NouemanKHAL e7210de
more refactoring and code cleanup, and logs improvements
NouemanKHAL 54211b1
refactor start method into smaller methods + cleanup
NouemanKHAL 2200511
update AgentInterface to pass Application instead of Platform, and us…
NouemanKHAL 6750042
remove unnecessary logging when raising exception
NouemanKHAL fd092c0
add VM hostname prefix to run_command debug logging
NouemanKHAL 101ec82
add validation and proper error message around agent_build format
NouemanKHAL 1291376
fix env reload command to only restart the agent service, not the ent…
NouemanKHAL f4f8b86
remove unused _show_logs method, and fix stderr logging level to be e…
NouemanKHAL d08884e
fix redundant log message of vagrant file generation, fix vagrant fil…
NouemanKHAL b35ca01
use ddev storage_dir to store the vagrant file
NouemanKHAL 9978f56
fix exported_env_vars and propagate the right ddev config API keys
NouemanKHAL 5b4c451
add test_vagrant.py + FIX windows bugs
NouemanKHAL e7e9b00
improve test names
NouemanKHAL 9eb3cf5
use %HOST% variable in glusterfs start_commands
NouemanKHAL 111dddd
improve logging messages
NouemanKHAL 1431ac2
Apply suggestions from code review
NouemanKHAL dec2e7f
fix type hints
NouemanKHAL ef1ee14
remove unused constants
NouemanKHAL 2f588ef
nit
NouemanKHAL 8835dfb
apply suggestion to parametrize OS specific unit tests
NouemanKHAL 0eb8f76
fix installing local packages on windows -> fix pip command
NouemanKHAL 352e0ee
remove glusterfs changes from this branch
NouemanKHAL 2f52be0
Merge branch 'master' into noueman/add-support-for-vms-in-testing
NouemanKHAL 6103012
remove more glusterfs changes
NouemanKHAL 07dd9d9
ddev lint
NouemanKHAL b392515
changelog
NouemanKHAL 463de4a
Add Vagrant section in developer docs Test Framework
NouemanKHAL 0fb956d
fix vagrant link
NouemanKHAL 5ad27e3
revert dcd changes
NouemanKHAL 30dc9da
Merge branch 'master' into noueman/add-support-for-vms-in-testing
NouemanKHAL 14e6877
remove dcd changes
NouemanKHAL e25d75e
Merge branch 'master' into noueman/add-support-for-vms-in-testing
NouemanKHAL 7a17028
remove get_id definition from VagrantAgent
NouemanKHAL 894bd27
move re import to the top
NouemanKHAL 1f9ad7c
remove halt vm and destroy vm vars
NouemanKHAL 7cfd9f6
addressing review: oneliner guest_cmds and remove interactive bool fr…
NouemanKHAL 74e845e
addressing review: small code improvement
NouemanKHAL 980efc8
addressing review: add a comment about not using pathlib
NouemanKHAL 8e13952
adressing review: move variable closer to where its used
NouemanKHAL 2b3598a
adressing review: remove redundant variables
NouemanKHAL cd5fe4e
remove unused template variable for dd_api_key
NouemanKHAL 7b9ab95
remove unnecessary comments and unsued param
NouemanKHAL 3128ee2
Merge branch 'master' into noueman/add-support-for-vms-in-testing
NouemanKHAL adfaf86
Merge branch 'master' into noueman/add-support-for-vms-in-testing
NouemanKHAL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add support for Vagrant VMs in testing |
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
$set_environment_variables = <<SCRIPT | ||
tee "/etc/profile.d/myvars.sh" > "/dev/null" <<EOF | ||
|
||
export LOCAL_IP=$(hostname -I | cut -d ' ' -f 1) | ||
export DD_HOSTNAME=$(hostname) | ||
{{ exported_env_vars_str }} | ||
|
||
EOF | ||
SCRIPT | ||
|
||
|
||
Vagrant.configure("2") do |config| | ||
config.vm.box = "{{ vagrant_box }}" | ||
config.vm.box_version = "1.1" | ||
|
||
{{ synced_folders_str | safe }} | ||
config.vm.network "private_network", ip: "172.30.1.5" | ||
|
||
config.vm.define "{{ vm_hostname }}" do |node| | ||
node.vm.hostname = "{{ vm_hostname }}" | ||
|
||
node.vm.provision "shell", inline: $set_environment_variables, run: "always" | ||
|
||
node.vm.provision "shell", inline: <<-SHELL, run: "always" | ||
sudo apt update | ||
{{ agent_install_env_vars_str }} bash -c "$(curl -L https://install.datadoghq.com/scripts/install_script_agent7.sh)" | ||
sudo service datadog-agent start && echo "Agent started successfully" | ||
echo "VM {{ vm_hostname }} is ready" | ||
SHELL | ||
end | ||
|
||
end |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.