[lxc-users] Made a few enhancements to centos templates

Mingjiang Shi mrjewes at gmail.com
Wed Mar 12 10:25:04 UTC 2014


Hi Serge,
The script is a separate tool with a few built-in conventions to make
creating containers much easier (only for centos right now)

*Here is the usage information:*
Description: create multiple centos containers.
usage: ./create_containers.sh <options>
  -n: number of containers to be created
  -s: the start number

*Example*:
./create_containers.sh -n 5 -s 111

This will create 5 containers, and their name and ip addresses will be set
as follows:
container name
fqdn
ip address
lxc111lxc111.example.com192.168.122.111lxc112lxc112.example.com
192.168.122.112lxc113lxc113.example.com192.168.122.113lxc114
lxc114.example.com192.168.122.114lxc115lxc115.example.com192.168.122.115

The ip addresses and hostname mapping are set in the /etc/hosts in all the
containers.

I will send the patch accordingly. Thanks!


On Wed, Mar 12, 2014 at 11:40 AM, Serge Hallyn <serge.hallyn at ubuntu.com>wrote:

> Quoting Mingjiang Shi (mrjewes at gmail.com):
> > Hi All,
> > I use the Linux container to build test environment for my project, so I
> > made the following enhancements to the centos templates to make it easier
> > for me.
> > 1. Added option to not expire the root password
>
> yes please.
>
> > 2. Added option to copy my host ssh public key to the container so that I
> > can ssh the my containers without using password
>
> yes please.
>
> > 3. Added option to set static IP to the container
>
> Should be fine.
>
> > 4. Added a script to create a bunch of containers and setup the hosts
> files
> > so that they can be accessed via hostname.
>
> I don't understand where this fits into the template.  Are you intending
> this as a separate tool or a part of the template?  Please send it
> separately and we can discuss.
>
> > All the above changes are disabled by default, i.e. one need to pass
> extra
> > option to enable them.
> >
> > Let me know if those changes can be contributed back to upstream.
>  Thanks!
>
> Definately.  Please sent patches with a Signed-off-by to the lxc-devel
> mailing list, and we'll gratefully review.
>
> -serge
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>



-- 
Thanks
-Mingjiang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140312/a6d5a19e/attachment-0001.html>


More information about the lxc-users mailing list