virtual machines automatic deployment and provisioning - deployment

In the recent times, I tend to set-up and configure more and more VMs daily with very similar or the very same configuration, and due to the time consumption caused by that, I'm looking for a way to automate the whole process.
I have started looking around and I have found Vagrant which could be a very good starting point.
I would like to create a custom build of a VMWare VM ( vagrant box if not mistaken ), and I would like to use that box as my base and deploy it on my servers.
The trouble starts here:
On my servers I use VMWare vSphere and I see that Vagrant can support it via an external plugin, but, as I read along, I see that vSphere only supports VMs created from template or cloned from an existing one.
Is there any change to run my VMWare Workstation boxes with it ?
Also, I would be very grateful if you could provide me with some more info on the same matter using other ( maybe better suited ) solutions.
I know there are also Chef and Puppet, but are they maybe an overkill for my needs ?Thank you for your time and help,Best regards.

Have you looked into Ansible? http://www.ansible.com/home
There is an opensource one available it is extremly easy to use. Might be what you're looking for.

Related

Create a local custom testing environment through Minikube

I'm currently creating a Minikube cluster for the developers, they will each have their own Minikube cluster in their local machine for testing, assuming the developers don't know anything about Kubernetes, is creating a bash script to handle all the installations and the setup of the pod the recommended way? Is it possible to do it through Terraform instead?Or there's other way to do this easier? Thanks!
Depending on what your requirements are, choosing Minikube may or may not be the best way to go.
Just to give you some other options you might want to take a look at the following tools when it comes to local enviornments for developers (depending on their needs):
kind
k8s-vagrant-multi-node
Since you do not seem to care about Windows or other users (at least they weren't mentioned), a bash script may be the simplest way to go. However, usually that's were tools like Ansible come into play. They help you with automating things in a clear fashion and allow for proper testing. Some tools (like Ansible) even have support for certain Windows features that may be useful.
TL;DR
A Bash script is not the recommended way as it has lots of pain points that come with it, however, it may be the fastest approach depending on your skillset.
If you want to do it properly use tools like Ansible, Chef, Puppet, etc.

Learning to use Kuberentes on one single computer

I'm in the need of learning how to use Kubernetes. I've read the first sentences of a couple of introductory tutorials, and never have found one which explains me, step by step, how to build a simulated real world example on a single computer.
Is Kubernetes by nature so distributed that even the 101-level tutorials can only be performed on clusters?
Or can I learn (execute important examples) the important stuff there is to know by just using my Laptop without needing to use a stack of Raspberry Pi's, AWS or GCP?
The easiest might be minikube.
Minikube is a tool that makes it easy to run Kubernetes locally.
Minikube runs a single-node Kubernetes cluster inside a VM on your
laptop for users looking to try out Kubernetes or develop with it
day-to-day.
For a resource that explains how to use this, try this getting started guide. It runs through an entire example application using a local development environment.
If you are okay with using Google Cloud Platform (I think one gets free credits initially), there is hello-node.
If you want to run the latest and greatest (not necessary stable) and you're using Linux, is also possible to spin up a local cluster on Linux from a cloned copy of the kubernetes sources, using hack/local_up_cluster.sh.

VM automatic installation

I would love to have an idea on how to automatically install a Windows XP virtual machine on Virtualbox/VmWare. Is this feasable via a programming language, for example ? Or maybe an automated script ? I need this to avoid manual installation each time one of my VMs crashes.
I am not asking for a full program that does this, but I just needs technical hints on how to do this, then I will perform your suggestions myself.
Yes it's possible.
Can't you just make a snapshot to when the VM is working, or at least a "Clean Install" snapshot that saves having to reinstall your OS and common applications every time?
Yes, it is possible to do this via script. Actually, all IaaS cloud companies now try to do the deployment of VMs (and also physical servers) via automation. First of all, it's cheap a quick. And there is little human factor in it.
Not sure about VirtualBox, but if it works with VMware, KVM etc., there is no reason it shouldn't with VB.
As for the script itself, there are big money in this, so finding something may prove difficult. Try to check openStack, AFAIK it should be open source.

Best practice deploying windows service

I'm looking for best practice in continuous delivery of windows services.
Currently we hava a set of powershell scripts that unintall, reboot, install updates but error handling is tricky. We are reviewing System center but are there any other options available for deploying a windows service?
We've been using Presto since Dec 2011, and have done over 1,000 deployments. Most of what we deploy are Windows services.
What's nice is that we set up our apps and servers in Presto, then we can repeatedly deploy, to any server (or multiple servers at once), by just hitting a button. Presto will copy our official release binaries, update all of the items in our app config files, create and start the service, etc...
So, if you have an application that has 30 manual steps to deploying it, you can enter these steps in Presto, then it's done automatically for you after that.
It's worth a look: http://presto.codeplex.com/
Your most basic and generally accepted best option comes from this thread, which basically links to a Microsoft support article on creating an installer for the windows service.

Running JBoss in Windows Azure

I have found an example of running Tomcat in Windows Azure, but JBoss seems to be a bit trickier. Has anyone succeeded in running JBoss in Windows Azure, and if so, what should I do to get it running?
I would like to know if JBoss can be run in a worker role, not the VM role which is currently in beta.
I'd recommend trying it and asking questions as you get roadblocked. Most "does this run in Azure" questions are answered with "yes", but full-fledged examples and guides are going to be sparse as the platform is very new. So be the guy who writes it :)
You have two options with something like this:
1.) Run a worker role that invokes and runs similar to a windows service. (most tomcat on azure guides approach this way)
2.) Use a Azure Startup task to install, configure, start jBoss as a windows service and/or on top of tomcat
With the addition of full-trust, startup tasks, RDP, and eventually even VMrole .. anything that can run on a Windows 2008 server can run on Azure. So try installing on a Windows box, document those steps, then 1 by 1, figure out the "azure way" to accomplish those tasks. Approached this way, the initial setup will likely be pretty simple. From there, you'll learn a lot about Azure's offerings and can probably even make some changes to better leverage the platform for JBoss needs.
Once you get up there and have issues, ask away and you're more likely to find direct answers by the audience of MVPs, Azure team members, and cloud geeks here vs just a generic "have you done this" answer.