开发者

best practices for setting development environment

I use Linux as primary OS. I need some suggestions regarding how should I set up my desktop and development. I do work on mostly .Net and Drupal, but some time on other lamp products and C/C++, Qt开发者_运维问答. I'm also interested in mobile (android..) and embedded development.

Currently I install everything on my main OS, even I use it a little. I use VMs a little (for lamp server).

Should I use separate VM for each kind of development (like one for .Net/Mono, another C++, one for mobile and one for db only, one for xyz things etc) Keep primary development environment on main os and move others in VM.

  • main os should be messed up
  • keep things easy to organize (must)
  • performance should be optimal (optimal settings for best performance of components)

I'm interested to know how others' are doing.


There are both pros and cons with VM's.

Pros:

  • portability: you can move image to different server
  • easy backup (but lengthy)
  • replication (new member joins team)

Cons

  • performance
  • hardware requirements
  • size of backups (20-40 GB per VM ...)
  • management of backed up images (what is the difference is not obvious)
  • keeping all images up to date (patching / Windows updates)

For your scenario, I would create base VM with core OS and shared components (Web server, database), replicated it and installed specific tools into separate VM. If you combine tools within VM, you may end up with same mess as in case of using base OS - the advantage is that it is much easier to get rid of it ;-)


  • Optimal performance != using VMs
  • if you need to use VMs anyway, then yes: it could be better to use a separate VM for each thing that need one, unless you need more than one at once


Now that OCI containers are stable and well supported, using those through docker, podman or other similar tool is an increasingly popular option.

They are isolated, but under the same kernel, so:

  • they are almost as portable as virtual machines,
  • like virtual machines they can have their own virtual IP addresses, so they can run services not visible from the outside and without occupying port on the host, but
  • they don't reserve any extra space on disk or in memory like virtual machines and
  • they are not slowed by any virtualization layers and
  • mounting directories from the host is easy and does not require any special support.

The usual approach is to have the checkout in the developer's normal home directory and mount it into containers for building, testing and running.

Also building in containers is now supported by Remote Development extension for Visual Studio Code

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜