{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/packer/issues/3523","repository_url":"https://api.github.com/repos/mitchellh/packer","labels_url":"https://api.github.com/repos/mitchellh/packer/issues/3523/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/packer/issues/3523/comments","events_url":"https://api.github.com/repos/mitchellh/packer/issues/3523/events","html_url":"https://github.com/mitchellh/packer/pull/3523","id":154142658,"number":3523,"title":"LXC builder","user":{"login":"ChrisLundquist","id":181256,"avatar_url":"https://avatars.githubusercontent.com/u/181256?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisLundquist","html_url":"https://github.com/ChrisLundquist","followers_url":"https://api.github.com/users/ChrisLundquist/followers","following_url":"https://api.github.com/users/ChrisLundquist/following{/other_user}","gists_url":"https://api.github.com/users/ChrisLundquist/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisLundquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisLundquist/subscriptions","organizations_url":"https://api.github.com/users/ChrisLundquist/orgs","repos_url":"https://api.github.com/users/ChrisLundquist/repos","events_url":"https://api.github.com/users/ChrisLundquist/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisLundquist/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitchellh/packer/labels/need-documentation","name":"need-documentation","color":"fbca04"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/need-more-tests","name":"need-more-tests","color":"fbca04"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/new-plugin-contribution","name":"new-plugin-contribution","color":"0e8a16"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/pr/needs-review","name":"pr/needs-review","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-11T01:39:52Z","updated_at":"2016-05-20T17:57:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mitchellh/packer/pulls/3523","html_url":"https://github.com/mitchellh/packer/pull/3523","diff_url":"https://github.com/mitchellh/packer/pull/3523.diff","patch_url":"https://github.com/mitchellh/packer/pull/3523.patch"},"body":"This replaces https://github.com/mitchellh/packer/pull/2537 and accomplishes https://github.com/mitchellh/packer/issues/790.\r\n\r\nMy contribution here is minimal and mostly massages the existing work to only provide the `lxc` builder.\r\nWith Ubuntu 16.04 this requires the `lxc1` package, since, from what I can tell, `lxd` has replaced the `lxc` command line interface.\r\n\r\nTruth be told, I was unable to find the `lxc1` syntax to launch a container using the generated tar ball. From [what I read](https://lists.linuxcontainers.org/pipermail/lxc-users/2014-August/007580.html), you have to extract the tar ball before launching the container, and modify various settings. Or use a [bash script](http://stackoverflow.com/questions/30022603/create-an-lxc-container-from-a-local-templete-tar-gz) written by the salt stack community\r\n\r\nSo, I wrangled the tarball, and added a `metadata.yaml` file that was based on the directions from [here](https://insights.ubuntu.com/2016/04/01/lxd-2-0-image-management-512/) then launched it using `lxd` with great success.\r\n\r\nThe whole experience has left me with a few questions:\r\n* Is there really no standard way to launch an `lxc1` style container given a tar ball?\r\n* Do we want to support `lxc1`, `lxd`, or both?\r\n    * Initially I had hoped `lxd` could be a post processor, I'm not sure if that's the right approach from a user perspective now. (specifying an LXC template file to ignore it later seems wrong)\r\n\r\n/cc @ironpinguin @oker1"},"comment":{"url":"https://api.github.com/repos/mitchellh/packer/issues/comments/220675715","html_url":"https://github.com/mitchellh/packer/pull/3523#issuecomment-220675715","issue_url":"https://api.github.com/repos/mitchellh/packer/issues/3523","id":220675715,"user":{"login":"ChrisLundquist","id":181256,"avatar_url":"https://avatars.githubusercontent.com/u/181256?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisLundquist","html_url":"https://github.com/ChrisLundquist","followers_url":"https://api.github.com/users/ChrisLundquist/followers","following_url":"https://api.github.com/users/ChrisLundquist/following{/other_user}","gists_url":"https://api.github.com/users/ChrisLundquist/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisLundquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisLundquist/subscriptions","organizations_url":"https://api.github.com/users/ChrisLundquist/orgs","repos_url":"https://api.github.com/users/ChrisLundquist/repos","events_url":"https://api.github.com/users/ChrisLundquist/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisLundquist/received_events","type":"User","site_admin":false},"created_at":"2016-05-20T17:57:57Z","updated_at":"2016-05-20T17:57:57Z","body":"> Creating containers is fine. We have a few tests that run as \"acceptance tests\" using the PACKER_ACC=1 environment variable;\r\n\r\nWill do.\r\n\r\n\r\n\r\n> I think 2 is more robust but since there is only one exception we can skip this. The AST stuff is kinda a pain.\r\n\r\nAgreed. Docker uses LXC under the covers as well, but yeah :)\r\nFrom what I was reading you can generate `plugins_linux.go` and `plugins_windows.go`"}}
{"actor":{"display_login":"ChrisLundquist"}}