A Simple Guide To Setting Up Flux Nodes For Massive Rewards.

This guide is for anyone that wants to buy and invest in FLUX and ultimately run a node to reap FLUX rewards but has struggled with how to set them up. I had an interest in creating it because I know…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Vagrant makes easy

Fans and wires on the back of a computer server — from Unsplash

If you do a lot of experiences using virtual machines and you usually break them, I’m sure you know the “oh crap, not again” feeling, just because you them have a lot of work.

What you just read is a problem. The solution? Vagrant. If you don’t know what vagrant is, have a look on the internet. But, in an easy explanation, it’s a system that has a lot of pre-installed OS, you just have to download them.

To run a simple pre-installed OS with vagrant, put the following inside a file named Vagrantfile

But, what can you achive with that? It’s pretty cool, for sure, you save a lot of time, but you haven’t put any configuration in here.

But after run the vagrant up for the first time, there will be a new virtual machine in VirtualBox, with a strange name and some default configuration.

It’s also possible to set some variables to auto configure a machine to a disered state. And it’s done in the same file, in the same Vagrantfile. Let’s start with an easy point, set the VM name. It’s possible by just adding a new line web01.vm.hostname = ‘web01’ and the file will be similar to

Or set a fix ip

But those two points are not the only points you are interested. You also want to predefine the amount of ram, vram and cpu cores being used.

Let’s consider the virtualization software being used is VirtualBox. It’s also possible to set some values to virtual machine properties in VirtualBox, and still, it’s in the same file, the Vagrantfile.

Let’s say, we want to set, only those 3 parameters, ram, vram and cpu cores. To do this, we can add the following to the file

and with this, the result will be something like

And after all, everything looks fine, awesome, it’s possible to automate anything, it’s possible to use with ansible, etc etc, but there is still a problem. What if it’s necessary to have more than one machine? How will it work? A Varagntfile for every machine? Will probably look like hell. Say nothing.

Vagrantfile is able to have more than one machine defined. Just like magic.

So, let’s get back. To have only one machine, you only need the following

To have more than one, it’s only needed one more level on the file. Just like this

That’s it. Inside machine.vm.define anything shown before is valid, including VirtualBox configs. One last thing, with this last file it’s possible to do any actions against a Vagrantfile but here if you want to start only oneVM, instead of vagrant up you should do vagrant up <machine-name> (in this example would be myUbuntu or myCentos). Otherwise vagrant up starts every machine on this Vagrantfile.

That’s it. Clap, send me suggestions on twitter. Stay awesome ;)

Add a comment

Related posts:

Is it a legal requirement to advise your car insurance company of a speeding fine?

My 24 year old son has his car insurance renewal coming up soon, and unfortunately he picked up a fixed penalty speeding fine and 3 points on his licence for this first misdemeanour he has had in 4…

O

A alma perdida no limbo imperfeito Busca no relento a maciez de teu seio A boca que jorra o veneno Da alma, do corpo, o mito perfeito O amor é acompanhado do ódio Uma corda no pescoço e uma carta…

Infinite Change

If I wait long enough things change.. “Infinite Change” is published by Laura Manipura in Soul & Sea.