
Components | |
---|---|
DigitalOcean Container Registry | |
DigitalOcean Kubernetes Cluster | |
DigitalOcean VPC | |
Kubernetes ESO | |
DNS Management |
DigitalOcean DNS
|
Infrastructure CI/CD pipeline |
GitHub Actions
|
Ingress Controller |
Nginx
|
Autoscaling | KEDA |
CI/CD Runner |
Bitbucket Pipelines Runner
|
Caching | Redis |
Monitoring | Prometheus/Grafana/Loki |
Object Storage | Spaces Buckets |
Queue Manager | Kafka |
SQL Database | MySQL/PostgreSQL |
Helm Chart | |
Setup by Corewide team | |
Post-implementation training | |
2-week warranty support | |
Documentation |
Once you have a Corewide Solutions Portal account, this one-time action will use your browser session to retrieve credentials:
shellterraform login solutions.corewide.com
Download Infrasnap archive from My Library page, unpack it to a new directory and initialize a new project there:
shellcd infrasnap/
git init
git add .
Follow the instructions in README.md
:
terraform.tfvars
, or using environment variables)
infrasnap.yml
parameters based on the reference belowbackend.tf
Initialize the setup, create the environment you configured in infrasnap.yml
and
provision
the infrastructure:
shellterraform init
terraform workspace new <environment_name>
terraform workspace select <environment_name>
terraform apply
Variable | Description | Type | Default | Required | Sensitive |
---|---|---|---|---|---|
project_name |
Project name to use for resource naming | string |
yes | no | |
config |
Infrasnap configuration data | any |
{} |
no | no |
config_file |
Path to a YAML file with Infrasnap configuration data | string |
./infrasnap.yml |
no | no |
do_api_token |
API token to make programmatic calls to DigitalOcean (can be set as DIGITALOCEAN_TOKEN ) |
string |
no | yes | |
do_secret_spaces_key |
Access key to make programmatic calls to DigitalOcean space bucket. This can also be sourced from the SPACES_SECRET_ACCESS_KEY Environment Variable |
string |
no | yes | |
do_spaces_key_id |
ID of access key to make programmatic calls to DigitalOcean space bucket. This can also be sourced from the SPACES_ACCESS_KEY_ID Environment Variable |
string |
no | yes |
Variable | Description | Type | Default |
---|---|---|---|
region |
DigitalOcean region to place the resources into | string |
nyc1 |
vpc_cidr |
CIDR block for VPC of this environment | string |
10.20.0.0/16 |
container_registry_workspace |
Environment where container registry must be created. Leave blank to not create at all if a third-party registry is used instead | string |
development |
k8s_version |
Kubernetes engine version to deploy the cluster with | string |
1.30 |
k8s_node_pools |
List of Kubernetes node pool definitions | list |
[{'name': 'main', 'labels': {}, 'max_size': 3, 'node_size': 's-2vcpu-4gb'}] |
k8s_node_pools[*].name |
Name of the node pool to create | string |
main |
k8s_node_pools[*].node_size |
Machine type to use for all nodes in this node pool | string |
s-2vcpu-4gb |
k8s_node_pools[*].max_size |
Maximum number of nodes in the node pool (for autoscaling) | number |
3 |
k8s_node_pools[*].labels |
Labels to add to the nodes of this node pool | map |
{} |
k8s_multimaster |
Whether the Kubernetes cluster must be highly available | bool |
true |
dns_zone_create |
Whether to create DNS zone or use the existing one | bool |
false |
dns_zone |
DNS zone in which to create records, disable to reuse the same zone from another workspace | string |
example.com |
dns_records_k8s |
A list of subdomains that must point at Ingress LoadBalancer | list |
|
dns_records |
List of extra records that do not point at Ingress LoadBalancer. See module_docs for complete reference. Note: when adding CNAME record in the same dns_zone , supply full dns record value e.g. value.dns_zone . |
map |
|
dns_records.test |
Name of the DNS record | map |
|
dns_records.test.type |
Record type (A , AAAA , CNAME , MX , NS , or TXT ) |
string |
CNAME |
dns_records.test.value |
List of values for the record | list |
['test.example.com'] |
dns_records.test.ttl |
Time to Live (TTL) of the record in seconds | number |
31 |
dns_records.test.priority |
The priority of the record (only for MX type) |
number |
3600 |
cert_manager_email |
E-mail that Let's Encrypt cluster issuer will use to request certificates | string |
[email protected] |
keda |
Parameters for KEDA deployment | map |
|
keda.prometheus |
KEDA Prometheus integration configuration parameters | map |
|
keda.prometheus.create_service_monitor |
Indicates if a ServiceMonitor should be created for Prometheus monitoring | bool |
true |
cache_redis_version |
Engine version for Redis cache | number |
7 |
cache_redis_machine_size |
Node size for the managed cache. Supported values | string |
db-s-1vcpu-1gb |
cache_redis_node_count |
Number of nodes to be created in Redis Cache cluster | number |
1 |
buckets |
Buckets definitions to create | map |
|
buckets.my-bucket |
Bucket name | map |
|
buckets.my-bucket.access_mode |
Spaces bucket access mode. Allowed values: private, public-read | string |
private |
buckets.my-bucket.versioning |
Enable versioning for the bucket | bool |
false |
kafka_version |
Kafka engine version | string |
3.8 |
kafka_node_count |
Number of Kafka cluster nodes | number |
3 |
kafka_machine_size |
Database Droplet size associated with Kafka cluster | string |
db-s-2vcpu-2gb |
kafka_machine_storage_size |
Kafka node storage size (GB) | number |
40 |
sql_database_engine |
Database engine. Supported values are: mysql for MySQL and pg or postgres for PostreSQL |
string |
postgres |
sql_database_machine_size |
Node size for the managed database. Supported values | string |
db-s-1vcpu-1gb |
sql_database_disk_size |
Size of SQL Database instance disk | number |
10 |
sql_databases_list |
List of databases to create | list |
Output | Description | Type | Sensitive |
---|---|---|---|
app_namespace |
Kubernetes namespace to deploy the application to | attribute |
no |
cluster_connection_cli |
CLI command to connect to the cluster | computed |
no |
name_servers |
Name servers of DNS zone managed in this workspace | list(computed) |
no |
keda_namespace |
The namespace where KEDA is installed | attribute |
no |
keda_service_account_name |
The name of the ServiceAccount used by KEDA | attribute |
no |
redis_k8s_secret_name |
K8s secret name containing redis connection parameters | attribute |
no |
bucket_names |
List of bucket names | list(attribute) |
no |
kafka_k8s_secret_name |
K8s secret name containing Kafka connection parameters | attribute |
no |
database_k8s_secret_names |
List of K8s secret names containing database connection parameters | list(attribute) |
no |