3. l Elastic 概要
l Elastic Observability
l Elastic and HashiCorp
l Terraform による Azure Kubernetes Service クラスター
作成
l Elastic Cloud on Azure へのサンプルアプリのデプロイ
l Elastic x Azure 統合による Observability と APM の進化
l まとめ
アジェンダ
15. Elastic and HashiCorp partner to bring
infrastructure-as-code to Elastic Cloud
https://www.elastic.co/jp/blog/elastic-hashicorp-partner-to-bring-infrastructure-as-code-to-elastic-cloud
26. Azure プロバイダーを宣⾔する Terraform 構成ファイルの作成
• Bash
• HashiCorp Configuration Language
//HashiCorp Configuration Language
provider "azurerm" {
# The "feature" block is required for AzureRM provider 2.x.
# If you are using version 1.x, the "features" block is not allowed.
version = "~>2.0"
features {}
}
terraform {
backend "azurerm" {}
}
//Cloud Shell で main.tf という名前のファイルを作成
code main.tf
29. Kubernetes クラスターのリソースを宣⾔する
Terraform 構成ファイルを作成 - 2
• HashiCorp Configuration Language
resource "azurerm_resource_group" "k8s" {
name = var.resource_group_name
location = var.location
}
resource "random_id" "log_analytics_workspace_name_suffix" {
byte_length = 8
}
resource "azurerm_log_analytics_workspace" "test" {
# The WorkSpace name has to be unique across the whole of azure, not just the current
subscription/tenant.
name = "${var.log_analytics_workspace_name}-
${random_id.log_analytics_workspace_name_suffix.dec}"
location = var.log_analytics_workspace_location
resource_group_name = azurerm_resource_group.k8s.name
sku = var.log_analytics_workspace_sku
}
---
55. デプロイメントエイリアス
resource "ec_deployment" "example_minimal" {
region = "us-east-1"
name = "my-example-deployment"
// The deployment can be reached on:// my-
alias.es.us-east-1.aws.cloud.es.io:9423
alias = "my-alias"
version = "7.14"
deployment_template_id = "aws-io-optimized-v2"
elasticsearch {
autoscale = "true"
topology {
id = "cold"
size = "8g"
}
topology {
id = "hot_content"
size = "8g"
autoscaling {
// Optionally change the policy max size.
max_size = "59g"
}
---
---
}
topology {
id = "warm"
size = "8g"
}
}
kibana {}
apm {}
enterprise_search {}
}
56. Elastic Cloud
Elastic Observability サンプルアプリ on AKS
filebeat
metricbeat
packetbeat
APM
MySQL
Azure Kubernetes
Service (AKS)
https://github.com/michaelhyatt/k8s-o11y-workshop
東⽇本リージョン
マスターノード x 1
データノード x 2
ML ノード x 1
https://f79...c67.japaneast.azure.elastic-cloud.com:9243/
62. まとめ
l Elastic 概要
l Elastic Observability
l Elastic and HashiCorp
l Terraform による Azure Kubernetes Service クラスター
作成
l Elastic Cloud on Azure へのサンプルアプリのデプロイ
l Elastic x Azure 統合による Observability と APM の進化