risingwavelabs / terraform-provider-risingwavecloud

Apache License 2.0
0 stars 0 forks source link

feat: support BYOC clusters #58

Open wjf3121 opened 1 month ago

wjf3121 commented 1 month ago

It's almost the same as cloud hosted clusters except that we need to specify the environment name (internally it's referred as cluster name): https://github.com/risingwavelabs/risingwave-cloud-openapi/blob/bf92af3073e53fff28f49dbccc59f9d76506f4cf/v1/mgmt.yaml#L908-L909

wjf3121 commented 4 weeks ago

For testing you can use the DEV GCP project (permissions have been granted already):

  1. Provisioning the BYOC environemnt:
    $ gcloud auth application-default login
    $ rwc byoc create --cidr 192.168.192.0/16 --cloud-account-id rwc-byoc-dev --name test
    $ rwc byoc apply --name test
  2. After that you can create BYOC clusters on the environment. Below is the CLI command (the env arg specifies which BYOC environment the cluster will be deployed on, the provider needs to make the similar change):
    $ rwc cluster create --name demo --compute p-2c8g --compute-replica 1 --compactor p-1c4g --compactor-replica 1 --frontend p-1c4g --frontend-replica 1 --meta  p-1c4g --meta-replica 1 --etcd  p-1c4g --etcd-replica 1 --tier BYOC  --etcd-size 8 --env test
  3. Be sure to destroy the testing environment afterwards (need to delete all existing clusters first):
    $ rwc byoc terminate --name test
    $ rwc byoc delete --name test