gushiren

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
查看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
posted on 2018-08-21 18:43  gushiren  阅读(277)  评论(0编辑  收藏  举报