I gave this 20-30 minute presentation at Charm City Linux on 1/13/2014. I covered my top command line tools that I wouldn't want to do web dev without. The top 3 are mosh, screen and vagrant. I removed Fish before the presentation because the more I thought about it, I could live without it, and probably preferred not to use it.
2. WHO AM I?
•Principal and Co-Founder of E-Moxie - www.emoxie.com
•PHP Developer, System Administrator, Tinkerer
•Community Guy
•Meetup Organizer - Baltimore PHP/Mobile/API (coming soon)
•Always looking to maximize efficiencies
•Always looking to make life easier (mainly mine)
•I’ve been around for awhile, I’ve seen and learned some things
!
•chris@emoxie.com
•@cmstone
5. WHAT IS SCREEN?
•Terminal multiplexer
•Window manager for the terminal
•Has been around since the beginning of time (early 90s I believe)
•Ability to create additional “windows” or terminals within one
terminal window and switch between them
!
Quick Start:
•screen -R (Reattach a detached session - if it’s not currently attached)
•screen -ls (List current screen sockets and their state)
•Ctrl+a D (Detach current screen session)
•Ctrl+a C (Create a new window)
•Ctrl+a # (Switch to window)
•Ctrl+a * (List windows)
6. SCREEN QUICK START
Command Line
•screen (Starts it up)
•screen -R (Reattach a detached session - if it’s not currently attached)
•screen -D [pid](Force detach, specify pid if multiple, use -r to
immediately reattach)
•screen -ls (List current screen sockets and their state)
!
While in screen
•Ctrl+a D (Detach current screen session)
•Ctrl+a C (Create a new window)
•Ctrl+a # (Switch to window)
•Ctrl+a * (List windows)
12. WHAT IS VAGRANT?
•Awesome
•Life changing
•New kid on the block
•The #1 tool you should have in your development arsenal
•Development tool that every developer and project should be using
•Manager for a virtualization provider (VirtualBox, VMWare, etc)
•Automates your [development] environment (Puppet or Chef)
•Support for Docker containers (Paul)
13. WHY VAGRANT
•Gets rid of the “it works for me”
•EASY and FAST
•Everyone on the same page
•Closely resembles a production environment
•Keeps your computer clean
•Low barrier to entry
14. THE HARD WAY
1. Someone new joins your company or team
2. They need to get their development environment setup
3. It takes two days to one week to get up and running
4. Install an IDE
5. Install MAMP or XAMP or something else that can serve pages
6. Make sure the PHP version is the same
7. Make sure the PHP config is the same
8. Install additional extensions
9. Configure MAMP
10. Always tackle “it works for me” problems in the environment
11. Environment relies on the local machine. Screwed it up? Do it again.
12. Production environment got updated? Let’s make sure everyone
updates to the right version, do it again. Sounds fun....
15.
16. THE EASY WAY
1. Someone new joins your company or team and they need to get
their development environment setup
2. Install IDE
3. Install VirtualBox
4. Install Vagrant
5. Clone git repository
6. Run ‘vagrant up’
7. Make things
17. MY PROCESS
1. New person shows
2. Install VirtualBox
3. Install Vagrant
4. Clone git repository
5. Run ‘vagrant up’
6. Vagrant uses puppet to boostraps the system using a very similar
config to production systems
7. Use IDE of choice
!
Zero Config for User
1. Apache is using dynamic virtual hosting (Tim)
2. Local ~/development folder is mapped to /var/www in VM
3. *.dev.emoxie.com points to 192.168.1.50
4. Apache maps the * to /var/www/<*>
18. WHAT DO I NEED
1. Vagrant - vagrantup.com
2. VirtualBox - virtualbox.org
3. PuPHPet - puphpet.com - GREAT Kickstarter to get you going
4. Not a PHP User? http://www.vagrantbox.es