Re: AMI building AMI

2018-01-31 Thread Rafal Lukawiecki
Dear Colin, Julian, I am afraid the script is not working reliably when it is launched by Colin’s very useful configinit from EC2 user-data. If I run the same script from the shell prompt, it works. The difference is that pkg -r /mnt update -f fails a good few times, each time with these errors

Re: AMI building AMI

2018-01-02 Thread Rafal Lukawiecki
Colin, Everyone, Here is the final script that has managed to run, unattended! On a c4.x4large it completes the task in 11 minutes, which is impressive, considering the long list of packages (126). Following that, I am able to encrypt the AMI while copying it across regions using: aws ec2 copy

Re: AMI building AMI

2018-01-02 Thread Rafal Lukawiecki
I have encountered another, hopefully minor issue running pkg in the unattended script. When it installs a package (postfix-sasl) it expects keyboard input to “Would you like to active Postfix in /usr/local/etc/mail/mailer.conf [n]?”. I have tried both: export ASSUME_ALWAYS_YES=YES pkg -c /mnt

Re: AMI building AMI

2018-01-02 Thread Rafal Lukawiecki
> On 2 Jan 2018, at 19:35, Julian Elischer wrote: >> $ pkg -c /mnt install awscli >> Updating FreeBSD repository catalogue... >> pkg: http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly/meta.txz: >> No address >> record >> repository F

Re: AMI building AMI

2018-01-02 Thread Julian Elischer
On 3/1/18 3:19 am, Rafal Lukawiecki wrote: On 2 Jan 2018, at 03:05, Julian Elischer > wrote: #!/bin/sh export ASSUME_ALWAYS_YES=YES PKGS_TO_INSTALL=lots of packages go here pkg -r /mnt fetch -d $PKGS_TO_INSTALL pkg -c /mnt install $PKGS_TO_INSTALL please explain to m

Re: AMI building AMI

2018-01-02 Thread Rafal Lukawiecki
Ah, perhaps pkg -c simply cannot access /var/db/pkg/repo-FreeBSD.sqlite because it is chrooted? > On 2 Jan 2018, at 19:19, Rafal Lukawiecki wrote: > > >> On 2 Jan 2018, at 03:05, Julian Elischer > > wrote: >>> #!/bin/sh >>> export ASSUME_ALWAYS_YES=YES >>> PKGS_TO_IN

Re: AMI building AMI

2018-01-02 Thread Rafal Lukawiecki
> On 2 Jan 2018, at 03:05, Julian Elischer wrote: >> #!/bin/sh >> export ASSUME_ALWAYS_YES=YES >> PKGS_TO_INSTALL=lots of packages go here >> pkg -r /mnt fetch -d $PKGS_TO_INSTALL >> pkg -c /mnt install $PKGS_TO_INSTALL > please explain to me the use of -r AND -c? > if you use -r to populate a c

Re: AMI building AMI

2018-01-01 Thread Julian Elischer
On 2/1/18 12:16 am, Rafal Lukawiecki wrote: On 29 Dec 2017, at 02:44, Colin Percival wrote: us-east-1 ami-e6a6ea9c is a FreeBSD 11.1-RELEASE AMI-building AMI. Many thanks, Colin. And a Happy New Year! May I ask you if what I am hoping to do makes sense? Taking the gist from http

Re: AMI building AMI

2018-01-01 Thread Rafal Lukawiecki
> On 1 Jan 2018, at 22:39, Colin Percival wrote: > > Maybe a dumb question, but do you really need to use a configinit script > for this? I know I showed that as an example in my blog post, but I > expected that the main way the AMI builder would be used would be by > SSHing in and setting thin

Re: AMI building AMI

2018-01-01 Thread Colin Percival
On 01/01/18 11:00, Rafal Lukawiecki wrote: > On 1 Jan 2018, at 17:42, Rafal Lukawiecki wrote: >> PS. Could it be as easy as make DESTDIR=/mnt installkernel in the config >> init? That is indeed how to install the kernel you built into the right place. > I went ahead and tried the script. [...]

Re: AMI building AMI

2018-01-01 Thread Rafal Lukawiecki
> On 1 Jan 2018, at 17:42, Rafal Lukawiecki wrote: > > PS. Could it be as easy as make DESTDIR=/mnt installkernel in the config init? I went ahead and tried the script. It is not working yet, and I need to debug it further, which means connecting to the instance etc, which I have not yet. So

Re: AMI building AMI

2018-01-01 Thread Rafal Lukawiecki
PS. Could it be as easy as make DESTDIR=/mnt installkernel in the config init? > On 29 Dec 2017, at 02:44, Colin Percival wrote: > > us-east-1 ami-e6a6ea9c is a FreeBSD 11.1-RELEASE AMI-building AMI. Many thanks, Colin. And a Happy New Year! May I ask you if what I am hoping to do ma

Re: AMI building AMI

2018-01-01 Thread Rafal Lukawiecki
> On 29 Dec 2017, at 02:44, Colin Percival wrote: > > us-east-1 ami-e6a6ea9c is a FreeBSD 11.1-RELEASE AMI-building AMI. Many thanks, Colin. And a Happy New Year! May I ask you if what I am hoping to do makes sense? Taking the gist from http://www.daemonology.net/blog/2015-11-21-Fr

Re: AMI building AMI

2017-12-28 Thread Colin Percival
(available as an API call >> or via the AWS Console). > > That will be perfect. us-east-1 ami-e6a6ea9c is a FreeBSD 11.1-RELEASE AMI-building AMI. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap |

Re: AMI building AMI

2017-12-27 Thread Rafal Lukawiecki
> You don't want to wait that long -- AsiaBSDCon isn't until March! Ah, in that case please have a go when you have submitted your talk. :) Thank you. > I've only built the AMI Builders in us-east-1 in the past. But it's very > easy to copy AMIs between regions -- you don't need to save to S3

Re: AMI building AMI

2017-12-27 Thread Colin Percival
On 12/27/17 11:02, Rafal Lukawiecki wrote: >> On 27 Dec 2017, at 18:59, Colin Percival wrote: >> I can build an 11.1 AMI Builder AMI tomorrow if you'd like. Using this will >> be better than trying to clean a "live" instance, since even if you delete >> all the files you don't want to include, th

Re: AMI building AMI

2017-12-27 Thread Rafal Lukawiecki
> On 27 Dec 2017, at 18:59, Colin Percival wrote: > > I can build an 11.1 AMI Builder AMI tomorrow if you'd like. Using this will > be better than trying to clean a "live" instance, since even if you delete > all the files you don't want to include, they'll still be lingering in the > free disk

Re: AMI building AMI

2017-12-27 Thread Colin Percival
On 12/27/17 07:53, Rafal Lukawiecki wrote: > Is there a list of AWS AMI ids (and regions) containing Colin’s AMI builder > AMI? The 2015 article > http://www.daemonology.net/blog/2015-11-21-FreeBSD-AMI-builder-AMI.html > > me

Re: AMI building AMI

2017-12-27 Thread Michiel van Baak
On Wed, Dec 27, 2017 at 03:53:03PM +, Rafal Lukawiecki wrote: > Is there a list of AWS AMI ids (and regions) containing Colin’s AMI builder > AMI? The 2015 article > http://www.daemonology.net/blog/2015-11-21-FreeBSD-AMI-builder-AMI.html >

AMI building AMI

2017-12-27 Thread Rafal Lukawiecki
Is there a list of AWS AMI ids (and regions) containing Colin’s AMI builder AMI? The 2015 article http://www.daemonology.net/blog/2015-11-21-FreeBSD-AMI-builder-AMI.html mentions one in us-east-1 ami-28682f42. Are there m