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

[tools] CLI tool to simplify some tasks, and eliminate the curl commands from the docs #2097

Merged
merged 70 commits into from
Apr 15, 2020

Conversation

xmcqueen
Copy link
Contributor

@xmcqueen xmcqueen commented Jan 8, 2020

What this PR does / why we need it:

I'm not aware of a ticket asking for this, but I've seen in the chat's an interest in tooling that will allow the docs to look cleaner by getting rid of the curl commands.

I'm working with m3db a bit and found I wanted some of this functionality as a tool, so I made it. I thought it would be a good fit here.

# show help
m3ctl -h
# create a database
m3ctl db create -f ./database/examples/devel.yaml
# list namespaces
m3ctl ns
# delete a namespace
m3ctl ns delete -name default
# list placements
m3ctl pl
# point to some remote and list namespaces
m3ctl -endpoint http://localhost:7201 ns
# check the namespaces in a kubernetes cluster
# first setup a tunnel via kubectl port-forward ... 7201 
m3ctl -endpoint http://localhost:7201 ns
# list the ids of the placements
m3ctl -endpoint http://localhost:7201 pl | jq .placement.instances[].id

Special notes for your reviewer:

Does this PR introduce a user-facing and/or backwards incompatible change?:

NONE

Does this PR require updating code package or user-facing documentation?:

If the tool is accepted it would be good to integrate it into the operational-guides pages, replacing the curl commands.

@pavelnikolov
Copy link
Contributor

Awesome idea 👏

@codecov
Copy link

codecov bot commented Mar 25, 2020

Codecov Report

Merging #2097 into master will decrease coverage by 0.3%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #2097     +/-   ##
========================================
- Coverage    72.4%     72%   -0.4%     
========================================
  Files        1007    1003      -4     
  Lines       86460   86415     -45     
========================================
- Hits        62614   62261    -353     
- Misses      19676   19955    +279     
- Partials     4170    4199     +29
Flag Coverage Δ
#aggregator 82% <ø> (ø) ⬆️
#cluster 85.4% <ø> (-0.2%) ⬇️
#collector 82.8% <ø> (+18%) ⬆️
#dbnode 79.7% <ø> (-0.1%) ⬇️
#m3em 74.4% <ø> (+1.1%) ⬆️
#m3ninx 74.1% <ø> (+0.1%) ⬆️
#m3nsch 51.1% <ø> (ø) ⬆️
#metrics 17.6% <ø> (-0.1%) ⬇️
#msg 74.7% <ø> (-0.2%) ⬇️
#query 68.5% <ø> (ø) ⬆️
#x 75.4% <ø> (-7.8%) ⬇️

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 b2f5b55...0a613b2. Read the comment docs.

Copy link
Collaborator

@robskillington robskillington left a comment

Choose a reason for hiding this comment

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

LGTM

@robskillington robskillington merged commit 359c4ab into m3db:master Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants