-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from prajwalakhuj/azure
Added Azure AKS & GKE support.
- Loading branch information
Showing
29 changed files
with
510 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
## AWS ECK Example | ||
![squareops_avatar] | ||
|
||
[squareops_avatar]: https://squareops.com/wp-content/uploads/2022/12/squareops-logo.png | ||
|
||
### [SquareOps Technologies](https://squareops.com/) Your DevOps Partner for Accelerating cloud journey. | ||
<br> | ||
This example will be very useful for users who are new to a module and want to quickly learn how to use it. By reviewing the examples, users can gain a better understanding of how the module works, what features it supports, and how to customize it to their specific needs. | ||
|
||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
## Requirements | ||
|
||
No requirements. | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a | | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_aws"></a> [aws](#module\_aws) | https://github.com/sq-ia/terraform-kubernetes-elastic.git//modules/resources/aws | n/a | | ||
| <a name="module_eck"></a> [eck](#module\_eck) | https://github.com/sq-ia/terraform-kubernetes-elastic.git | n/a | | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [aws_eks_cluster.cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_cluster) | data source | | ||
| [aws_eks_cluster_auth.cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_cluster_auth) | data source | | ||
|
||
## Inputs | ||
|
||
No inputs. | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_eck_credentials"></a> [eck\_credentials](#output\_eck\_credentials) | ECK\_Info | | ||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
locals { | ||
name = "elastic" | ||
region = "us-east-2" | ||
environment = "prod" | ||
additional_tags = { | ||
Owner = "organization_name" | ||
Expires = "Never" | ||
Department = "Engineering" | ||
} | ||
} | ||
|
||
module "aws" { | ||
source = "https://github.com/sq-ia/terraform-kubernetes-elastic.git//modules/resources/aws" | ||
cluster_name = "" | ||
} | ||
|
||
module "eck" { | ||
source = "https://github.com/sq-ia/terraform-kubernetes-elastic.git" | ||
namespace = "elastic-system" | ||
eck_config = { | ||
provider_type = "aws" | ||
hostname = "eck.squareops.in" | ||
eck_values = file("./helm/eck.yaml") | ||
master_node_sc = "gp2" | ||
data_hot_node_sc = "gp2" | ||
data_warm_node_sc = "gp2" | ||
master_node_size = "20Gi" | ||
data_hot_node_size = "50Gi" | ||
data_warm_node_size = "50Gi" | ||
kibana_node_count = 1 | ||
master_node_count = 1 | ||
data_hot_node_count = 2 | ||
data_warm_node_count = 2 | ||
role_arn = module.aws.role_arn | ||
} | ||
exporter_enabled = true | ||
elastalert_enabled = false | ||
elastalert_config = { | ||
slack_webhook_url = "" | ||
elastalert_values = file("./helm/elastAlert.yaml") | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
## Azure ECK Example | ||
![squareops_avatar] | ||
|
||
[squareops_avatar]: https://squareops.com/wp-content/uploads/2022/12/squareops-logo.png | ||
|
||
### [SquareOps Technologies](https://squareops.com/) Your DevOps Partner for Accelerating cloud journey. | ||
<br> | ||
This example will be very useful for users who are new to a module and want to quickly learn how to use it. By reviewing the examples, users can gain a better understanding of how the module works, what features it supports, and how to customize it to their specific needs. | ||
|
||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
## Requirements | ||
|
||
No requirements. | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | n/a | | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_eck"></a> [eck](#module\_eck) | https://github.com/sq-ia/terraform-kubernetes-elastic.git | n/a | | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [azurerm_kubernetes_cluster.primary](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/kubernetes_cluster) | data source | | ||
|
||
## Inputs | ||
|
||
No inputs. | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_eck_credentials"></a> [eck\_credentials](#output\_eck\_credentials) | ECK\_Info | | ||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: "Monitor-Services" | ||
operator: In | ||
values: | ||
- "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
rules: | ||
slack_alert: |- | ||
--- | ||
name: elast_alert | ||
type: frequency | ||
index: filebeat-* | ||
num_events: 5 | ||
timeframe: | ||
minutes: 5 | ||
filter: | ||
- query: | ||
query_string: | ||
query: "http.response.status_code : 404" | ||
alert: | ||
- "slack" | ||
slack: | ||
slack_webhook_url: https://hooks.slack.com/services/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 | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: "Monitor-Services" | ||
operator: In | ||
values: | ||
- "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
locals { | ||
name = "elastic" | ||
region = "eastus" | ||
environment = "prod" | ||
additional_tags = { | ||
Owner = "organization_name" | ||
Expires = "Never" | ||
Department = "Engineering" | ||
} | ||
} | ||
|
||
module "eck" { | ||
source = "https://github.com/sq-ia/terraform-kubernetes-elastic.git" | ||
namespace = "elastic-system" | ||
eck_config = { | ||
provider_type = "azure" | ||
hostname = "" | ||
eck_values = file("./helm/eck.yaml") | ||
master_node_sc = "infra-service-sc" | ||
data_hot_node_sc = "infra-service-sc" | ||
data_warm_node_sc = "infra-service-sc" | ||
master_node_size = "20Gi" | ||
data_hot_node_size = "50Gi" | ||
data_warm_node_size = "50Gi" | ||
kibana_node_count = 1 | ||
master_node_count = 1 | ||
data_hot_node_count = 1 | ||
data_warm_node_count = 1 | ||
} | ||
exporter_enabled = false | ||
elastalert_enabled = false | ||
elastalert_config = { | ||
slack_webhook_url = "" | ||
elastalert_values = file("./helm/elastAlert.yaml") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output "eck_credentials" { | ||
description = "ECK_Info" | ||
value = module.eck.eck | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
provider "azurerm" { | ||
features {} | ||
} | ||
|
||
data "azurerm_kubernetes_cluster" "primary" { | ||
name = "" | ||
resource_group_name = "" | ||
} | ||
|
||
provider "kubernetes" { | ||
host = data.azurerm_kubernetes_cluster.primary.kube_config.0.host | ||
username = data.azurerm_kubernetes_cluster.primary.kube_config.0.username | ||
password = data.azurerm_kubernetes_cluster.primary.kube_config.0.password | ||
client_certificate = base64decode(data.azurerm_kubernetes_cluster.primary.kube_config.0.client_certificate) | ||
client_key = base64decode(data.azurerm_kubernetes_cluster.primary.kube_config.0.client_key) | ||
cluster_ca_certificate = base64decode(data.azurerm_kubernetes_cluster.primary.kube_config.0.cluster_ca_certificate) | ||
} | ||
|
||
provider "helm" { | ||
kubernetes { | ||
host = data.azurerm_kubernetes_cluster.primary.kube_config.0.host | ||
client_key = base64decode(data.azurerm_kubernetes_cluster.primary.kube_config.0.client_key) | ||
client_certificate = base64decode(data.azurerm_kubernetes_cluster.primary.kube_config.0.client_certificate) | ||
cluster_ca_certificate = base64decode(data.azurerm_kubernetes_cluster.primary.kube_config.0.cluster_ca_certificate) | ||
} | ||
} |
Oops, something went wrong.