Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

[Cluster Object Model] Modify [ paictl cluster ] command, based on com. #1712

Merged
merged 13 commits into from
Nov 16, 2018

Conversation

ydye
Copy link
Contributor

@ydye ydye commented Nov 16, 2018

Remove old mock cluster-object-model code from paictl cluster command. And integrate it with the new cluster-object-model

  • ./paictl.py cluster k8s-clean -p /cluster/configuration [-f]
  • ./paictl.py cluster k8s-bootup -p /cluster/configuration
  • ./paictl.py cluster k8s-set-env [-p /cluster/configuration]

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 51.774% when pulling 2114aa7 on yuye/k8s-template-change into f4a1bf5 on cluster-object-model-dev.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 51.774% when pulling 2114aa7 on yuye/k8s-template-change into f4a1bf5 on cluster-object-model-dev.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 51.774% when pulling 2114aa7 on yuye/k8s-template-change into f4a1bf5 on cluster-object-model-dev.

@coveralls
Copy link

coveralls commented Nov 16, 2018

Coverage Status

Coverage decreased (-0.4%) to 51.346% when pulling 8535ad7 on yuye/k8s-template-change into 64aaf41 on cluster-object-model-dev.

@fanyangCS fanyangCS requested a review from sterowang November 16, 2018 05:50
@fanyangCS
Copy link
Contributor

Please explain this PR in more details. Can you break this PR into smaller ones, each for one specific reason?
If you have to modify many files in one PR, I need a clearer explanation.

@ydye
Copy link
Contributor Author

ydye commented Nov 16, 2018

Please explain this PR in more details. Can you break this PR into smaller ones, each for one specific reason?
If you have to modify many files in one PR, I need a clearer explanation.

Breaking this pr into small pieces will block ci/cd. Obviously, the main change is about translate the old cluster-object-model into the new cluster-object-model. You can see, there are a lot of template file is changed, due to this feature. But the logic is very simple.

self.logger.info("Create kube-proxy daemon for kuberentes cluster.")

file_path = "deployment/k8sPaiLibrary/template/kube-proxy.yaml.template"
template_data = common.read_template(file_path)
dict_map = {
"clusterconfig": self.cluster_config['clusterinfo']
"com": com
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use more obvious name instead of abbreviation, maybe cluster_conf? Since all other service templates need this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

template or python src

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

template. The templates will need to write port: com["xxx"]["port"] right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. And Will port: cluster_conf["xxx"]['port'] be better?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think much better than com, since outside reader will have no clue of what it means.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename it as cluster_cfg

@ydye ydye merged commit c6d9672 into cluster-object-model-dev Nov 16, 2018
@ydye ydye deleted the yuye/k8s-template-change branch November 19, 2018 02:08
ydye added a commit that referenced this pull request Dec 5, 2018
* [Cluster Object Model] main module development (#1683)

* [Cluster Object Model] Modify [ paictl cluster ] command, based on com. (#1712)

* Class name modify. Pep8 (#1720)

* [cluster object model] Change paictl machine‘s code, based on com. (#1723)

* Add a tutorial to guide how to add new service configuraiton into com (#1701)

* [Cluster Object Model] Modify [paictl service] command, based on new cluster-object-model (#1735)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants