Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
19

Some options out there.. Testing tools: Sorted by github stars Serverspec - Ruby, most popular tool out there, built on ruby's rspec Goss - YAML, simple, <10MB self-contained binary, extremely fast, can generate tests from system state Inspec - Ruby, think of it as an improved serverspec, almost same syntax, made by the chef guys. Built to be easier to ...


13

I've had two runs at doing environment variables in a scalable way and neither has ended up perfect because, as I've discovered, is a very tricky thing to get right. I'll give a summary of both of my experiences below: Common Factors Environment variables are stored in a separate repository from the original source code (they are submoduled together but ...


13

The two tools I've seen for this are InSpec and ServerSpec. Serverspec is a Ruby-based tool that builds on RSpec. InSpec is inspired by RSpec and ServerSpec. I've used ServerSpec. It's cool, but maybe not 100% stable. I've had problems with testing for specific versions of software on Ubuntu. I've read the InSpec docs but haven't dug in deep. It does ...


10

When using configuration management tools, such as Ansible, the tool itself would be responsible preventing configuration drift. Once you used Ansible to set a certain configuration, repetitive execution of Ansible will ensure your configuration is as you defined it to be. This also requires your Ansible code to be written in a manner which is idempotent. ...


8

I can see some options: Use Vagrant to create your VMs; it separates the process of creating the VM (including the base OS) and the actual provisioning. It also has some options to run certain provisioning steps at certain circumstances only. Use Ansible, Puppet or something like that to switch to a provisioning mode where you do not do the same stuff ...


5

You may use matchbox on a VM as you do on a baremetal machine, you won't be able to use packer on a baremetal machine ont he other hand as it doesn't handle any PXE boot option. That said, leveraging vSphere/AWS/ API/cli to create a new machine from a template is usually quicker and more effective than using the API/cli to create the VM and then make it ...


5

Test Kitchen has a kitchen-ansible provisioner plugin for testing of Ansible code. It isn't as deep as the Chef integration but it does get the job done for most cases. There is also the more recent Molecule project which is a dedicated Ansible testing system.


5

http://www.vagrantup.com You could use vagrant to deploy VMs on the local laptop. You could also check whether it is possible to split the script in smaller parts so it will not take four hours to test it.


4

If testing locally isn't an option, then the most straight forward approach would be to use disk volume snapshots/backups to your advantage. These will still cost $$$, but will save you time in the long run. You should then separate your bash script into different working segments/scripts that can be tested individually. Once your server is provisioned, run ...


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

"best suited" is the question. How do you measure this? what are the metrics and why do you choose them? I think you are looking for some kind of "tools combination", earlier tested on production by someone else's if preferred. What you want to do is try some opensource/free private cloud on-premises and run IaC on this private environment. You can test ...


3

If your environments are per customer, I would suggest in your specific case to have a repository per customer. (In general it is repository per environment.) This repository would have a standard directory structure for environment variables, ansible variables and inventories, strongly encrypted secrets (account access tokens, private keys, etc.). You ...


2

You mention that you are demonstrating this for a customer. The first question you should ask yourself (or, more pertinently, the customer) is : what does this customer really want? Why have they come to you for this work? What is the pain they are currently feeling, what value are you providing to them. Then, compare and contrast - show them the delta ...


1

Here's what I've tried: Terraform + libvirt There's unofficial libvirt provider for terraform. It works, but there are a few gotchas: Doesn't support block devices: https://github.com/dmacvicar/terraform-provider-libvirt/issues/418 Existing state not being removed: https://github.com/dmacvicar/terraform-provider-libvirt/issues/423 Docker machine Docker ...


1

Rather than solving the immediate problem you're having, let me suggest an alternative solution to your actual problem: I need screen, so I can use multiple interactive shells in one instance of Docker. If I run multiple Docker instances, each takes 1G of RAM, so 10+ instances will kill my RAM. Run screen (or tmux, but screen if you insist) locally on ...


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

I'm using vagrant with vsphere plugin, starting from a 'base' image already present on vsphere. The new machine is then fully configured (inlcluding middleware) by chef after vsphere customization. That's one in many possibilities, unsure this question lead to actionnable answers out of everyone 'workaround'.


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