[one-users] New contextualization packages

Gary S. Cuozzo gary at isgsoftware.net
Tue Dec 18 07:47:53 PST 2012


See inline comments...

> Thanks for the feedback, I think we can add some of those
> modifications to future versions of the packages. Some commends
> inline.
> 
> On Mon, Dec 17, 2012 at 3:15 AM, Gary S. Cuozzo
> <gary at isgsoftware.net> wrote:
> > Thank you for these packages.  They work great and are an excellent
> > base.  I used both deb & rpm.
> >
> > I customized them to add some features:
> > * setting entries in /etc/hosts file
> 
> I also think this is very interesting, alongside hostname setting.
> Are
> you setting the hole file or do you create that one programatically?
> For example, automatically setting localhost plus eth0 hostname/ip
> and
> adding some extra hosts.

I am actually cat'ing the file through grep -v to strip out any stuff already there and then appending appropriate entry based on the context variables.



> > * modified for support of resolvconf package in ubuntu 12.04
> 
> We did not support resolvconf package for two reasons:
>   * From the documentation it seems that resolvconf package use is
> only encouraged for complex dns configurations. Editing
> /etc/resolv.conf is still the way to go for normal dns
> configurations.
>   * Using resolvconf package will make the scripts incompatible with
> other distros and I wanted it to be as distro agnostic as possible


Totally agree.  I don't care for resolvconf myself but it is default in newer Ubuntu's so I thought I would support it.  I have a different script for Ubuntu than I do for CentOS.  


> > * added HOSTNAME context variable
> > * added DOMAINNAME variable
> > * added optional ADMIN_USERNAME, ADMIN_PASSWORD, ADMIN_SSH_PUB_KEY
> > to support creation of an admin account only if it doesn't already
> > exist.
> 
> These parameters also seem very useful to me. Do you already have
> scripts in place to do this?

Yes.  Creating the user account with password differs between CentOS and Ubuntu, so I have different scripts for each.  CentOS supports passwd command with reading from stdin.  Ubuntu only supports passing in encrypted password.  I'm happy to share them if you let me know how best to do so.  They are quick & dirty but you can easily clean them up to make them acceptable to include with ONE.



> > I find when I clone a VM, on the first boot, it still has some of
> > the old "template" vm settings because the context happens too
> > late in the boot process.  I plan to add a feature where the last
> > context script will reboot the system if it was the first time
> > booting.  This lets things like the hostname take effect.
> 
> I have been also thinking a lot about this. I decided to make the
> scripts start at that time because we may use the contextualization
> to
> start some services that need the machine to be fully configured. One
> possible solution is having two set of configuration scripts, one
> that
> starts early in the boot process (for network, hostname and such) and
> another list for late configuration or service startup scripts. What
> do you think about it?

I think this is a great idea.  Honestly I don't know enough about the details of the upstart stuff, but I think having an easy way to make scripts that hook into various points in the boot process would be quite nice.  Even if it were as simple as having some sub-directories under the one-context.d directory that were related to the stages of boot.  Sort of a context-based rc#.d directories.


Thanks,
gary



> 
> Cheers
> 
> >
> > Thanks again,
> > gary
> >
> > ----- Original Message -----
> > From: "Javier Fontan" <jfontan at opennebula.org>
> > To: users at lists.opennebula.org
> > Sent: Thursday, October 18, 2012 5:21:49 AM
> > Subject: [one-users] New contextualization packages
> >
> > Hello,
> >
> > We have prepared new contextualization packages and made them more
> > modular so you can also add your own tweaks. Here you have an
> > introductory post with the new features and usage:
> >
> > http://blog.opennebula.org/?p=3584
> >
> > The links to download the packages are in the documentation (
> > http://opennebula.org/documentation:rel3.8:context_overview ).
> >
> > I hope you will find it useful.
> >
> > Cheers
> >
> >
> > --
> > Javier Fontán Muiños
> > Project Engineer
> > OpenNebula - The Open Source Toolkit for Data Center Virtualization
> > www.OpenNebula.org | jfontan at opennebula.org | @OpenNebula
> > _______________________________________________
> > Users mailing list
> > Users at lists.opennebula.org
> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
> > _______________________________________________
> > Users mailing list
> > Users at lists.opennebula.org
> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
> 
> 
> 
> --
> Javier Fontán Muiños
> Project Engineer
> OpenNebula - The Open Source Toolkit for Data Center Virtualization
> www.OpenNebula.org | jfontan at opennebula.org | @OpenNebula
> 



More information about the Users mailing list