牧场主配置丢失 [英] Rancher configuration lost
问题描述
在配置rancher时,我已经重新启动了rancher主机几次。
即使容器在这些重新启动过程中已启动和停止了几次,也没有丢失。 / p>
我不得不停止并再次运行容器以为UI设置特定的IP,因此我可以将主机中可用的其他IP地址用作容器的HostPort。 / p>
这是我必须再次执行的命令:
docker run -d --restart =除非停止-p 1.2.3.4:80:80 -p 1.2.3.4:443:443牧场主/牧场主
运行此命令后,Rancher以全新安装的形式启动,要求我提供密码,设置集群并从头开始做所有事情,即使我看到很多容器都在运行。
我尝试重新运行rancher在首次安装时显示的命令(包括旧令牌和ca-checksum)。仍然没有。
为什么会这样?有什么方法可以还原数据,还是应该再次进行配置和容器创建?
如果需要从头开始,什么是正确的清理方法?刮? docker rm所有容器并重新进行设置?
更新
我只是在相关问题中找到了另一个成员的一些信息,因为这个问题是在另一个用户的建议之后发生的。
显然有一个升级过程需要遵循,但是我错过了确切需要做的事情。我可以在这里看到停着的旧容器: https://snag.gy/h2sSpH.jpg
我相信我需要对该容器进行处理,以便新的牧场主容器与以前的数据一起联机。
我应该运行它吗?
docker run -d --volumes-from stoic_newton --restart = unless-stopped -p 80:80 -p 443:443 rancher / rancher:latest
好,我可以确认此过程
我在这里遵循了指南:> https://rancher.com/docs/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/#完成升级
我只是添加以停止缺少数据的新rancher容器,如果从原始docker容器复制则创建备份和然后使用该过程中创建的数据容器中的卷重新启动新容器。
我可能已经用旧牧场主的卷启动了新牧场主容器容器,但我更喜欢安全使用它,并按照指南的每个步骤进行操作,此外,我最后得到了一个备用:)
I have restarted the rancher host a few times while configuring rancher.
Nothing was lost, even though containers had been started and stopped several times during these reboots.
I had to stop and run the container again to set a specific IP for the UI, so I could use the other IP addresses available in the host as HostPorts for containers.
This is the command I had to execute again:
docker run -d --restart=unless-stopped -p 1.2.3.4:80:80 -p 1.2.3.4:443:443 rancher/rancher
After running this, rancher started up as a clean installation, asking me for password, to setup a cluster, and do everything from scratch, even though I see a lot of containers running.
I tried rerunning the command that rancher showed on the first installation (including the old token and ca-checksum). Still nothing.
Why is this happening? Is there a way to restore the data, or should I do the configuration and container creation again?
What is the proper way of cleaning up, if I need to start from scratch? docker rm all containers and do the setup again?
UPDATE
I just found some information from another member in a related question, because this problem happened following a suggestion from another user.
Apparently there is an upgrade process that needs to be followed, but I am missing what needs to be done exactly. I can see my old, stopped container here: https://snag.gy/h2sSpH.jpg
I believe I need to do something with that container so the new rancher container becomes online with the previous data.
Should I be running this?
docker run -d --volumes-from stoic_newton --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher:latest
Ok, I can confirm that this process works.
I have followed the guide here: https://rancher.com/docs/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/#completing-the-upgrade
I just add to stop the new rancher container which was lacking the data, copy if from the original docker container to create a backup, and then restart the new container with the volumes from the data container which was created in the process.
I could probably have launched the new rancher container with the volumes from the old rancher container, but I preferred playing it safe and following every step of the guide, and as a plus I ended up with a backup :)
这篇关于牧场主配置丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!