Re: Devops question: unattended installs of FreeBSD?

2015-01-15 Thread Kamil Czekirda
Please take a look on this:

https://wiki.freebsd.org/SummerOfCode2014/FreeBSD_PXE_preseed

This is extension for bsdinstall script, you can configure for example
local mirror, root password, zfs options etc.

The most straightforward solution:
- save configured template to www server (
http://svnweb.freebsd.org/socsvn/soc2014/kczekirda/pxe-fai-head/others/template.input?view=markup
)
- add option bootfile-name "http://example.com/configs/"; to your DHCP server
- run mfsfai from iso file (for example:
http://svnweb.freebsd.org/socsvn/soc2014/kczekirda/pxe-fai-head/tools/mfsbsd-10.0-RELEASE-fai-amd64.iso?view=co
)

Fai will download configuration file called as mac address from network
card, if not exist file called default and do installation with this
configuration.

You can also boot this iso file by PXE using for example iPXE or PXELINUX
and MEMDISK module.

Please don't hesitate to contact me if you need assistant or questions.

Regards,
Kamil

2015-01-13 22:10 GMT+01:00 Craig Rodrigues :

> On Mon, Jan 12, 2015 at 12:12 PM, John Nielsen  wrote:
>
> >
> > 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.)
> >
> >
> Thanks!  You provided some excellent concrete examples for how to do
> unattended FreeBSD installs.
>
> In the past 6 months, I have had two different people ask me how to:
> -> create a PXE boot server
> -> take the ISO image for FreeBSD 9.2, FreeBSD 10.1, etc.
> -> create a kickstart environment where it is possible to PXE boot a
> cluster of machines, and
> have an unattended "kickstart" install take place of the various
> FreeBSD versions
>
> I have coded this kind of stuff up myself in the past and written my own
> scripts.
> However, it would be really nice if we had more straightforward
> documentation and example scripts for doing this.
> That way, the average devops engineer experienced with Linux and kickstart
> can set this up with no problem, instead of having to struggle and figure
> things out.
>
> It looks like all this stuff is possible under FreeBSD.  The main problem I
> see is that the
> access to the documentation for doing this is not straightforward at all.
>
> If I do a web search for "Linux kickstart", the search results I get lead
> me to documentation
> that is actually quite good.  I am not a Linux expert, but I can read that
> stuff and figure out how to set it
> up reasonably quickly.
>
> If I do a web search for "FreeBSD kickstart", the top search results I get
> lead to a few broken
> web links, and some private notes from different people on the Internet.
> The notes are not bad,
> but not as straightforward to follow as the Linux documentation links.
>
> Since you have some good experience with this, can we create a thread on
> https://forums.freebsd.org
> with the title "FreeBSD kickstart" with some step-by-step examples for
> creating a "kickstart" environment?
>
> That way over time, a web search for "FreeBSD kickstart" will show the
> forum post with top-notch examples.
>
> Thanks.
> --
> Craig
> ___
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
>
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Devops question: unattended installs of FreeBSD?

2015-01-14 Thread Fabian Keil
Jamie Landeg-Jones  wrote:

> 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.
> >
> > What is the equivalent in FreeBSD?
> 
> vultr.com has an option to automatically install a freebsd instance
> (it's an automated install, not simply a binary image etc.)
> 
> You can even vnc to the console and watch it progress.
> 
> Though I'm not sure if the free trial requires credit card authoration -

They do. Vultr is also picky about which credit cards are accepted
(mine weren't, no additional explanation given).

Fabian


pgpRWG4Jkfelg.pgp
Description: OpenPGP digital signature


Re: Devops question: unattended installs of FreeBSD?

2015-01-13 Thread Jamie Landeg-Jones
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.
>
> What is the equivalent in FreeBSD?

vultr.com has an option to automatically install a freebsd instance
(it's an automated install, not simply a binary image etc.)

You can even vnc to the console and watch it progress.

Though I'm not sure if the free trial requires credit card authoration -
they are trying to make sure they aren't exploited by spammers etc.

cheers,
Jamie
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Devops question: unattended installs of FreeBSD?

2015-01-13 Thread Allan Jude
On 2015-01-13 16:10, Craig Rodrigues wrote:
> On Mon, Jan 12, 2015 at 12:12 PM, John Nielsen  wrote:
> 
>>
>> 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.)
>>
>>
> Thanks!  You provided some excellent concrete examples for how to do
> unattended FreeBSD installs.
> 
> In the past 6 months, I have had two different people ask me how to:
> -> create a PXE boot server
> -> take the ISO image for FreeBSD 9.2, FreeBSD 10.1, etc.
> -> create a kickstart environment where it is possible to PXE boot a
> cluster of machines, and
> have an unattended "kickstart" install take place of the various
> FreeBSD versions
> 
> I have coded this kind of stuff up myself in the past and written my own
> scripts.
> However, it would be really nice if we had more straightforward
> documentation and example scripts for doing this.
> That way, the average devops engineer experienced with Linux and kickstart
> can set this up with no problem, instead of having to struggle and figure
> things out.
> 
> It looks like all this stuff is possible under FreeBSD.  The main problem I
> see is that the
> access to the documentation for doing this is not straightforward at all.
> 
> If I do a web search for "Linux kickstart", the search results I get lead
> me to documentation
> that is actually quite good.  I am not a Linux expert, but I can read that
> stuff and figure out how to set it
> up reasonably quickly.
> 
> If I do a web search for "FreeBSD kickstart", the top search results I get
> lead to a few broken
> web links, and some private notes from different people on the Internet.
> The notes are not bad,
> but not as straightforward to follow as the Linux documentation links.
> 
> Since you have some good experience with this, can we create a thread on
> https://forums.freebsd.org
> with the title "FreeBSD kickstart" with some step-by-step examples for
> creating a "kickstart" environment?
> 
> That way over time, a web search for "FreeBSD kickstart" will show the
> forum post with top-notch examples.
> 
> Thanks.
> --
> Craig
> ___
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
> 

Martin Matuška gave a talk at AsiaBSDCon 2014 about using 'Foreman' in
addition to Puppet to manage FreeBSD instances.

Slides: http://blog.vx.sk/pdf/foreman-asiabsdcon2014.pdf
Video: https://www.youtube.com/watch?v=nb8jB5x0OX4

So foreman does the inventory management (for physical hosts etc), and
manages network booting mfsBSD and running the scripted installation,
and boot strapping puppet, which then takes over the config management
side of things.


My self, I've looked at using zfs send|receive to deploy new hosts,
since I am deploying servers in remote data centers where I don't have
another host to PXE Boot off of.

-- 
Allan Jude



signature.asc
Description: OpenPGP digital signature


Re: Devops question: unattended installs of FreeBSD?

2015-01-13 Thread Craig Rodrigues
On Mon, Jan 12, 2015 at 12:12 PM, John Nielsen  wrote:

>
> 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.)
>
>
Thanks!  You provided some excellent concrete examples for how to do
unattended FreeBSD installs.

In the past 6 months, I have had two different people ask me how to:
-> create a PXE boot server
-> take the ISO image for FreeBSD 9.2, FreeBSD 10.1, etc.
-> create a kickstart environment where it is possible to PXE boot a
cluster of machines, and
have an unattended "kickstart" install take place of the various
FreeBSD versions

I have coded this kind of stuff up myself in the past and written my own
scripts.
However, it would be really nice if we had more straightforward
documentation and example scripts for doing this.
That way, the average devops engineer experienced with Linux and kickstart
can set this up with no problem, instead of having to struggle and figure
things out.

It looks like all this stuff is possible under FreeBSD.  The main problem I
see is that the
access to the documentation for doing this is not straightforward at all.

If I do a web search for "Linux kickstart", the search results I get lead
me to documentation
that is actually quite good.  I am not a Linux expert, but I can read that
stuff and figure out how to set it
up reasonably quickly.

If I do a web search for "FreeBSD kickstart", the top search results I get
lead to a few broken
web links, and some private notes from different people on the Internet.
The notes are not bad,
but not as straightforward to follow as the Linux documentation links.

Since you have some good experience with this, can we create a thread on
https://forums.freebsd.org
with the title "FreeBSD kickstart" with some step-by-step examples for
creating a "kickstart" environment?

That way over time, a web search for "FreeBSD kickstart" will show the
forum post with top-notch examples.

Thanks.
--
Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Devops question: unattended installs of FreeBSD?

2015-01-12 Thread Wolff, Nicholas (Nick)
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"  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.
>> 
>> 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@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-current
>To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Devops question: unattended installs of FreeBSD?

2015-01-12 Thread Nathan Whitehorn


On 01/12/15 11:24, Craig Rodrigues wrote:

Hi,

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_pc-sysinstall/10.0/en


(3) Please see "SCRIPTING" in bsdinstall(8).

Let me know if you have any trouble with it.
-Nathan


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.

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?

Thanks.
--
Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"



___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Devops question: unattended installs of FreeBSD?

2015-01-12 Thread John Nielsen
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.
> 
> 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_pc-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@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Devops question: unattended installs of FreeBSD?

2015-01-12 Thread Kurt Jaeger
Hi!

> 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.

Are the nodes with local disks or is storage coming from some iSCSI etc ?

What cloud is it ?

Depending on the storage behind the cloud, I'd just un-tar
a prepared filesystem image onto the network storage in question, add some
/etc/rc.conf file to it and there you go ?

[Note: I have *not* done this myself, just guessing]

-- 
p...@opsec.eu+49 171 3101372 5 years to go !
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Devops question: unattended installs of FreeBSD?

2015-01-12 Thread Craig Rodrigues
Hi,

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_pc-sysinstall/10.0/en

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.

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?

Thanks.
--
Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"