[lxc-users] LXD 2.4.1 - Trouble with Cloud Init
Scott Moser
scott.moser at canonical.com
Mon Jan 30 16:02:02 UTC 2017
On Sun, 29 Jan 2017, Serge E. Hallyn wrote:
> On Fri, Jan 27, 2017 at 06:38:05AM -0600, Neil Bowers wrote:
> > Thank you so much - this has been bugging me for weeks.
> >
> > I do have a question, however, in regards to the 'write_files' directive -
>
> I'm sorry - I really should start using cloud init more myself after
> which I culd be helpful, but for now I don't know the answers to this,
> so cc:ing Scott (which I should have done in my previous reply).
>
> > since this runs before users are created (and while I understand that
> > having it able to affect more of boot is useful, but it's not documented
> > like that anywhere I can find), if I were to create the file in `/etc/skel`
> > instead, would any created users pick it up from there? Or is that ignored
> > when creating users with cloud-init ?
>
> I should *think* cloud-init creates users the standard way which would
> honor /etc/skel. Scott?
Yes, it uses adduser which will do whatever adduser normally does
(including copying /etc/skel).
>
> > Essentially I'm just trying to set up a simple way to put up and tear down
> > containers that will have all of my defaults in place from the start.
Now... Being off this list and replying to this thread is painful. I ended
up I think deleting a mail that Neil sent to list and copied me, but I'll
respond to it below.
[Neil]
> Just a quick followup, I'll post this to the lxc-users list as well, but I
> thought you might want to know.
> Based on your information, I updated my lxc profile 'test' to contain the
> following:
> name: test
> config:
> limits.memory: 1024MB
> user.user-data:
...
I've tested the following and it seems to function fine.
See attached or http://paste.ubuntu.com/23894177/
I'm guessing you had some formatting issues resulting in odd yaml reading.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: profile-show.txt
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170130/35451852/attachment.txt>
More information about the lxc-users
mailing list