查看readme
To embed the oem/ directory into a CoreOS pxe image:
Note: In order to have the ability to ssh into the created image, you
need to pass ssh keys in via the kernel command line for CoreOS, or
create oem/authorized\_keys with the keys you need added before building
the image.
::
make coreos
实际上应该有两种方式注入秘钥,一种是内核命令行参数coreos.autologin实现
$ cat /etc/ironic/ironic.conf
[pxe]
pxe_append_params = coreos.autologin
另一种是在cores/oem/下创建authorized_keys,copy conductor节点的公钥信息到authorized_keys
[root@conductorbuildroot]# cat /root/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUVYVQxHNyYQCRdoOiWtojAwZ9O0sZZLy6kSfKtcyvpbTvcXo3RuRR5jJWjdtIWV7xbdJMEdXJBNo7KF2//WDK8737K9ImL2k1fjj0VQAMuzIZBdW4UtiQcHWf4g40hwiRmRnU+ybDXyu65IbdRUfug9kSxi5RKbLsqSe209pFs5RKrpE9cx5q/WHOS0wq/KczA9KpB5agJnVxJtifkqGNDXDxC5aJj5hFkfv1b2i8A8pba9/ZVBmAHMzkmnMbJC6EW6Weyhnir6T7CQVQ/zpp4+h80u4kMaicOMfWvarX55/z6FvDhfsBanxuejpY2HKlJ8aYJN4B40dF2MzT37Ch root@controller
$ cat /etc/ironic/ironic.conf
[pxe]
pxe_append_params = sshkey="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUVYVQxHNyYQCRdoOiWtojAwZ9O0sZZLy6kSfKtcyvpbTvcXo3RuRR5jJWjdtIWV7xbdJMEdXJBNo7KF2//WDK8737K9ImL2k1fjj0VQAMuzIZBdW4UtiQcHWf4g40hwiRmRnU+ybDXyu65IbdRUfug9kSxi5RKbLsqSe209pFs5RKrpE9cx5q/WHOS0wq/KczA9KpB5agJnVxJtifkqGNDXDxC5aJj5hFkfv1b2i8A8pba9/ZVBmAHMzkmnMbJC6EW6Weyhnir6T7CQVQ/zpp4+h80u4kMaicOMfWvarX55/z6FvDhfsBanxuejpY2HKlJ8aYJN4B40dF2MzT37Ch root@controller"
systemctl restart ironic-*
ssh core@node-ip
但谈何容易。