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
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 10npx @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 10Example 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 exorExample 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 1Echo the access token of the keycloak admin
npx @corvina/corvina-seed@latest master-tokenEcho the access token of the admin user
npx @corvina/corvina-seed@latest admin-tokenIf you want to call Corvina's API using device certificate, this command will help you!
npx @corvina/corvina-seed@latest device-authzUnder 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
If you want to develop on this repo, you need to install the following softwares:
You can run the CLI in development mode by running the following command:
go run main.goTo deploy the CLI, you need to run the following command:
npm run prepublish
npm run deploy