Announce saltstack-lxd-formula in beta

235 views
Skip to first unread message

Rene Jochum

unread,
Jul 26, 2016, 9:58:19 AM7/26/16
to salt-...@googlegroups.com
Hi,

i have the pleasure to announce that saltstack-lxd-formula(1) went in
public beta.

Its a combination of 3 saltstack technologies:

- An execution Module "lxd"
- 4 States "lxd", "lxd_profile", "lxd_image and "lxd_container"
- The formula

About LXD(2):

LXD is a container "hypervisor" and a new user experience for LXC.
LXD allows you to create images, profiles and containers over a REST API.

Its biggest features are:

- Secure by design (unprivileged containers, resource restrictions and
much more)
- Scalable (from containers on your laptop to thousand of compute nodes)
- Intuitive (simple, clear API and crisp command line experience)
- Image based (no more distribution templates, only good, trusted images)
- Live migration

This is what salstack-lxd-formula allows you to do:

- Initialize LXD with storage, authentication and network settings.
- Create some default settings for containers (profiles).
- Pull an image from various sources.
- Create a container with an image.
- Start/Stop/Restart/Freeze/Unfreeze/Migrate a container.
- And finally undo all of the above.

I hope some people will test it and give feedback,

Thanks,
René Jochum aka pcdummy


1.) https://github.com/pcdummy/saltstack-lxd-formula
2.) https://linuxcontainers.org/lxd/

P.s.: This is the second mail as the first one when into another thread
as reply.

David Boucha

unread,
Jul 26, 2016, 1:31:07 PM7/26/16
to salt users list
Rene, thanks for this! I'm very interested in getting an lxd module and state into Salt. I'll test this myself later this week.

It would be great to get this into the develop branch before the code freeze for the next release of Salt, which gives us a few weeks still.


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rene Jochum

unread,
Jul 26, 2016, 2:08:16 PM7/26/16
to salt-...@googlegroups.com
Np, its one step nearer to my dream of an automated Control Panel for
Containers :)

Getting this into salt core is one the roadmap, what is it with
salt-cloud i've never used that. Do we need to apply any special code
for that, i have seen support code in the LXC execution module.

Also before doing a pull on develop i want all my PR's to PyLXD merged
or otherwise solved.

Last but not least, i want these features completed before the pull:

- Add support for Simplestreams image remotes (not sure it requires any
changes on the module).
- Add support for file pull/push with salt:// support.
- Add support for container_exec.

Dave please let me know about your test results :)

Thanks,
Rene
> <mailto:salt-users%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Salt-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to salt-users+...@googlegroups.com
> <mailto:salt-users+...@googlegroups.com>.

Rémy Dernat

unread,
Jul 27, 2016, 3:11:39 AM7/27/16
to salt-...@googlegroups.com
Hi Rene,

Thanks for sharing! I will take a look at that. I am pretty interesting in it because I am already doing that with salt + some shell script (it would took too much time for me to transform/"saltify" all I done). Once my container is set up through the host  + salt, I am adding the new container's minions to my bunch of minions pool.

Network configuration of the container could be tricky. How do you manage it ? Because to create a bridge you need some profiles on container, but you also need some stuff to be done on the host side (I still did not look into your formulas).

Best,

And thanks again,
Remy

To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.

Rene Jochum

unread,
Jul 27, 2016, 5:48:48 AM7/27/16
to salt-...@googlegroups.com
Hi Remy,

Its nice that you have a usecase for it!

I would create the bridge with the network state, then i would change
the profile with "lxd_profile.managed" where i would replace eth0 -
lxdbr0 with eth0 - mybr0.

After that i would assign the default profile to new containers.

Hope that answers your question.

King regards,

Rene


Am 2016-07-27 um 09:11 schrieb Rémy Dernat:
> Hi Rene,
>
> Thanks for sharing! I will take a look at that. I am pretty interesting
> in it because I am already doing that with salt + some shell script (it
> would took too much time for me to transform/"saltify" all I done). Once
> my container is set up through the host + salt, I am adding the new
> container's minions to my bunch of minions pool.
>
> Network configuration of the container could be tricky. How do you
> manage it ? Because to create a bridge you need some profiles on
> container, but you also need some stuff to be done on the host side (I
> still did not look into your formulas).
>
> Best,
>
> And thanks again,
> Remy
>
> 2016-07-26 20:08 GMT+02:00 Rene Jochum <re...@pc-dummy.net
> <mailto:re...@pc-dummy.net>>:

Rémy Dernat

unread,
Jul 27, 2016, 8:19:55 AM7/27/16
to salt-...@googlegroups.com
So bad I did not get your repository earlier, it would have save me a lot of time, but I will check if there is everything I need; otherwise, if I have any time, I will fork it :)

ps: and yes, you answered my question =) 
      but your example is with an IPv6 address.
      Any idea to set DHCP instead ? :P

Thanks again

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.

Rene Jochum

unread,
Jul 27, 2016, 10:12:44 AM7/27/16
to salt-...@googlegroups.com
Which example do you mean?

Am 2016-07-27 um 14:19 schrieb Rémy Dernat:
> So bad I did not get your repository earlier, it would have save me a
> lot of time, but I will check if there is everything I need; otherwise,
> if I have any time, I will fork it :)
>
> ps: and yes, you answered my question =)
> but your example is with an IPv6 address.
> Any idea to set DHCP instead ? :P
>
> Thanks again
>
> 2016-07-27 11:48 GMT+02:00 Rene Jochum <re...@pc-dummy.net
> <mailto:re...@pc-dummy.net>>:

Rémy Dernat

unread,
Jul 28, 2016, 3:33:43 AM7/28/16
to salt-...@googlegroups.com

Rene Jochum

unread,
Jul 28, 2016, 4:54:50 AM7/28/16
to salt-...@googlegroups.com
This is the Listening Address of the LXD Daemon, normaly
you set it to "[::]" to listen on all available addresses and
has nothing to do with DHCP.

You can run your Containers on DHCP when you install for example
dnsmasq on the host and listen on "mybr0".

Hope that helps,

Rene

Am 2016-07-28 um 09:33 schrieb Rémy Dernat:
> https://github.com/pcdummy/saltstack-lxd-formula#config-examples
>
> 2016-07-27 16:12 GMT+02:00 Rene Jochum <re...@pc-dummy.net
> <mailto:re...@pc-dummy.net>>:
>
> Which example do you mean?
>
> Am 2016-07-27 um 14:19 schrieb Rémy Dernat:
> > So bad I did not get your repository earlier, it would have save me a
> > lot of time, but I will check if there is everything I need; otherwise,
> > if I have any time, I will fork it :)
> >
> > ps: and yes, you answered my question =)
> > but your example is with an IPv6 address.
> > Any idea to set DHCP instead ? :P
> >
> > Thanks again
> >
> > 2016-07-27 11:48 GMT+02:00 Rene Jochum <re...@pc-dummy.net <mailto:re...@pc-dummy.net>
> > <mailto:re...@pc-dummy.net <mailto:re...@pc-dummy.net>>>:

Rémy Dernat

unread,
Jul 28, 2016, 5:08:57 AM7/28/16
to salt-...@googlegroups.com
Oops. Exactly. 
Sorry about that.

Rene Jochum

unread,
Aug 25, 2016, 12:22:02 PM8/25/16
to salt-...@googlegroups.com
Any news on that David?


Am 2016-07-26 um 19:31 schrieb David Boucha:
> <mailto:salt-users%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Salt-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to salt-users+...@googlegroups.com
> <mailto:salt-users+...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages