cnrancher / autok3s

Run K3s Everywhere
https://www.suse.com
Apache License 2.0
755 stars 76 forks source link

[Feature Request] Remove harvester v1.0.x provider dependency #545

Closed orangedeng closed 1 year ago

orangedeng commented 1 year ago

Because of the dependencies of k3d and harvester are linked together. There are no way to upgrade only one of them in dependencies.

We tried to upgrade harvester to v1.1.1 and k3d to v5.4.4, but new problem occurs. The github.com/c9s/goprocinfo/linux which doesn't support windows platform, was introduced by harvester v1.1.1 in following path:

github.com/cnrancher/autok3s/pkg/providers/harvester
github.com/harvester/harvester/pkg/builder
github.com/harvester/harvester/pkg/util
github.com/longhorn/longhorn-manager/types
github.com/longhorn/longhorn-manager/util
github.com/longhorn/go-iscsi-helper/util
github.com/c9s/goprocinfo/linux

And the harvester v1.0.x will be EoL in 3 month and the feature request of the harvester client will be done in v1.2.x. So we decide to remove harvester provider first and bring it back after the feature request of harvester is completed.

Refer to https://github.com/cnrancher/autok3s/issues/512

TangStone commented 1 year ago

在v0.6.0版本创建harvester集群

image
TangStone commented 1 year ago

Autok3s upgrade

Docker deployment - upgrade autok3 from v0.6.0 to v0.7.0-rc2

Detailed steps

  1. In the ubuntu-18.04 (248g) instance, the Docker starts the 0.6.0 version of autok3s, and creates the harvester cluster, aliyun cluster, harvester cluster templates, and aliyun cluster templates. The following is the Docker command to start autok3s
    docker run -itd --restart=unless-stopped --net host -v /var/run/docker.sock:/var/run/docker.sock cnrancher/autok3s:v0.6.0
  2. Upgrade version 0.6.0 to 0.7.0-rc2 in the following ways:,
    docker stop <old-container>
    docker run -itd --restart=unless-stopped -p 8080:8080 --volumes-from <old-container> cnrancher/autok3s:v0.7.2-rc2
  3. Check the autok3s UI. The original aliyun cluster is running normally. The Harvester cluster and the Harvester cluster template do not display the upgraded UI. There is no Harvester provision for quick start and cluster creation. Using the upgraded version v0.7.0-rc2, you can successfully create a new Alibaba Cloud cluster

    Binary deployment - upgrading autok3 from v0.6.0 to v0.7.0-rc2

    Detailed steps

  4. On the ubuntu-18.04 (248g) instance, after entering the instance, pull https://github.com/cnrancher/autok3s/releases/download/v0.6.0/autok3s_linux_amd64 File and grant execution permission, and move it to the/usr/local/bin directory
  5. Start autok3s v0.6.0
  6. Access the autok3s ui through the instance address, and create the harvester, aliyun cluster, harvester cluster template, and aliyun template cluster successfully
  7. Stop running autok3s v0.6.0
  8. Pull in the instance https://github.com/cnrancher/autok3s/releases/download/v0.7.0-rc2/autok3s_linux_amd64 File, assign execution permission and move to/usr/local/bin directory
  9. Start the autok3s v0.7.0-rc2 file
  10. After accessing the autok3s ui again, the harvester cluster and the harvester template will not be displayed, the quick start and cluster creation have no harvester provision, the original aliyun cluster and aliyun template are running normally, and the newly created aliyun cluster is running normally