Im exploring the different ways that can be used to install Magento 2 both locally for extension development and then how this could be deployed into production.
Warning this will be a evolving living gist as I have time to play around.
I found that I could run:
composer create project magento/project-community-edition=dev-master magento2