Migrating Your Existing Installation with Brands to the New K8s UI Cluster
This is an optional step of the Deploying UI Cluster in the Cloud Using Kubernetes procedure.
To migrate your existing installation with brands to the new K8s UI Cluster:
- Register a K8s-based UI Cluster in Odin Automation.
-
Move brands from your existing UI Cluster to the K8s-based UI Cluster by using the following python code:
# cat move-brands.py from poaupdater import openapi, uSysDB from optparse import OptionParser parser = OptionParser() parser.add_option("--from-host", dest="source", help="source host to move brands from") parser.add_option("--to-host", dest="dest", help="destrination host to move brands to") (options, args) = parser.parse_args() api = openapi.OpenAPI() con = uSysDB.connect() cur = con.cursor() cur.execute("SELECT brand_id, brand_name FROM brand_proxy_params JOIN brands USING (brand_id) JOIN proxies USING (proxy_id) WHERE host_id=%s", options.source) for id,name in cur.fetchall(): print "moving brand %s id %s to host %s" % (name,options.dest, id) api.pem.moveBrandToHost(brand_id=id, host_id=int(options.dest))
Related topics: