A mostly reproducible, mostly persistent, quickly deployable, and portable custom bioinformatics environment built on-demand from anywhere with an SSH client.
This stack is what I use for carefree disposable development environments. Your mileage may vary greatly!
Ensure you do a recursive clone otherwise you will not pull the submodules.
❯ git clone --recursive https://github.com/clintval/gimme.git❯ vagrant plugin install vagrant-env
❯ vagrant plugin install vagrant-awsWe will install the miniconda role through ansible-galaxy:
❯ ansible-galaxy install andrewrothstein.minicondaA dummy box is provided for the aws provider. This acts as a pass-through for Vagrant and could be created with defaults.
❯ address=https://github.com/clintval/gimme/raw/master/example-box/aws-dummy.box
❯ vagrant box add aws-dummy "${address}" --provider awsLoad the following variables into your environment.
export AWS_ACCESS_KEY_ID=YOURACCESSIDGOESHERE
export AWS_SECRET_ACCESS_KEY=YOURSECRETKEYGOESHEREEdit and then source the file .envrc.
This project is set-up to provision an environment very specific to me and will later include some of my .dotfiles .
Read: hope you like Zsh!
The bioinformatics tools specified for install are also typical for an environment I use regularly.
Typically, Vagrant is used to spin-up virtual machines which are capable of recieving an SSH connection. In order to enable SSH connection for your EC2 instance we must attach a security group which gives the correct authority.
The security group SSH From Anywhere is referenced explicitly in the Vagrantfile.
Create the EC2 security group SSH From Anywhere:
[Inbound]
type=SSH
protocol=TCP
port-range=22
source=0.0.0.0/0
[Outbound]
type=All traffic
protocol=All
port-range=All
destination=0.0.0.0/0# Connect to AWS, start and provision the instance
❯ vagrant up
# Provision the instance
❯ vagrant provision
# Do work
❯ vagrant ssh
# Halting the instance
❯ vagrant halt
# Terminating the instance
❯ vagrant destroyNote the first few steps can be combined:
❯ vagrant --provision up && vagrant ssh