Skip to content

Commit adabedb

Browse files
authored
Merge pull request #1 from RSS3-Network/adopt-alloydb
2 parents d75b7ee + 7cb9d78 commit adabedb

26 files changed

+577
-715
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Session.vim
2929

3030
# Local .terraform directories
3131
**/.terraform/*
32+
test.tf
3233

3334
# .tfstate files
3435
*.tfstate
@@ -59,4 +60,6 @@ credentials.json
5960

6061
# ignore generated ASM yamls in /workspace/test/fixtures/simple_zonal_with_asm
6162
# as it is a test in a production scenario these files are expected to be checked in
62-
/test/fixtures/simple_zonal_with_asm/asm-dir
63+
/test/fixtures/simple_zonal_with_asm/asm-dir
64+
65+
*.tfvars

README.md

+18-39
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Terraform Node Module
22

3-
This module helpers you create RSS3 DSL Node with cockroachdb, redis, and other services easily.
3+
This module helpers you create RSS3 DSL Node with AlloyDB, redis, and other services easily.
44
The resources/services/activations/deletions that this module will create/trigger are:
55

6-
- Create cockroachdb helm chart release
76
- Create node helm chart release
87

98
## Compatibility
@@ -16,19 +15,6 @@ This module is meant for use with Terraform 0.14.
1615
module "node" {
1716
source = "RSS3-Network/node/kubernetes"
1817
19-
crdb_disk_size = "500Gi"
20-
crdb_storage_class = "premium-rwo"
21-
crdb_resources = {
22-
requests = {
23-
cpu = "8"
24-
memory = "32Gi"
25-
}
26-
limits = {
27-
cpu = "8"
28-
memory = "32Gi"
29-
}
30-
}
31-
3218
node_workers = [
3319
{
3420
id = "crossbell",
@@ -37,6 +23,8 @@ module "node" {
3723
endpoint = "https://rpc.crossbell.io"
3824
}
3925
]
26+
27+
database_uri = "postgres://node:node@alloydb:5432/node"
4028
}
4129
```
4230

@@ -51,30 +39,21 @@ More examples can be found in the [examples](./examples) directory.
5139

5240
## Inputs
5341

54-
| Name | Description | Type | Default | Required |
55-
| ------------------------- | ------------------------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------- | :------: |
56-
| namespace | The namespace to deploy the application and cockroachdb | string | default | no |
57-
| crdb_storage_class | kubernetes storage class for cockroachdb | string | "" | no |
58-
| crdb_disk_size | The size of the disk for the cockroachdb | string | 100Gi | no |
59-
| crdb_replicas | The number of cockroachdb replicas | number | 3 | no |
60-
| crdb_resources | The resources for the cockroachdb | map(object({ cpu = string memory = string })) | { requests = { cpu = "2" memory = "8Gi" } limits = { cpu = "2" memory = "8Gi" } } | no |
61-
| crdb_extra_settings | The extra helm set flags | list(object({ name = string value = string })) | [] | no |
62-
| crdb_values | The extra values for the cockroachdb | list(string) | [] | no |
63-
| crdb_user | The user for the cockroachdb | string | roach | no |
64-
| crdb_password | Leave empty to create a random password | string | "" | no |
65-
| crdb_database | The database for the cockroachdb | string | node | no |
66-
| redis_enable | | bool | false | no |
67-
| redis_endpoint | | string |
68-
| redis_username | | string | "" | no |
69-
| redis_password | | string | "" | no |
70-
| node_replicas | node http server replicas | number | 3 | no |
71-
| node_rpc_endpoints | rpc endpoints with http headers and http2 options | map(**endpoint**) | {} | no |
72-
| node_workers | The workers for the node | list(**worker**) })) | | yes |
73-
| node_values | The extra values for the node | list(string) | [] | no |
74-
| node_register | Register the node with the network | bool | true | no |
75-
| node_register_evm_address | The evm address to register the node with | string | "" | no |
76-
| node_register_gi_address | The gi address to register the node with | string | "https://gi.rss3.io/" | no |
77-
| node_http_endpoint | The http endpoint for the node | string | "" | no |
42+
| Name | Description | Type | Default | Required |
43+
| ------------------------- | ------------------------------------------------- | ----------------- | ----------------------- | :------: |
44+
| namespace | The namespace to deploy the application | string | default | no |
45+
| redis_enable | | bool | false | no |
46+
| redis_endpoint | | string | | |
47+
| redis_username | | string | "" | no |
48+
| redis_password | | string | "" | no |
49+
| node_replicas | node http server replicas | number | 3 | no |
50+
| node_rpc_endpoints | rpc endpoints with http headers and http2 options | map(**endpoint**) | {} | no |
51+
| node_workers | The workers for the node | list(**worker**) | | yes |
52+
| node_values | The extra values for the node | list(string) | [] | no |
53+
| node_register | Register the node with the network | bool | true | no |
54+
| node_register_evm_address | The evm address to register the node with | string | "" | no |
55+
| node_register_gi_address | The gi address to register the node with | string | "<https://gi.rss3.io/>" | no |
56+
| node_http_endpoint | The http endpoint for the node | string | "" | no |
7857

7958
### complicated object structure
8059

cockroach.tf

-66
This file was deleted.

examples/node-register.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is a node config register to VSL Chain.
44

55
variable "node_register_config" {
66
type = object({
7-
maintainer = object({
7+
operator = object({
88
evm_address = string
99
signature = string
1010
})
@@ -21,14 +21,15 @@ module "node" {
2121
source = "RSS3-Network/node/kubernetes"
2222
2323
node_register_config = {
24-
maintainer = {
24+
operator = {
2525
evm_address = "0x1234567890abcdef1234567890abcdef12345678"
2626
signature = "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
2727
}
2828
server = {
2929
endpoint = "https://your-node.custom-domain.com"
3030
# optional, default to "https://gi.rss3.io/", testnet use "https://gi.rss3.dev/"
3131
global_indexer_endpoint = "https://gi.rss3.io/"
32+
access_token = "<generate_random_access_token>"
3233
}
3334
}
3435
}

0 commit comments

Comments
 (0)