Update: this it no longer necessary. Check
https://developer.ubuntu.com/en/snappy/start/installation-tips/ for details on how to enable wifi in ubuntu snappy without having to install anything.
I've been playing with my new Raspberry Pi 2, and Ubuntu Core as an OS looks very promising. One downside that I've found is that it doesn't support WiFi out of the box. Well, that's only partially true, since the kernel does have all the drivers & firmware blobs included. What's missing are the wpa_supplicant tools to authenticate. Ubuntu Core doesn't use apt-get anymore, but luckily dpkg is still there behind the scenes. Here is how to install the missing packages on your system partition and enable the RPi to connect to your WiFi network.
First download the missing deb files to your desktop and scp them over to your RPi:
wget http://ports.ubuntu.com/pool/main/w/wpasupplicant/wpasupplicant_0.7.3-6ubuntu2.3_armhf.deb
http://ports.ubuntu.com/pool/main/libn/libnl3/libnl-3-200_3.2.24-2_armhf.deb
http://ports.ubuntu.com/pool/main/libn/libnl3/libnl-genl-3-200_3.2.24-2_armhf.deb
http://ports.ubuntu.com/pool/main/p/pcsc-lite/libpcsclite1_1.8.11-3ubuntu1_armhf.deb
Then on the RPi remount the system partition read-write and install the packages:
sudo mount -o remount,rw /
sudo dpkg -i *.deb
Create a config file for your wlan0 interface:
cat <<EOF | sudo tee cat /etc/network/interfaces.d/wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa_ssid "<YOUR_WIFI_NAME>"
wpa_psk "<YOUR_PASSWORD>"
EOF
sudo chmod go-r /etc/network/interfaces.d/*
And finish up by remounting the root partition as read-only:
sudo mount -o remount,ro /
Now you can plug in your USB WiFi dongle and it should connect to your network. Use
ifconfig wlan0 to see what IP address your RPi got assigned and
dmesg to see the kernel logs in case things don't work as expected.
Have fun!