From 86c4918c85e322055513dd25fc212b9ba9207cce Mon Sep 17 00:00:00 2001 From: Scott Lowe Date: Mon, 20 Apr 2015 12:33:51 -0600 Subject: [PATCH] Initial commit Add initial version of files for working with Project Photon --- photon/README.md | 29 +++++++++++++++++++++++++++++ photon/Vagrantfile | 22 ++++++++++++++++++++++ photon/servers.yml | 5 +++++ 3 files changed, 56 insertions(+) create mode 100644 photon/README.md create mode 100644 photon/Vagrantfile create mode 100644 photon/servers.yml diff --git a/photon/README.md b/photon/README.md new file mode 100644 index 0000000..878d91c --- /dev/null +++ b/photon/README.md @@ -0,0 +1,29 @@ +# Simple VMware Photon Environment + +These files were created to allow users to use Vagrant ([http://www.vagrantup.com](http://www.vagrantup.com)) to quickly and relatively easily spin up an instance of VMware Photon (container-optimized Linux distribution). The configuration was tested using Vagrant 1.7.2, VMware Fusion 6.0.5, and the Vagrant VMware plugin. + +## Contents + +* **README.md**: This file you're currently reading. + +* **servers.yml**: This YAML file contains a list of VM definitions and associated configuration data. It is referenced by `Vagrantfile` when Vagrant instantiates the VMs. + +* **Vagrantfile**: This file is used by Vagrant to spin up the virtual machines. This file is fairly extensively commented to help explain what's happening. You should be able to use this file unchanged; all the VM configuration options are stored outside this file. + +## Instructions + +These instructions assume you've already installed VMware Fusion, Vagrant, and the Vagrant VMware plugin. Please refer to the documentation for those products for more information on installation or configuration. + +1. At the time of writing, Vagrant's guest OS support did not work as expected with Photon. To fix this issue, install a Photon-specific Vagrant plugin using this command: + + vagrant plugin install vagrant-guests-photon + +2. Optionally, go ahead and download the Photon box for Vagrant using the command `vagrant box add vmware/photon`. You can skip this step, if you'd like; Vagrant will then automatically download the box the first time you run `vagrant up`. + +3. Place the files from the `photon` directory of this GitHub repository into a directory on your local system. You can clone the entire "learning-tools" repository (using `git clone`), download a ZIP file of the entire "learning-tools" repository, or just download the specific files from the the `photon` folder. + +4. From a terminal window, change into the directory where you stored the files from step 3 and run `vagrant up`. + +5. Once Vagrant has finished bringing up the VM, simply use `vagrant ssh` to log into the system. Both `rkt` (version 0.5.1) and `docker` (version 1.5.0) are pre-installed and ready for use. + +Enjoy! diff --git a/photon/Vagrantfile b/photon/Vagrantfile new file mode 100644 index 0000000..d0fb5fa --- /dev/null +++ b/photon/Vagrantfile @@ -0,0 +1,22 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Specify Vagrant version and Vagrant API version +Vagrant.require_version ">= 1.6.0" +VAGRANTFILE_API_VERSION = "2" + +# Create and configure the VMs +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + + # Specify the Vagrant box to use + config.vm.box = "vmware/photon" + + # Disable automatic box update checking + config.vm.box_check_update = false + + # Use Vagrant's default insecure SSH key + config.ssh.insert_key = false + + # Disable default synced folder + config.vm.synced_folder ".", "/vagrant", disabled: true +end diff --git a/photon/servers.yml b/photon/servers.yml new file mode 100644 index 0000000..415a323 --- /dev/null +++ b/photon/servers.yml @@ -0,0 +1,5 @@ +--- +- name: openstack-cli + box: slowe/ubuntu-trusty-x64 + ram: 512 + vcpu: 1