The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

8

Vagrant can complement Ansible and Docker. It is used to spin virtual machines inside which you install Docker and test your Ansible playbooks. You describe desired VM configuration with Vagrantfile and then spawn them with vagrant up command. Then Vagrant software downloads one of shared boxes (VM templates, like bare ubuntu or centos, or with preinstalled ...


8

There is no general method and it might depend on how boxcutter/ol67 was packed. The easiest method would be to define the password in the Ansible inventory file: [oracle-vm:vars] ansible_ssh_user=vagrant ansible_ssh_pass=vagrant The second method would be to leave the insecure private key configured on the oracle-vm machine and inject the private key to ...


7

Based on techraf's 3rd suggestion I did the following: vagrant up ansible ssh-keygen (no password just pressed Enter) copied .ssh/id_rsa and .ssh/id_rsa.pub to the project directory vagrant destroy ansible modified the Vagrantfile to copy the id_rsa to all hosts modified the Vagrantfile to copy the id_rsa.pub into authorized_keys on all hosts modified the ...


7

Confirmed by this answer on SO referencing Microsoft technet once Hyper-V is activated it mask the VT-X instructions of the processor to the OS on top of it and windows run like a guest. Docker for Windows need hyper-V to work, so disabling it is not really an option. There's no way to have virtual box running on top of Hyper-V and that's quite normal, ...


6

First of all, I strongly advise against "feature comparisons" blog post for similar software, they're quickly outdated and I'll try to keep this answer generic for a system configuration manager (SCM) and let docker out of the talk for the first part. What it can brings you: Reproduction of configuration from environment to environment Versioning of the ...


4

There are two parts of this Vagrantfile, one does the mounting for Windows hosts (the first half), the other one for UNIX hosts (the second half), but essentially the do the same - just with different plugins. You can see from the config.vm.synced_folder and config.bindfs.bind_folder commands where they set up the appropriate directories with the proper ...


4

What you are primarily discussing is the hosting model for the underlying cloud you are using, for example, from what you have said so far your hosting model is relying on Infrastructure-as-a-Service (IaaS), and you want to have less responsibility for managing the Operating System. That being the case you would need to move right in the table below to ...


4

Vagrant is a tool to create and customize virtual environments (containers and VMs) in a reproducible fashion (across platforms) using code and a virtualization provider of your choice. VirtualBox is only one of the virtualization providers it supports. Vagrant can also create VMs using Hyper-V, VMware and AWS. While VirtualBox's VBoxManage does let you ...


3

From my experience this is very provider specific and requires evaluating the SLA offered for a particular service. For example the siteground cloud server offerings shown at https://www.siteground.com/cloud-hosting.htm state: We preinstall and maintain all the software you need on your server. While offerings from liquidweb they make it clear they will ...


3

You have to execute ssh-keyscan. For example to ssh to a host (github.com here ) you have to run below script # Add ssh key to help cloning private github repo ssh-keygen -t rsa -N "" -f secrets/ssh/github_rsa PUB_KEY=$(cat secrets/ssh/github_rsa.pub) PRV_KEY=$(cat secrets/ssh/github_rsa) echo "${PRV_KEY}" >> ~/.ssh/github_rsa chmod 600 ~/.ssh/...


3

This can be achieved by using Post build task plugin and by adding the following Script command in Post-build Action, Post build task solved the problem: vagrant destroy -f Plus adding rule with Log text as "Build was aborted" make sure that above command is only invoked on aborted builds. For example:


2

Following Vagrant file address this problem. You can get all supporting key files along with this vagrant file at https://github.com/malyabee/IaaC/tree/master/ansible_lab $commonscript = <<-SCRIPT sudo yum update -y sudo yum install python2 epel-release -y sudo yum install -y ansible sudo echo "192.168.22.10 ansiblecontroller.example.com ...


2

According to the docs one should use: vagrant ssh [name|id] If there is a single node then use vagrant ssh and in case of multi-node define the name or id of the VM, e.g. vagrant ssh box1 If one would like to ssh between boxes then one could create an ssh key and provision the private key to each box and add the public key to authorized_keys file. https:/...


2

You can do via docker, since it's a test. Here is an example repository, both docker and vagrant. https://github.com/jonashackt/gitlab-ci-stack https://blog.codecentric.de/en/2018/05/gitlab-ci-pipeline/


2

If it's an Intel CPU, you may have to enable Intel VT-x in the bios. Sometimes the virtual machine will tell you this, and sometimes not. Here's a link that might help (ignore the Windows 10 part since you're on Win7). Also getting everything to the newest version would be a good idea if you can.


2

Unless I totally missed your question, roles are exactly what you need in this case. I'll use examples from my real world. My code below is just to illustrate my point (so it is not fully runnable, might contain errors and is not bullet proof rocket science: you will probably have to adapt/overcome tools limitations). But at least you'll be able to tell me ...


2

In this scenario, the cpu cycles required to read from the database and render to PHP will all be handled by a single core, ie they will be handled one after the other. This will be about the slowest way to deliver website traffic out of your server. Each time a request is made, a certain amount of memory is occupied by PHP. You can test the actual amount, ...


2

I think your research is leading you in the right direction, but I cannot see the value of Docker in here. I found managing LAMP environments with Ansible completely unproblematic and the scripts I have used for 16.04 only needed a single line changes for upgrade to 18.04. I have also used them on a local development environment and there is no need to have ...


2

Yes, there are plenty of providers which make the first step redundant; i.e. they give you a working, optimized, running Linux box just by clicking a button, without you having to care how it works. Or they skip the need to have a "box" (VM) running at all. AWS, Azure, GCP, OpenShift etc. all do that, and do it well. In my neck of the woods, we use Vagrant ...


2

'Suitable' can honestly be whatever works for you. I personally feel its perfectly reasonable to do a manual install of Chef server. It is the CM tool to help provision the rest of your fleet. You will not be setting up Chef server over and over again. You do it once, and then never again, in theory. That theory breaks down however, in respect to server ...


1

No, Vagrant is a tool for creating virtual environments, which it then can run inside a virtual machine (originally only using Virtualbox, but nowadays also KVM and VMware among others). The environment created by Vagrant is, however, a fully virtualized OS (e.g. Ubuntu).


1

It seems ther reason for this was that the SMB connections would disconnect. using net config server /autodisconnect:-1 in a "run as administrator" command window fixed it. as explained here: https://www.vagrantup.com/docs/synced-folders/smb.html#preventing-idle-disconnects


1

I've been wondering if there is any other similar software/tool that just does a one time provision, sets up a static IP/MAC address, and allows for easy start/resume/shutdown when testing/deploying/maintaining. Sure... a virtualbox VM is simply a XML file. You can copy/modify it as such easily. Use vboxmanage to clone the hdd images as necessary. So, I ...


1

Have you considered to use Ansible? You have some resources about using Ansible with VirtualBox and also vagrant


1

One possible but kind of ugly and very brittle workaround could be to use winrm to launch the vagrant commands on windows from linux 'remotely'. This need a networking setup for the VM so it can talk to the host through tcp/ip (configuration done on the virtualization you use), configuring winrm on the windows host (if your company allows it) and then using ...


1

Is the answer as simple as setting up a dual-booted machine? Linux partitions for development tasks and as the VM host, Windows partitions for normal computing use. Laptop Windows partition Linux Partition Vagrant VM


1

According to this documentation it is possible to install ansible and run a ansible playbook by using the following snippet: Vagrant.configure("2") do |config| # # Run Ansible from the Vagrant Host # config.vm.provision "ansible" do |ansible| ansible.playbook = "playbook.yml" end end


1

Try to start with a clean sheet by removing the .vagrant.d folder or start to remove the corrupted zip. When the file or folder has been removed, one could run vagrant up again and check whether it works.


1

Vagrant, in this case, would simply add a lot of unnecessary overhead into your testing environment. You can create containers that quickly test specific groups of functionalities and paste the results somewhere. Your team won't spend much time learning how to start these containers as it is usually a simply command. Most of changes are going to be done ...


1

This is why configuration management software exists. Example for Ansible and AWS: - name: Create a sandbox instance hosts: localhost gather_facts: False vars: timezones_path: /some/path/timezones.list key_name: my_keypair instance_type: m1.small security_group: my_securitygroup vpc_subnet: my_vpc_id image: my_ami_id region:...


Only top voted, non community-wiki answers of a minimum length are eligible