Subject: [alpine-devel] Should `setup-apkrepos -f` if fails.

From: Magicloud Magiclouds <[email-masked]>
Date: Sun, 3 Mar 2019 13:35:58 +0800

Hi,

While working on automatically setup an alpinelinux, I found that,
`setup-apkrepos -f` falls back to interactive mode if something is
wrong when retrieving mirror list.

I think this is unexpected. One, headless or unattended setup hangs
because this step is waiting for user. Two, it does not exit with
error, so the automation script cannot detect the error easily and
patch things up.

I did not submit this as a bug since I'd like to have your opinion. Thanks.

-- 
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Thu, 14 Mar 2019 14:46:41 +0100

On Sun, 3 Mar 2019 13:35:58 +0800

> I did not submit this as a bug since I'd like to have your opinion. Thanks.

Yeah, I think this can be considered a bug. Please report it on https://bugs.alpinelinux.org

-nc

---

---

From: Magicloud Magiclouds <[email-masked]>
Date: Fri, 15 Mar 2019 11:30:03 +0800

Sorry, I was not aware that the thread was replied.

I have some opinions on read-only image kick start. I will check
Drew's script first. Then a feature request for discussing.

PS: Tuan, I think ssh_key is quite hard to use, actually. It accepts a
URL, or a pub key string. Since pub key string contains spaces
(ssh-rsa ABCDEFG hostname), while some boot loader cannot pass this
string correctly (with double quote, or escaping), it is not
practically a useful way.

-- 
竹密岂妨流水过
山高哪阻野云飞

---

---

From: Tuan Hoang <[email-masked]>
Date: Mon, 18 Mar 2019 13:53:32 +0100

> practically a useful way.

The support for pub key string is there but I don't know if you could
paste a RSA key into the kernel parm (limited by 255 char ?). A ssh
ed25519 key should work I guess.

---

---

From: Magicloud Magiclouds <[email-masked]>
Date: Sun, 3 Mar 2019 13:39:58 +0800

Sorry the subject missed the word "exit".

-- 
竹密岂妨流水过
山高哪阻野云飞

---

---

From: Tuan Hoang <[email-masked]>
Date: Fri, 8 Mar 2019 16:49:02 +0100

Hello,

Personally speaking, I like automated installation feature landed on
Alpine. But for now, the installer scripts do not support it to my
knowledge.

Seems like you have already made some progress with that endeavor, would
you mind sending a patch or opening an issue or pr and we can discuss
about it ?

Tuan

---

---

From: Drew DeVault <[email-masked]>
Date: Fri, 8 Mar 2019 10:52:07 -0500

A little bit late to this thread, but I found the installation scripts
wholely unsuitable for unattended installation. You're probably better
off ditching them. Here's the script I use:

https://git.sr.ht/~sircmpwn/builds.sr.ht/tree/master/images/alpine/genimg

Feel free to adapt it to your needs. IMO given the simplicity of doing
these steps manually, I think that the setup-* scripts should be
considered useful only in an interactive install.

---

---

From: Tuan Hoang <[email-masked]>
Date: Fri, 8 Mar 2019 17:00:47 +0100

I would love to hear opinions from Alpine dev team on this matter.

What's in my mind is something like established method like kickstart
(and preseed too?).

Something like, you have an init service that watches for kernel parm
'auto_inst'. If there is, it starts the automated installer for you (and
somehow can reuse our setup-* scripts), with a provided configuration
file. Could be like 'auto_inst=https://yoursite.com/auto_inst.conf'. I
think this would be a nice fit for Alpine.

---

---

From: Tuan Hoang <[email-masked]>
Date: Fri, 8 Mar 2019 17:03:42 +0100

> think this would be a nice fit for Alpine.
As simple as firstboot init service we are having and its corresponding
kernel parm 'ssh_key'.
https://git.alpinelinux.org/aports/tree/main/openrc/firstboot.initd

---

---

From: Natanael Copa <[email-masked]>
Date: Thu, 14 Mar 2019 15:43:25 +0100

On Fri, 8 Mar 2019 17:00:47 +0100

> think this would be a nice fit for Alpine.

We currently have support for "answer" files. This was added as a hack,
and I would like to replace it.

I think it would be cool if you could provide alpine with an coud-init
yaml file and it would install it based on that.

I don't know if cloud-init format is the best or if there are any other
alternatives to consider. I just think we should not invent our own
format for this.

-nc

---