This repo contains cookbooks on which applied to an ubuntu-14.04 installs LXC package and after that the default ubuntu user can start unprivileged containers.
- Start a node EC2/Private datacentre. Ubuntu-14.04
- If EC2: knife bootstrap f.q.d.n-host -i /path/to/priv/key -x ubuntu --sudo -N nodename
- If not EC2: knife bootstrap f.q.d.n-host -P password -x ubuntu --sudo -N nodename
- knife node edit nodename
- Enter this in the runlist: "recipe[upgrade]"
- knife ssh f.q.d.n -i /path/to/key -x ubuntu -m "sudo chef-client"
- knife node edit nodename
- Remove the recipe[upgrade] from runlist and add "recipe[baseos]", "recipe[container-orchestration]"
- knife ssh f.q.d.n -i /path/to/key/ -x ubuntu -m "sudo chef-client"
- knife ssh f.q.d.n -i /path/to/key -x ubuntu -m "sudo reboot"
- At this point you can ssh into the container and prepare a template contaienr from scratch or place an already prepared one. Or even use knife ssh to perform these things.
- Eg. Creating the template. knife ssh f.q.d.n -i /path/to/key -x ubuntu -m "lxc-create -t download -n type -- -d ubuntu -r trusty -a amd64"
- You can either check if the container starts well at this point. or even skip this step.
- For now, you can start the container as, knife ssh f.q.d.n -i /path/to/the/key -x ubuntu -m "containerize "
- Destroy the container: knife ssh f.q.d.n -i /path/to/the/key -x ubuntu -m "decontainerize "
- Write ruby scripts for starting the contianer.
- Take arguments from a YAML file.
These cookbooks requires Ubuntu-14.04. If you are on Amazon EC2, Using ami-7050ae18 is recommended.
WTFPL -- http://www.wtfpl.net/about/