Skip to content

Corvina-R-D/corvina-seed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Corvina seed

Command line tools to create entities in corvina in bulk

Note: We test the app template generated by this command on the following platforms:

  • Ubuntu 20+
  • macOS 11+
  • Windows 11 with WSL2

USAGE

Example that creates 10 devices and 10 device groups in corvina minikube:

npx @corvina/corvina-seed@latest run \
  --origin https://app.corvina.mk \
  --keycloak-origin https://auth.corvina.mk \
  --keycloak-master-client-id corvina-core-keycloak-admin-client \
  --keycloak-master-client-secret password \
  --admin-user admin@exor \
  --device-count 10 \
  --device-group-count 10
npx @corvina/corvina-seed@latest run \
  --origin https://app.corvina.mk \
  -ko https://auth.corvina.mk \
  -kc corvina-core-keycloak-admin-client \
  -ks password \
  -lmc corvina-core-license-manager-admin-client \
  -lms password \
  -d 10 \
  -dg 10

Example that creates 10 devices and 10 device groups in corvina minikube if there are more than one organization under the admin user. In this case, you can pass the organization resource ID to the script using --org-resource-id (alias -orgid):

npx @corvina/corvina-seed@latest run \
  --origin https://app.corvina.mk \
  -ko https://auth.corvina.mk \
  -kc corvina-core-keycloak-admin-client \
  -ks password \
  -lmc corvina-core-license-manager-admin-client \
  -lms password \
  -d 10 \
  -dg 10 \
  -orgid exor

Example that creates 10 sub organization tree in the users organization

npx @corvina/corvina-seed@latest run \
  --origin https://app.corvina.mk \
  -ko https://auth.corvina.mk \
  -kc corvina-core-keycloak-admin-client \
  -ks password \
  -lmc corvina-core-license-manager-admin-client \
  -lms password \
  -org 10 \
  -otd 1

master-token

Echo the access token of the keycloak admin

npx @corvina/corvina-seed@latest master-token

admin-token

Echo the access token of the admin user

npx @corvina/corvina-seed@latest admin-token

device-authz

If you want to call Corvina's API using device certificate, this command will help you!

npx @corvina/corvina-seed@latest device-authz

Under the hood, this command will:

  • create a device
  • create a service account associated with the device
  • create a folder with the device certificate and key

DEVELOP ON THIS REPO

If you want to develop on this repo, you need to install the following softwares:

  • Node.js (version 18+)
  • Go (version 1.20+)
  • [corvina-k8s] corvina minikube up and running

You can run the CLI in development mode by running the following command:

go run main.go

DEPLOY

To deploy the CLI, you need to run the following command:

npm run prepublish
npm run deploy

About

Command line tools to create entities in corvina in bulk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors