Manage Microservices
To create a microservice you can use this command :
grizzly create microservice [-- <args>]
Arguments :
– name : to specify the name of your microservice (required)
– type : to specify the type of your microservice (microservice / markup microservice) (optional)
– datasource : to specify the datasource linked to your microservice (optional)
– database : to specify the database of the datasource linked to your microservice (optional)
Example :
grizzly create microservice --name Products --type 'microservice'
This command will create a microservice called Products of type microservice and create automatically and for free a linked database in MongoDB with the same name of the microservice (Products in this case).
The option –type ‘microservice’ can be omitted because “microservice” is the default type.
To create the same microservice as above (Products Example) , we can use this command :
grizzly create microservice --name Products --type 'markup microservice' --datasource ProductsDB --database ProductsDB
To update a microservice , we can use this command :
grizzly update microservice --name myOldName --newname myNewName --type "microservice" --description "this is a description" --datasource myDatasrouce --database myDatabase
Arguments :
– name : to specify the name of your microservice (required)
– newname : to specify the new name of the microservice you want to update (optional)
– description : to specify the descritpion of your microservice (optional)
– type : to specify the type of your microservice (microservice / markup microservice) (optional)
– datasource : to specify the datasource linked to your microservice (optional)
– database : to specify the database of the datasource linked to your microservice (optional)
To delete a microservice , we can use this command :
grizzly delete microservice --name Products