Otterize CLI
About | Installation & usage with the network mapper | Docs | Contributing | Slack
About
The Otterize CLI is a command-line utility used to control and interact with the Otterize network mapper, manipulate local intents files, and (coming soon!) interact with Otterize Cloud.
See the CLI command reference for how to use it.
Example output from running the network mapper on the Google Cloud microservices demo:
$ otterize mapper list
cartservice in namespace ecommerce calls:
- redis-cart
checkoutservice in namespace ecommerce calls:
- kafka-secure
frontend in namespace ecommerce calls:
- adservice
- cartservice
- checkoutservice
- currencyservice
- productcatalogservice
- recommendationservice
- shippingservice
kafka-secure in namespace ecommerce calls:
- kafka-secure
- lab-zookeeper
paymentservice in namespace ecommerce calls:
- kafka-secure
recommendationservice in namespace ecommerce calls:
- productcatalogservice
Installation instructions & usage with the network mapper
Install the network mapper using Helm
helm repo add otterize https://helm.otterize.com
helm repo update
helm install network-mapper otterize/network-mapper -n otterize-system --create-namespace --wait
Install Otterize CLI to query data from the network mapper
Mac
brew install otterize/otterize/otterize-cli
Linux 64-bit
wget https://get.otterize.com/otterize-cli/v0.1.5/otterize_Linux_x86_64.tar.gz
tar xf otterize_Linux_x86_64.tar.gz
sudo cp otterize /usr/local/bin
Windows
scoop bucket add otterize-cli https://github.com/otterize/scoop-otterize-cli
scoop update
scoop install otterize-cli
For more platforms, see the installation guide.
Contributing
- Feel free to fork and open a pull request! Include tests and document your code in Godoc style
- In your pull request, please refer to an existing issue or open a new one.
- See our Contributor License Agreement.
Export intents by default without type
Description
This PR remove the default value of HTTP from intent type since it's no longer mandatory to have type for every intent, and by default intents should come without type
bump api - Replace /objects/one endpoint with /object
Migrate admin CLI commands to REST API
oapi-codegen
)cloudclient/graphql
(to make room forcloudclient/restapi
)--exists-ok
flag support. It should be implemented server-side, an issue was opened for it.Flatten organizations, integrations & environments update body
https://www.notion.so/otterize/Flatten-REST-update-operations-body-to-match-standards-e-g-eliminate-EnvironmentUpdate-object-and--756f0473f7ee466791b5fbf52e830a15
remove deprecated routes dependencies (part of splitting internal & deprecated graphql repo)
deprecated
folder in genqlient configurations.GetOrCreateUserDevEnv
as it's currently considered deprecated (until further notice).Migrate administrative commands (users, orgs, invites, envs, integrations) to the new otterize-cli repo
Migrate users, organizations, invites, environments & integrations commands to the new otterize-cli repo.
This currently adheres to the standard of
otterize <objects> <action>
(e.g.otterize users list
, rather thanotterize list users
), which was already applied in this new CLI repo. If and when we choose to reverse the object<>action order we will need to revisit it.Added "otterize mapper upload"
The
otterize mapper upload
downloads the intents discovered by the network-mapper and reports them to the cloud. This task is part of the Acces Graph epic. https://www.notion.so/otterize/Access-Graph-Connect-OSS-CLI-to-the-cloud-and-add-otterize-mapper-upload-412f7e2a03c9402d896b36e7618bf45dAdded "otterize login" command
Description
This PR adds the
otterize login
command to the CLI. This command is used for logging into your otterize account and getting a token that will be used in calls to the otterize API. This is a preparation in order to be able to implement theotterize mapper upload
command.References
https://www.notion.so/otterize/Access-Graph-Connect-OSS-CLI-to-the-cloud-and-add-otterize-mapper-upload-412f7e2a03c9402d896b36e7618bf45d
Testing
Tested manually by running the "otterize login" command
Checklist
test-netanel
Please see the contributing guidelines for how to create and submit a high-quality PR for this repo. This template is based on Auth0's excellent template.
Description
Describe the purpose of this PR along with any background information and the impacts of the proposed change. For the benefit of the community, please do not assume prior context.
Provide details that support your chosen implementation, including: breaking changes, alternatives considered, changes to the API, etc.
References
Include any links supporting this change such as a:
If there are no references, simply delete this section.
Testing
Describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.
Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.
Also include details of the environment this PR was developed in (language/platform/browser version).
Checklist
Update README.md
Please see the contributing guidelines for how to create and submit a high-quality PR for this repo. This template is based on Auth0's excellent template.
Description
Describe the purpose of this PR along with any background information and the impacts of the proposed change. For the benefit of the community, please do not assume prior context.
Provide details that support your chosen implementation, including: breaking changes, alternatives considered, changes to the API, etc.
References
Include any links supporting this change such as a:
If there are no references, simply delete this section.
Testing
Describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.
Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.
Also include details of the environment this PR was developed in (language/platform/browser version).
Checklist
Output-type dir should require output flag be present and specify a dir, or return an error
Currently, if
--output-type dir
is specified but--output
(or-o
) is missing, the--output-type
flag is silently ignored, so the command acts as though--output-type single-file
were specified.Instead, if
--output-type dir
is specified, then--output
(or-o
) should be required with a value that resolves to a directory, or else an error should be returned explaining that--output-type dir
requires specifying an output directory with the-o
or--output
flag.Support multiple orgs per user - invites, log-in and operations
This PR adds functionality in the CLI to support multiple orgs per user in Otterize Cloud. Previously, there was just one org. The CLI now asks the user which org they would like to use if there are multiple orgs, and can select which org to query after log-in.