我刚刚按照此官方指南(主要是)运行我的 Nextcloud 实例,成功安装并配置了适用于 Intel Dawson Canyon 和 June Canyon NUC 的 Ubuntu Core 18 映像。
对我来说,选择 Ubuntu Core 是为了在手动 OPS 操作上花费尽可能少的时间。多年来它一直做得很好(在安装之前,我的服务器是在 raspi 上)。
完成迁移到这台新服务器(物理机,英特尔 NUC)后,我认为启用 Livepatch 会很酷。
我有一个 Ubuntu 帐户,其中我的 Ubuntu 成员已激活(可能有 50 台机器,只有 1 台处于活动状态:我的桌面),所以我的Ubuntu Pro 仪表板如下所示:
我已经安装了canonical-livepatch
snap,并尝试将我的服务器附加到我的帐户(请注意,我的 ubuntu 核心计算机已经“链接”到我的帐户以添加我的 sudoer 用户+ssh 密钥,在 Ubuntu Core 安装步骤中,不确定它是否有效) :
$ sudo canonical-livepatch status --verbose
Machine is not enabled. Please run 'sudo canonical-livepatch enable' with the token obtained from https://ubuntu.com/livepatch.
$ sudo canonical-livepatch enable
token not provided
$ sudo canonical-livepatch enable HereIsMyToken
failed to register client: unauthorized
$ sudo canonical-livepatch attach HereIsMyToken
subcommand "attach" unknown
官方指南提到了 Ubuntu Core 上不存在的命令行或只是过时的命令行(sudo pro attach TheToken
、sudo ua attach TheToken
、 …),但手册明确说明了 后的令牌enable
。它仍然失败。我做错了吗?
$ sudo canonical-livepatch enable --help
canonical-livepatch enable - enable livepatching on the machine
USAGE:
canonical-livepatch enable <token>
FLAGS:
--az (= "")
The availability zone of the instance the livepatch client is being enabled on.
--cloud (= "")
The public cloud name this livepatch client is being enabled on.
--region (= "")
The region of the instance the livepatch client is being enabled on.
这里稍微检查一下我的连接是否正常(无论如何,我刚才安装了快照。):
$ ping canonical.com
PING canonical.com(website-content-cache-1.canonical.com (2620:2d:4000:1::26)) 56 data bytes
64 bytes from website-content-cache-1.canonical.com (2620:2d:4000:1::26): icmp_seq=1 ttl=54 time=8.74 ms
64 bytes from website-content-cache-1.canonical.com (2620:2d:4000:1::26): icmp_seq=2 ttl=54 time=8.72 ms
64 bytes from website-content-cache-1.canonical.com (2620:2d:4000:1::26): icmp_seq=3 ttl=54 time=8.68 ms
64 bytes from website-content-cache-1.canonical.com (2620:2d:4000:1::26): icmp_seq=4 ttl=54 time=8.71 ms
64 bytes from website-content-cache-1.canonical.com (2620:2d:4000:1::26): icmp_seq=5 ttl=54 time=8.76 ms
64 bytes from website-content-cache-1.canonical.com (2620:2d:4000:1::26): icmp_seq=6 ttl=54 time=8.73 ms
^C
--- canonical.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5009ms
rtt min/avg/max/mdev = 8.682/8.726/8.761/0.059 ms