Add .gitignore to "rkt" directory to ignore the rkt tarball. Signed-off-by: Scott S. Lowe <scott.lowe@scottlowe.org> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| machines.yml | ||
| provision.sh | ||
| README.md | ||
| Vagrantfile | ||
Running Containers with rkt
These files were created to allow users to use Vagrant (http://www.vagrantup.com) quickly and relatively easily experiment with using rkt (pronounced "rock-it"), the CoreOS implementation of the App Container (appc) specification. The configuration was tested using Vagrant 1.8.1, VMware Fusion 8.1.0, and the Vagrant VMware plugin.
Contents
-
machines.yml: This YAML file contains a list of VM definitions and associated configuration data. It is referenced by
Vagrantfilewhen Vagrant instantiates the VMs. You may need to edit this file to ensure that the correct Vagrant box is listed. -
provision.sh: This shell script is called by the Vagrant shell provisioner and configures
rktinside the VM created by Vagrant. No changes should be needed to this file. -
README.md: This file you're currently reading.
-
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 Vagrant, your virtualization provider, and any necessary Vagrant plugins. Please refer to the documentation for those products for more information on installation or configuration.
-
Use
vagrant box addto install an Ubuntu 14.04 x64 box for the vmware_fusion provider. I have a base box you can use for this purpose; to use my Ubuntu 14.04 x64 base box, add the box withvagrant box add slowe/ubuntu-trusty-x64. -
Place the files from the
rktdirectory of this GitHub repository into a directory on your local system. You can clone the entire "learning-tools" repository (usinggit clone) or just download the specific files from the therktfolder. -
Verify that the Vagrant box you added in step #1 is the box listed in
machines.yml. Note there are separate lines for a VMware Fusion-formatted box (on the "vmw_box" line) and a VirtualBox-formatted box (on the "vb_box" line). -
If you download the
rkt-v1.4.0.tar.gzrelease from GitHub (see https://github.com/coreos/rkt/releases) and place it in the same directory with theVagrantfileand other files, then the Vagrant provisioning script won't download it from the Internet and will use the local copy instead. -
Use
vagrant upto instantiate the learning environment. -
Use
vagrant sshto log into the VM created by Vagrant. -
Use this command to launch a simple rkt container (follow the prompts as necessary):
sudo rkt run --interactive quay.io/coreos/alpine-sh
Enjoy!
License
This material is licensed under the MIT License.