public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
From: Ed W <lists@wildgooses.com>
To: gentoo-embedded@lists.gentoo.org
Cc: arkadi.shishlov@gmail.com
Subject: Re: [gentoo-embedded] virtual server profile
Date: Sat, 26 Feb 2011 11:58:03 +0000	[thread overview]
Message-ID: <4D68EACB.8030204@wildgooses.com> (raw)
In-Reply-To: <4D132FBE.6080508@gmail.com>

On 23/12/2010 11:17, Arkadi Shishlov wrote:
> On 12/21/10 16:58, Ed W wrote:
>> However, if that developer/administrator is available, then Gentoo is a
>> marvellous solution for quickly building few MB custom solution, or a 60MB
>> virtual server base installation, or whatever other customised environment you
>> desire?
> Do you have such a setup for virtual server or, maybe, openvpz/vserver? ie.
> profile/make.conf/install masks/whatever ready for public consumption you can share?

Sorry, missed your email

OK, I create

     /usr/local/portage/profiles/my-hardened/

this has a file "parent" which contains: 
../../../../portage/profiles/hardened/linux/amd64/10.0

Then simply create any overrides for completely global defaults and keywords

I then create various subdirectories:

     vserver-host: this holds the generic host config
     vserver-guest: this is the base for the various guest configs 
(over-rides for all guests go here)

In the vserver-guest I create more directories per vserver type, eg:

     vserver-guest/
     vserver-guest/proxy
     vserver-guest/no-multilib
     vserver-guest/www
     vserver-guest/www/apache2
     vserver-guest/www/nginx
     vserver-guest/mysql
     vserver-guest/fs
     vserver-guest/dns
     vserver-guest/glusterfs
     vserver-guest/mail


The main thing to remember is that you need a "parent" file containing 
".." in each and every directory or else you just failed to inherit from 
the top level profile.  However, after that just customise what you need 
for each guest type!


Oh, further, in my host I have several package directories:
     /usr/portage/packages/
     /usr/portage/packages/local
     /usr/portage/packages/uclibc.host
     /usr/portage/packages/uclibc
     /usr/portage/packages/guest32
     /usr/portage/packages/guest64

The "local" one is for the host and the others are mounted to the 
appropriate class of guest.  Note this isn't as granular as you desire, 
eg the PHP package will normally have different use flags between apache 
and nginx guests.  However, portage simply uses or rebuilds the php 
package as it finds it previously built.  This is satisfactory for me.  
Mysql is another example where most guests build with "-minimal", but 
the servers build the full server.  Again handled automatically with a 
slight slowdown occasionally


Good luck

Ed W



      reply	other threads:[~2011-02-26 12:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 20:18 [gentoo-embedded] Some good words for Gentoo embedded? Kfir Lavi
2010-12-09 21:42 ` Peter Stuge
2010-12-09 23:02 ` David Ford
2010-12-30  6:52   ` Enrico Weigelt
2010-12-30  7:17     ` Peter Stuge
2010-12-30 10:49       ` Enrico Weigelt
2010-12-21 14:58 ` Ed W
2010-12-21 16:20   ` Peter Stuge
2010-12-23  8:34     ` Kfir Lavi
2010-12-23 11:17   ` [gentoo-embedded] virtual server profile Arkadi Shishlov
2011-02-26 11:58     ` Ed W [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D68EACB.8030204@wildgooses.com \
    --to=lists@wildgooses.com \
    --cc=arkadi.shishlov@gmail.com \
    --cc=gentoo-embedded@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox