zettadb / cloudnative

Apache License 2.0
0 stars 1 forks source link

Add support to use image url and specified file names for docker one-key script #95

Closed jd-zhang closed 2 years ago

jd-zhang commented 2 years ago

Issue migrated from trac ticket # 372 www.kunlunbase.com

component: cluster provision | priority: major | resolution: fixed

2021-12-30 17:14:11: zhangjindong@zettadb.com created the issue


Currently, the one-key script only accepts tar file generated by 'docker save' command, and the file name is hard-coded as following:

  • kunlun_mysql.tar.gz
  • kunlun_postgres.tar.gz
  • kunlun_clustermgr.tar.gz

Also, the image name is also hard-coded as following:

  • kunlun_mysql
  • kunlun_postgres
  • kunlun_clustermgr

We need to change this way, to allow using image url and also allow using specified file names. So that, the script can really be useful by users.

These should be supported in the config file, and generate_docker_script.py.

jd-zhang commented 2 years ago

2022-01-19 19:06:41: zhangjindong@zettadb.com commented


We add the following items in current config file in cluster:

  "images": {
      "kunlun-storage": "192.168.0.104:15000/kunlun-storage",
      "kunlun-server": "192.168.0.104:15000/kunlun-server",
      "kunlun-cluster-manager": "192.168.0.104:15000/kunlun-cluster-manager"
  },

Also, we add one option of --imageInFiles to support old way.

So, if the option is not provided, cluster.images must be specified. Otherwise, if the option is specified, we use the old way, no need to set cluster.images.

jd-zhang commented 2 years ago

2022-01-20 16:37:20: zhangjindong@zettadb.com commented


The remain issue is that, docker 19(server version) does not support the option of --pull always, we need to upgrade the docker version if necessary.

Otherwise, we need to do remove/pull first.

jd-zhang commented 2 years ago

2022-01-20 16:39:01: zhangjindong@zettadb.com set resolution to fixed

jd-zhang commented 2 years ago

2022-01-20 16:39:01: zhangjindong@zettadb.com changed status from assigned to closed