Getting your Python Development Environment ready with Vagrant
Mario García�(He/Him)
GitLab Hero
Copyright © 2020 HashiCorp
What is Vagrant?
Vagrant
Copyright © 2020 HashiCorp
Providers
Providers
What is? - VirtualBox
On Linux - VirtualBox
On Linux - VirtualBox
Installation - VirtualBox
Boxes - Vagrant
What is? - Docker
Installation - Docker
Post Installation - Docker
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
$ newgrp docker
$ docker run hello-world
TERMINAL
Copyright © 2020 HashiCorp
Provisioners
Provisioners
Copyright © 2020 HashiCorp
Installation
Installation
Installation
Installation
Copyright © 2020 HashiCorp
Basic commands
Basic commands
vagrant up
Start the virtual environment
vagrant init
Create the Vagrantfile file with the initial configuration of the environment
vagrant init --minimal
vagrant ssh
Establish a connection to the virtual environment through SSH
vagrant halt
Stop the virtual environment
vagrant destroy
Delete the virtual environment and configuration files
vagrant box
Manage the boxes used for configuring the virtual environment
Copyright © 2020 HashiCorp
Python Development Environment
Development Tools
Copyright © 2020 HashiCorp
Configuring Development Environment
Vagrantfile
Provisioning
Running
Copyright © 2020 HashiCorp
Development Environment with Packer
Packer Configuration File
$ mkdir python-dev
$ cd python-dev
$ touch box-config.json
$ nano box-config.json
TERMINAL
Provisioning
Running
$ packer build -var 'version=1.0' ubuntu.json
$ vagrant init python-dev
$ vagrant box add python-dev output-vagrant/package.box
$ vagrant up
$ vagrant ssh
TERMINAL
Copyright © 2020 HashiCorp
Development Environment with Docker
Vagrantfile
$ mkdir python-dev
$ cd python-dev
$ touch Dockerfile
$ nano Dockerfile
Dockerfile
TERMINAL
Vagrantfile
Resources
Resources
43
Thank You
hi@mariog.xyz
mariog.xyz
twitter.com/mariogmd