Re: Devops question: unattended installs of FreeBSD?

From: Wolff, Nicholas (Nick) <"Wolff,>
Date: Mon, 12 Jan 2015 22:19:11 +0000
Where moving to using a medium sized(~100 boxes) freebsd install base to
pc-sysinstall and a very simple deployment script. We were on a custom
sysinstall derivative so maybe that what making it feel so magical but I
really like pc-sysinstall. We are relatively early in the process of
deployment so there still may be some tweaking but pc-sysinstall seemed
really simple and easily adaptable. Now this is for physical hardware not
the cloud so I donąt know if there is any difference there that may effect
you.

Hope that helps,

‹Nick

On 1/12/15, 3:12 PM, "John Nielsen" <lists_at_jnielsen.net> wrote:

>On Jan 12, 2015, at 12:24 PM, Craig Rodrigues <rodrigc_at_freebsd.org> wrote:
>
>> I had a devops person who is familiar with setting up hundreds of
>> Linux nodes in cloud environment ask me what is the best way
>> to do unattended installs in a cloud environment.
>> Linux has kickstart installs, which are quite useful and popular.
>> 
>> What is the equivalent in FreeBSD?
>> 
>> In the sysinstall days, the sysinstall.cfg config file could be created
>> which drove large parts of the installer.  Now that sysinstall is gone,
>> what is the alternative?  Searching the web, I found two answers:
>> 
>> (1)  Write your own script
>> (2)  Use pc-sysinstall from the PC-BSD project
>> 
>>http://wiki.pcbsd.org/index.php/Creating_an_Automated_Installation_with_p
>>c-sysinstall/10.0/en
>
>bsdinstall(8) does support scripted installations, see the man page.
>Writing your own script is also viable, or a combination of the two. I
>don't have experience with scripting bsdinstall as I tend to script my
>own.
>
>Vultr.com has a script that does a full installation when you first bring
>up a FreeBSD VM. At $work, I maintain a script which creates FreeBSD
>template disk images which are then cloned for new VMs. There are also
>now make targets in the base system to build VM-suitable disk images (but
>I don't recall what they are off the top of my head).
>
>> I am trying to work with a devops team who is very experienced
>> with setting up Linux environments in the cloud.  Based on the available
>> docs,
>> it is not clear to non-FreeBSD experts how to accomplish similar things
>> with FreeBSD.
>
>I'd be happy to provide more specific suggestions if needed. It really
>depends on how fully automated you want things to be and how much
>customization you want to include, as well as what you have available in
>the install environment. If you're installing on live VMs then you first
>have to get them booted. A custom ISO or MFS image is probably the
>simplest for that, though PXE is also an option. (Actually, serving an
>mfsBSD image via PXE is pretty straightforward.)
>
>Then:
>
>Set up the network if it will be needed for the install and is not
>already done.
>Set up the disk(s), partition(s), filesystem(s), etc
>Mount
>Install distribution sets. Here's what I use for that:
>#!/bin/sh
>#...
>DISTS="base kernel lib32 doc games"
>for dist in ${DISTS}; do
>  fetch -o - "${BASEURL}/${dist}.txz" | tar -xJ --exclude
>kernel/\*.symbols -C ${MOUNTPOINT} -f -
>done
>#...
>
>Run freebsd-update
>Populate /etc/fstab
>Set a root password
>Make sure you can log in to the new system (if SSH is needed then either
>create a non-root user or enable root login in sshd_config (not ideal))
>Populate /etc/rc.conf
>Run tzsetup or similar
>Install 3rd-party packages
>Configure bootcode
>
>> By the way, I would be very interested in hearing from people who have
>> experience
>> in installing, configuring, and upgrading hundreds or even thousands of
>> FreeBSD
>> nodes in devops and cloud environments.  For people who are not FreeBSD
>> experts,
>> but who are Linux devops experts, is it easy to do, or is there a lot of
>> custom scripts which need to be written?
>
>A few tools translate over more or less directly, such as Ansible and
>SaltStack. Having a uniform and automated installation procedure (like it
>sounds like you're going for) and front-loading a lot of your
>customization in to that is a good starting point. Building your own
>packages to distribute/update configuration files or run scripts where
>needed is also helpful. Install that package as part of the initial
>system setup then have it update itself (or push out a cron job, or do
>mass updates when needed via Salt, etc).
>
>Just some ideas. I don't think it's any harder/easier than running lots
>of Linux servers, just different in some ways. If you want custom
>functionality then you'll probably need some custom scripts. :)
>
>JN
>_______________________________________________
>freebsd-current_at_freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-current
>To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
Received on Mon Jan 12 2015 - 21:19:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:54 UTC