E
E
ezayka2018-08-01 22:58:06
Programming
ezayka, 2018-08-01 22:58:06

Virtual machine - what is needed for development?

There is a laptop with Windows.
I know that virtual machines are very popular now. Please explain the idea. For example, we put Apache, mysql, python on a laptop. And what is the virtual machine for, what to run on it?
I ask you not to throw hats, explain the very idea on your fingers.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
Dmitry Alexandrov, 2018-08-01
@jamakasi666

1) We put the NECESSARY OS, into it the software of the SUDDEN version, we test UNEXPECTED bugs.
2) We install the NECESSARY OS, in it we collect the NECESSARY software from the sources.
3) We install the NECESSARY OS of the INTERESTING version, TESTING, LEARNING, IMPROVING qualifications.
4) We create the REQUIRED number of virtual machines, install the REQUIRED versions of the OS and software in them, ORGANIZE from them the REQUIRED stand and TEST, LEARN, GROW Skills.
5) We create virtual machines, GIVE REMOTE ACCESS to developers, developers are happy and can simulate whatever they want.
6) We raise the NECESSARY software of the REQUIRED versions, roll up the NECESSARY configs, SHARE the finished virtual machine with other people.
7) We raise the NECESSARY software of the NECESSARY versions, we roll the NECESSARY configs, FORGET the problems if the server is dead. we can move the finished virtual machine anywhere and launch it without gestures.
8) WE DO research on the security of software / OS in a virtual machine or viruses.
9) WATCH porn\look\i2p\... in a virtual machine, don't worry about leaving traces on your computer.
10) RAISE any, any versions of versions without worrying about the main OS.
...) ....
1005000 ....) each finds its use.

Y
Yan-s, 2018-08-01
@Yan-s

To be able to develop applications in the right environment and be able to manage these environments without interfering with each other.

K
Kirill Nesmeyanov, 2018-08-02
@SerafimArts

Let's first define the definition of "virtual". In your context of the question: About development , as far as I understand, using virtual machines, right? This definition can be applied not only to virtualization as such, but also to containerization in general, although they have quite a few technical differences. So let's continue from this, having in mind the information that by virtual we mean some kind of abstract box (this is a term that has just been invented) inside which it all spins, no matter what it is, virtual or container.
This "box" can be called your OS. There you put all sorts of apache, mysql, python (let's call it AMP), as you say. All OK.
Now let's change the rules a bit:
1) We take a box on Ubuntu and stuff this "AMP" into it. Now you have a box with everything you need inside your OS.
2) We take a box on Windows and stuff this "AMP" into it. Now you have two boxes on your computer that can work at the same time.
Well, i.e. understand, right? Inside you, well, let's say, MacOS hangs both Windows and Ubuntu, inside of which the "AMP" stack is installed and the same code, developing locally you can run both there and there with one click of the mouse / keyboard.

Host OS (MacOS) -> Windows -> "AMP"
                -> Ubuntu  -> "AMP"

In the case of "containers", such as Docker, they usually do it a little differently:
Host OS -> Linux -> Apache
        -> Linux -> MySQL
        -> Linux -> Python

Those. under each program a separate container. Now we do not have to suffer with the assembly. If something breaks, we can just take it, fix the configs and just reinstall a separate program from scratch. And we can generally organize something like this:
Host OS -> Linux -> Apache (который смотрит на Python 2 и отдаёт результат по 127.0.0.1:80)
        -> Linux -> Apache (который смотрит на Python 3 и отдаёт результат по 127.0.0.1:81)
        -> Linux -> MySQL
        -> Linux -> Python 2
        -> Linux -> Python 3

We can open two browser tabs and see how the code works on completely different versions of python! And at the same time, nothing will be installed locally, no configs, no garbage. You don’t like something or it breaks, you take it and tear it down, replacing it with another. Here is the imagination.

C
CityCat4, 2018-08-02
@CityCat4

On the laptop you can only put all this economy under Windows. It works under Windows... like everything else under Windows :) In addition, a lot of mana will imply that it works in linux and you will sit and warm your head - how can I apply this to Windows.
Take a virtual machine, put Linux in it, everything you need is already in it - let's say a set of versions A (very often a developer needs to test how his code works in such and such conditions and in such and such - with different pythons, with different versions of php - here frequently asked questions like this). Then - another virtual machine - it has a set of versions B, etc. There was an error - which is not understandable - we make a snapshot, stop the car and "ok, google, come here ..."
Here, for example, is a case, as I wrote the passage of one old game, in which saving is not provided :) From the word at all. Igruha is placed in a virtual machine, a snapshot is taken at the right time. And all other times, instead of saving, it makes a snapshot...
The virtual machine allows you to practice ... anything :) without breaking the main system, especially when it is as fragile as Windows on a laptop :)

G
GavriKos, 2018-08-01
@GavriKos

We put the apache and so on in the virtual machine.
In order not to litter the laptop.
And test on a conditionally real environment - in the virtual machine it should spin + - the same axis and the same software as on the prod.
PS virtual machines in their pure form are no longer popular. Containers and all sorts of vargants are already popular.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question