On 01/27/2015 10:34 AM, James wrote:
> Alec Ten Harmsel <alec <at> alectenharmsel.com> writes:
>
>
>
>> I'm sorry to spam gentoo-user, but I'm not sure who else would be
>> interested in something like this. Also, feel free to email me with bugs
>> in the code or documentation, or open something in GitHub's issue tracker.
> One man's spam generates  maps for another.....
>
>
> So my map of "todo" on ansible is all about common gentoo installs. [1]
> Let's take the first and most easy example "the clone". I have a gentoo
> workstation install that I want to replicated onto identical hardware (sort
> of like a disk to disk "dd" install). 
>
> So how would I impress the bossman by actually saving admin time
> on how to use the bossman to create (install from scratch + pxe?)
> a clone.

Assuming that disks are formatted, a stage3 has been freshly extracted,
bossman is installed, and the role/config files are on a mounted
filesystem, it should be similar to the role below:

    file /etc/portage/make.conf root:root 644
    ! emerge-webrsync
    ! emerge --sync

    file /etc/locale.gen root:root 600
    ! locale-gen

    pkg sys-kernel/gentoo-sources
    file /usr/src/linux/.config root:root 644
    ! make -C /usr/src/linux all modules_install install

    pkg sys-boot/grub
    ! grub-install /dev/sda # I can't remember all the options needed here
    file /etc/default/grub
    ! grub-mkconfig -o /boot/grub/grub.cfg

    # Generating /etc/fstab using something similar to Arch's `genfstab`
would be much better
    file /etc/fstab root:root 644

    # Root password
    file /etc/shadow root:root 640

    # Logger
    pkg app-admin/syslog-ng

    # Network
    pkg net-misc/dhcpcd
    enable dhcpcd

    # For remote access
    pkg net-misc/openssh
    file /etc/ssh/sshd_config root:root 600
    file /etc/ssh/known_hosts root:root 600
    # Other sshd files...
    enable sshd

There are a ton of assumptions that make this work; if installing
manually, the installer is responsible, and if installing from PXE, this
stuff would have to be baked into the ISO.

>
>
> Gotta recipe for that using bossman?
> Or is that an invalid direction for bossman?
>
> curiously,
> James
>
>
> [1]
> http://blog.jameskyle.org/2014/08/automated-stage3-gentoo-install-using-ansible/
>
>
>
>

Automating the bootstrapping of a node is reasonably complicted, even
harder on Gentoo than on RHEL. This is the type of thinking I want to
do, and I'm working on doing this with my CentOS box that runs ssh,
Jenkins, postgres, and Redmine.

Alec

Reply via email to