Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support template command #1156

Merged
merged 1 commit into from
Feb 25, 2021
Merged

Support template command #1156

merged 1 commit into from
Feb 25, 2021

Conversation

lucklove
Copy link
Member

To provide standard templates and detailed instructions in the template files

Close #1024

What problem does this PR solve?

When a new user wants to use TiUP to deploy a cluster, he may don't know how to write the topology file, so he must open the browser and find the example topology. This is no a good experience.

What is changed and how it works?

I add a template command for both tiup-cluster and tiup-dm, the command will print the topology templates:

tiup cluster template > topology.yaml
vim topology.yaml                                       # use the correct hosts
tiup cluster deploy test v4.0.0 topology.yaml

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release notes:

NONE

To provide standard templates and detailed instructions in the template files

Close pingcap#1024
@ti-chi-bot ti-chi-bot requested a review from lonng February 24, 2021 11:42
@lucklove lucklove added the status/need-doc Indicates that we should update document before merge a PR. label Feb 24, 2021
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 24, 2021
@codecov-io
Copy link

codecov-io commented Feb 24, 2021

Codecov Report

Merging #1156 (82cc921) into master (d5ae317) will decrease coverage by 11.03%.
The diff coverage is 36.36%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1156       +/-   ##
===========================================
- Coverage   53.53%   42.49%   -11.04%     
===========================================
  Files         284      223       -61     
  Lines       20302    16057     -4245     
===========================================
- Hits        10868     6823     -4045     
- Misses       7756     8062      +306     
+ Partials     1678     1172      -506     
Flag Coverage Δ
cluster 42.49% <36.36%> (-2.53%) ⬇️
dm ?
integrate 42.49% <36.36%> (-5.41%) ⬇️
playground ?
tiup ?
unittest ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/cluster/command/template.go 33.33% <33.33%> (ø)
components/cluster/command/root.go 46.82% <100.00%> (+0.30%) ⬆️
pkg/repository/store/store.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/repository/utils/hash.go 0.00% <0.00%> (-81.82%) ⬇️
pkg/meta/err.go 0.00% <0.00%> (-81.25%) ⬇️
pkg/telemetry/meta.go 0.00% <0.00%> (-80.00%) ⬇️
pkg/telemetry/scrub.go 6.66% <0.00%> (-80.00%) ⬇️
pkg/cluster/api/error.go 0.00% <0.00%> (-80.00%) ⬇️
pkg/repository/store/local.go 0.00% <0.00%> (-76.48%) ⬇️
pkg/repository/model/publish.go 0.00% <0.00%> (-71.43%) ⬇️
... and 142 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d5ae317...82cc921. Read the comment docs.

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • AstroProfundis

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 25, 2021
@AstroProfundis
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 82cc921

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 25, 2021
@ti-chi-bot ti-chi-bot merged commit f8a7bfa into pingcap:master Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. status/need-doc Indicates that we should update document before merge a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

provide standard templates and detailed instructions in the template files
4 participants