From owner-freebsd-current@FreeBSD.ORG Mon Jan 12 22:19:21 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B281F2F for ; Mon, 12 Jan 2015 22:19:21 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0110.outbound.protection.outlook.com [157.56.111.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABC5277C for ; Mon, 12 Jan 2015 22:19:20 +0000 (UTC) Received: from BL2FFO11FD024.protection.gbl (10.173.160.34) by BL2FFO11HUB058.protection.gbl (10.173.161.158) with Microsoft SMTP Server (TLS) id 15.1.49.13; Mon, 12 Jan 2015 22:19:12 +0000 Received: from cio-krc-pf01.osuad.osu.edu (164.107.81.208) by BL2FFO11FD024.mail.protection.outlook.com (10.173.161.103) with Microsoft SMTP Server (TLS) id 15.1.49.13 via Frontend Transport; Mon, 12 Jan 2015 22:19:12 +0000 Received: from CIO-TNC-HT06.osuad.osu.edu (cio-tnc-ht06.osuad.osu.edu [164.107.81.171]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by cio-krc-pf01.osuad.osu.edu (Postfix) with ESMTPS id 8019FA0060; Mon, 12 Jan 2015 17:19:12 -0500 (EST) Received: from CIO-TNC-D2MBX07.osuad.osu.edu ([fe80::bc62:2439:63af:a166]) by CIO-TNC-HT06.osuad.osu.edu ([fe80::3d16:84bd:8d88:7cfd%12]) with mapi id 14.03.0174.001; Mon, 12 Jan 2015 17:19:11 -0500 From: "Wolff, Nicholas (Nick)" To: John Nielsen , freebsd-current Current Subject: Re: Devops question: unattended installs of FreeBSD? Thread-Topic: Devops question: unattended installs of FreeBSD? Thread-Index: AQHQLp158bnoDRLsTEy5kbJTuXNnKZy9PtsA///PsQA= Date: Mon, 12 Jan 2015 22:19:11 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [199.18.249.17] Content-Type: text/plain; charset="Windows-1252" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-EOPAttributedMessage: 0 Received-SPF: Pass (protection.outlook.com: domain of oar.net designates 164.107.81.208 as permitted sender) receiver=protection.outlook.com; client-ip=164.107.81.208; helo=cio-krc-pf01.osuad.osu.edu; Authentication-Results: spf=pass (sender IP is 164.107.81.208) smtp.mailfrom=nwolff@oar.net; X-Forefront-Antispam-Report: CIP:164.107.81.208; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(438002)(51704005)(199003)(377454003)(52034003)(189002)(479174004)(24454002)(109096001)(86362001)(64706001)(66066001)(16799955002)(77156002)(62966003)(107886001)(92566002)(551544002)(106466001)(87936001)(36756003)(23746002)(47776003)(50986999)(76176999)(106116001)(2656002)(6806004)(46102003)(93346002)(50466002)(19580405001)(102836002)(2950100001)(15975445007)(2900100001)(19580395003)(54356999)(1720100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2FFO11HUB058; H:cio-krc-pf01.osuad.osu.edu; FPR:; SPF:Pass; MLV:sfv; PTR:cio-krc-pf01.osuad.osu.edu; A:1; MX:1; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BL2FFO11HUB058; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:BL2FFO11HUB058; X-Forefront-PRVS: 0454444834 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BL2FFO11HUB058; X-OriginatorOrg: oar.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2015 22:19:12.7859 (UTC) X-MS-Exchange-CrossTenant-Id: b4d138ca-1815-4a9b-a3a7-130a33b1e692 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b4d138ca-1815-4a9b-a3a7-130a33b1e692; Ip=[164.107.81.208] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2FFO11HUB058 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 22:19:21 -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=B9t know if there is any difference there that may effec= t you. Hope that helps, =8BNick On 1/12/15, 3:12 PM, "John Nielsen" wrote: >On Jan 12, 2015, at 12:24 PM, Craig Rodrigues 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. >>=20 >> What is the equivalent in FreeBSD? >>=20 >> 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: >>=20 >> (1) Write your own script >> (2) Use pc-sysinstall from the PC-BSD project >>=20 >>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=3D"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@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-current >To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"