Everyone will use Vagrant a little differently. In this lesson, Emma shares some of her strategies for using Vagrant for her personal developer environment.
Lesson Objectives
By the end of this lesson, you will be able to describe how many Vagrant instances you will use, and why.
Lesson Summary
Emma started with one Vagrant instance per project but found that she switches tasks frequently enough that it was a problem--with only 8G RAM, it's hard to have more than one machine running at a time. Although the shut down + startup procedure only takes about five minutes, but it's still dead time. This is especially true as the shut down/start up time doesn't include pulling a fresh copy of the Git repository and updating the database. Emma recommends: grouping your projects with similar requirements into the same Vagrant instance IF you are limited by hardware resources AND you need to switch tasks frequently. Then, as needed, create new vagrant instances if you can justify the split. For example: if you need two different versions of PHP or two different servers (nginx vs. Apache).
Additional resources
You can typically upgrade your Vagrant and VirtualBox installations without any problems. Occassionally you will run into problems though. If this does happen to you, you will want to remove all Vagrant and VirtualBox software, and then re-install it. Assuming you are using Configuration Management to provision your machines, the only thing you'll lose is your database.
Lesson Summary
You will need to delete files and applications as follows for OSX:
- /Applications/VirtualBox.app
- /Applications/Vagrant.app
- /usr/bin/vagrant
- ~/.vagrant.d
- ~/VirtualBox VMs
Lesson Outcomes
By the end of this lesson, you will be able to remove relevant Vagrant from your system to prepare yourself for a clean installation.
Additional resources
Due to path issues, vagrant ssh
doesn't work on Windows. Although you can update some files to fix this, running PuTTY is slightly more accessible (and has a GUI configuration screen to fill in). In this lesson we cover how to install and use PuTTY to log into your virtual machine. Note: You can use PuTTY from any Windows machine into any Linux server.
Lesson Objectives
By the end of this lesson you will be able to SSH into a remote machine using PuTTY.
Additional resources
How to Give a Hug
FreeIn this video Joe Shindelar goes over some important information about giving hugs. He walks through the various facets of hugs, giving some demonstrations throughout on:
- Defining a hug
- Types of hugs
- Cautions
- Technique
As Joe admonishes in the video, don't forget to practice your hugging after watching the video. Practice makes perfect!
In this lesson we take a look at an extremely useful tool for communicating with the Drupal community (and many other Open Source communities as well). We will find out what IRC is, why you would want to use it, how to get connected, and some basic guidelines and tips for talking with people on IRC. We'll also explain what the IRC bot, Druplicon, is and how you can use it.
Additional resources
In this first step of the Learn Drupal Ladder we will install Drupal on our computer. This follows the instructions to Install Drupal locally on learndrupal.org. We start by getting and installing the Dev Desktop, which is an all-in-one web server which comes with Drupal 7. We then install our own Drupal 8 site in Dev Desktop.
If you do not wish to use Dev Desktop as your local web server, we have videos for three other web servers, based on operating system:
- Installing WampServer (for Windows)
- Installing MAMP web server (for Mac)
- Installing a web server on Ubuntu
Additional resources
More information on Development Environments
We introduce code deployment without a terminal using beanstalkapp.com.
Deployment means moving your code from environments such as local to production – with version control, which allows for backups, fixing mistakes, and collaborative environments.
Git is the type of version control used in Drupal, and we'll discuss Git in this lesson.
Additional resources
Introduction to Git
CourseThis is an in-depth course that starts with the basics of version control, establishes some terminology, and a base line workflow, then continues to build on that by going beyond the basics of the various Git commands to make the most out of your tools.
In this lesson we take a look at the methods available to install Git on different operating systems including Windows, Mac OS, and Linux and how to ensure that you're environment is properly setup to start using Git. Then we walk through the installation on Mac OS and finally we'll cover how to invoke Git from the command line and set some basic configuration options like telling Git who we are.
- Know where to go to download the latest verion of Git
- Be able to install Git on your operating system of choice.
- Be able to verify that Git is indeed running in your environment.
- Do some Git configuration with
`git config`, ~/.gitconfig
Additional resources
Download Git Drupal Ladder: Install Git lesson (installs Git on Windows instead of Mac)
This tutorial takes a look at the various resources that are available for getting help with Git including the built-in manual/help pages and examples as well as other documentation that we've found to be useful while learning how to use Git.
There are a lot of different ways to reference a specific commit in Git. This lesson takes a look at the various ways in which you can navigate through the history of a project by cloning the Drupal core repository from Drupal.org and looking at its contents. We'll learn about pointers to each commit, or what Git refers to as a Treeish, and how we can use those as parameters to different commands.
This lesson covers the git diff
command and how to use the command along with a Git Treeish reference to view the differences in a project or a single file between two commits. Or between the current HEAD and the working tree. We'll also take a look at integrating Git with some external diff tools that make reading the output from the git diff
command a bit easier.
In this lesson we're going to quickly jump into the basics of a whole bunch of different git commands and get our repository created, add a couple files, and then view our log.
In this tutorial we'll explain some of the basic tenets of version control systems. We'll define Git terminology like repositories, branches, checkouts, and commits, and provide you with a baseline set of concepts that we can build on throughout the course.
This tutorial dives deeper into the different things you can do with the git add
command. Things like adding multiple files at a time using wildcards and staging and adding only some of the changes you've made in a file and not all of them. We'll also take a look at using a .gitignore file to exclude specific files or even patterns of files from the repository all together.
In this tutorial, we revisit the git commit
command and take a look at some of the additional things you can do with it, like amending a previous commit, and creating commits using shorthand methods. Then we'll look at using the interactive rebase command which will allow us to reword commit message and do other things like squash two commits into a single commit when performing a rebase.
This tutorial takes a look at removing files from your version control system. It's generally not enough to just delete the file in the file system you also need to tell Git that it's been removed and make a commit with that information.
In the real world when you're working on a project with a team of people your code never stands still. It's not at all uncommon to find yourself in a scenario where git merge
or git rebase
simply can't successfully meld two branches without human interaction. For example when both branches contain a commit that modifies the same line of code in a file in different ways. This lesson will take a look at how you can go about resolving these merge conflicts and some of the tools available to help make this process easier by first creating an intentional conflict between two branches and then showing how to resolve it.
In this tutorial, we'll take a look at ways that you can remove changes that you've made to the files in your working tree, how to remove something from the index that you've added but later decided that you're not ready to commit, and some other basic working tree and index house cleaning commands.