Skip to content

istvano/development-environment

 
 

Repository files navigation

Istvan's EnV

This environment is based on the fantastic work of gantsign development environment with few changes.

Such as

  • multi monitor support
  • accelerate 2d settings support
  • network card performance patch
  • network performance patch
  • clipboard-mode fix
  • many more virtualbox tweaks

License

A development environment for Java, Python and Node.js built using Vagrant.

Requirements

  • Vagrant 2.2.x
  • vagrant-hostsupdater or vagrant-hostmanager
  • Virtualbox 6.1.x
  • 4GB for the VM
  • 2 CPUs for the VM

Useful infos

Kubernetes Dashboard

Kubernetes Dashboard is available. You can generate a token with

microk8s kubectl -n kubernetes-dashboard describe secret admin-user-token | grep ^token

Date Sync issues

sudo timedatectl set-ntp off && sudo timedatectl set-ntp on

To make Chrome to trust the self sign certificate that was generated at build time add localhost.com cert using libnss3-tools

[ -d ~/.pki/nssdb ] || mkdir -p ~/.pki/nssdb
certutil -d sql:$HOME/.pki/nssdb -A -n 'localhost.com cert authority' -i /etc/ssl/certs/localhost-ca.pem -t TCP,TCP,TCP
certutil -d sql:$HOME/.pki/nssdb -A -n 'localhost.com' -i /etc/ssl/certs/server.pem -t P,P,P

If kubectl or kubeadm autocompletition does not work. They can be added manually

To manually configure Zsh tab completion add the following to your .zshrc:

eval "$(kubectl completion zsh)"
eval "$(kubeadm completion zsh)"

About

Getting your development environment setup correctly can be a time consuming and error prone process; getting everyone on a team to setup their environment correctly is even more challenging.

The goal of this project is to make setting up a development environment reliable and reproducible. This project provides a generic development environment that you can fork to add your project specific configuration.

View the Website

View the project website

Project News

View the latest project news

Learn more about the requirements

Feature Highlights

  • Dynamically allocated swap space
  • Compressed swap
  • File backup & restore between rebuilds
  • Terminator
  • Oh My Zsh
  • Docker
  • Helm
  • Visual Studio Code
  • Git-GUI and Gitk
  • Postman
  • Open JDK
  • Maven
  • IntelliJ IDEA IDE
  • SDKMAN!
  • Node.js
  • Pyenv
  • Pipenv

Lvm partition resizing

If you used any vagrant plugin to change the default size of the partition. You need to run the following commands to resize them.

By default these commands will resize the partition to the available maximum

  • resize partition sudo cfdisk /dev/sda

or use gparted to resize the partition using the gui

  • resize - check the /dev/sdax before executing the commands sudo pvresize /dev/sda3

  • show volume names and display sized sudo lvdisplay sudo vgdisplay

  • extend lvm root partition to maximum sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv

  • resize filesystem to to the partition size sudo resize2fs /dev/ubuntu-vg/ubuntu-lv

  • reboot

Docker dns issue

Add or edit

sudo vim /etc/docker/daemon.json { "dns": ["1.1.1.1","1.0.0.1"] }

and restart docker sudo systemctl restart docker

Slow copy and paste

Add this to your .zshrc file

vim ~/.zshrc

### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
  OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
  zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
}

pastefinish() {
  zle -N self-insert $OLD_SELF_INSERT
}
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish
### Fix slowness of pastes

https://gist.github.com/magicdude4eva/2d4748f8ef3e6bf7b1591964c201c1ab

Additional tools

Screenshot tools

  • install flameshot
sudo apt install flameshot
  • remove current print screen tool
gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot ''

Please note: on newer (19.x) ubuntu this is

gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot '[]'
  • set a new tool
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']";
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'flameshot';
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command '/usr/bin/flameshot gui';
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding 'Print';
  • quicktile
sudo apt-get install python3 python3-pip python3-setuptools python3-gi python3-xlib python3-dbus gir1.2-glib-2.0 gir1.2-gtk-3.0 gir1.2-wnck-3.0
sudo pip3 install https://github.com/ssokolow/quicktile/archive/master.zip
sudo apt-get install gnome-startup-applications
  • animated git tool
sudo add-apt-repository ppa:peek-developers/stable
sudo apt-get update
sudo apt-get install peek
  • install font manager
sudo apt install font-manager
  • in case of python command completition error message. edit this to handle the error message eval "$(pipenv --completion)"
vim /home/vagrant/.antigen/bundles/gantsign/zsh-plugins/pipenv/pipenv.plugin.zsh

Potential improvements

    'virtualbox' => {
      'name' => 'development-environment',
      'gui' => true,
      'cpus' => 2,
      'cpucap' => '95',
      'graphicscontroller' => nil,
      'monitorcount' => 1,
      'vram' => '64',
      'accelerate3d' => 'off',
      'accelerate2d' => 'on',
      'memory' => '4096',
      'clipboard' => 'bidirectional',
      'draganddrop' => 'bidirectional',
      'audio' => default_vb_audio,
      'audiocontroller' => default_vb_audiocontroler,
      'natdnsresolver' => 'on',
      'natdnsproxy' => 'on',
      'rtcuseutc' => 'on',
      'hwvirtex' => 'on',
      'nestedpaging' => 'on',
      'vtxvpid' => 'on',
      'largepages' => 'on',
      'acpi' => 'on',
      'nictype' => 'virtio',
      'hostname' => 'localhost.com',
      'aliases' => ['localhost.corp', 'localhost.test','localhost.local','localhost.lan','localhost.home'],
	    'ip' => '192.168.96.48'
    },

License

MIT

Author Information

Thank you (https://gantsign.github.io/development-environment/docs/requirements

About

A development environment for Java, Python, Node.js and Go built using Vagrant

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 63.0%
  • Jinja 34.8%
  • Ruby 2.2%