+ async def install(
+ self,
+ cluster_uuid: str,
+ kdu_model: str,
+ kdu_instance: str,
+ atomic: bool = True,
+ timeout: float = 300,
+ params: dict = None,
+ db_dict: dict = None,
+ kdu_name: str = None,
+ namespace: str = None,
+ ):
+ _, cluster_id = self._get_namespace_cluster_id(cluster_uuid)
+ self.log.debug("installing {} in cluster {}".format(kdu_model, cluster_id))
+
+ # sync local dir
+ self.fs.sync(from_path=cluster_id)
+
+ # init env, paths
+ paths, env = self._init_paths_env(
+ cluster_name=cluster_id, create_if_not_exist=True
+ )
+
+ await self._install_impl(
+ cluster_id,
+ kdu_model,
+ paths,
+ env,
+ kdu_instance,
+ atomic=atomic,
+ timeout=timeout,
+ params=params,
+ db_dict=db_dict,
+ kdu_name=kdu_name,
+ namespace=namespace,
+ )
+
+ # sync fs
+ self.fs.reverse_sync(from_path=cluster_id)
+
+ self.log.debug("Returning kdu_instance {}".format(kdu_instance))
+ return True
+