Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-9917 Auto configure server side YMLs #20

Merged
merged 5 commits into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions images/configs/daos_agent.yml

This file was deleted.

3 changes: 0 additions & 3 deletions images/configs/daos_control.yml

This file was deleted.

18 changes: 0 additions & 18 deletions images/daos-server-image.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,6 @@
"./scripts/tune.sh",
"./scripts/install_daos.sh"
]
},
{
"type": "file",
"source": "./configs",
"destination": "/tmp/"
},
{
"type": "file",
"source": "./scripts/gcp_metadata.sh",
"destination": "/tmp/"
},
{
"type": "shell",
"execute_command": "echo 'packer' | sudo -S env {{ .Vars }} {{ .Path }}",
"environment_vars": [
"DAOS_VERSION={{user `daos_version`}}"
],
"script": "./scripts/setup_server.sh"
}
]
}
80 changes: 0 additions & 80 deletions images/scripts/gcp_metadata.sh

This file was deleted.

46 changes: 0 additions & 46 deletions images/scripts/setup_server.sh

This file was deleted.

3 changes: 1 addition & 2 deletions terraform/examples/daos_client_mig/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ module "daos_client" {
region = var.region
zone = var.zone
labels = var.labels

number_of_instances = var.number_of_instances

instance_base_name = var.instance_base_name
os_disk_size_gb = var.os_disk_size_gb
os_disk_type = var.os_disk_type
Expand All @@ -22,4 +20,5 @@ module "daos_client" {
machine_type = var.machine_type
os_project = var.os_project
os_family = var.os_family
access_points = var.access_points
}
35 changes: 19 additions & 16 deletions terraform/examples/daos_client_mig/terraform.tfvars.example
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
project_id="<my_project_id>"
network = "<my_VPC_network>"
subnetwork = "<my_VPC_subnetwork>"
subnetwork_project = "<my_project_id>"
region = "europe-west4"
zone = "europe-west4-a"
project_id = "<project_id>"
network = "default"
subnetwork = "default"
subnetwork_project = "<project_id>"
region = "us-central1"
zone = "us-central1-f"

labels = {
example="daos_client_mig"
example = "daos_client_mig_example"
}

number_of_instances = 2

instance_base_name = "daos-client"
os_disk_size_gb = 20
os_disk_type = "pd-ssd"
template_name = "daos-client"
mig_name = "daos-client"
machine_type = "n2-highmem-16" # 10x physical cores, using 8x targets
instance_base_name = "daos-client"
os_disk_size_gb = 20
os_disk_type = "pd-ssd"
template_name = "daos-client"
mig_name = "daos-client"
machine_type = "c2-standard-16"

# the image must be built before (see build folder)
os_project = "<my_project_id>"
os_family = "daos-client-hpc-centos-7"
os_project = "<project_id>"
os_family = "daos-client-hpc-centos-7"

# List of DAOS server instances
access_points = ["daos-server-0001","daos-server-0002"]
6 changes: 6 additions & 0 deletions terraform/examples/daos_client_mig/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,9 @@ variable "number_of_instances" {
default = 2
type = number
}

variable "access_points" {
description = "List of servers to add to client .yml files"
default = ["daos-server-0001"]
type = list(string)
}
7 changes: 3 additions & 4 deletions terraform/examples/full_cluster_setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ module "daos_server" {
region = var.region
zone = var.zone
labels = var.server_labels

number_of_instances = var.server_number_of_instances
daos_disk_count = var.server_daos_disk_count

daos_crt_timeout = var.server_daos_crt_timeout
daos_scm_size = var.server_daos_scm_size
instance_base_name = var.server_instance_base_name
os_disk_size_gb = var.server_os_disk_size_gb
os_disk_type = var.server_os_disk_type
Expand All @@ -35,9 +35,7 @@ module "daos_client" {
region = var.region
zone = var.zone
labels = var.client_labels

number_of_instances = var.client_number_of_instances

instance_base_name = var.client_instance_base_name
os_disk_size_gb = var.client_os_disk_size_gb
os_disk_type = var.client_os_disk_type
Expand All @@ -47,4 +45,5 @@ module "daos_client" {
os_project = var.client_os_project
os_family = var.client_os_family
preemptible = var.preemptible
access_points = module.daos_server.access_points
}
16 changes: 10 additions & 6 deletions terraform/examples/full_cluster_setup/terraform.tfvars.example
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
project_id = ""
project_id = "<project_id>"
network = "default"
subnetwork = "default"
subnetwork_project = ""
subnetwork_project = "<project_id>"
region = "us-central1"
zone = "us-central1-a"
zone = "us-central1-f"
preemptible = "false"

# Server
server_number_of_instances = 1
server_daos_disk_count = 8
server_daos_crt_timeout = 300
server_daos_scm_size = 100
server_instance_base_name = "daos-server"
server_os_disk_size_gb = 20
server_os_disk_type = "pd-ssd"
server_template_name = "daos-server"
server_mig_name = "daos-server"
server_machine_type = "n2-highmem-32"
server_os_project = ""
server_os_project = "<project_id>"
server_os_family = "daos-server-centos-7"
server_labels = {
example = "full_cluster_setup"
}

# Client
client_number_of_instances = 1
client_instance_base_name = "daos-client"
Expand All @@ -27,8 +31,8 @@ client_os_disk_type = "pd-ssd"
client_template_name = "daos-client"
client_mig_name = "daos-client"
client_machine_type = "c2-standard-16"
client_os_project = ""
client_os_project = "<project_id>"
client_os_family = "daos-client-hpc-centos-7"
client_labels = {
example = "full_cluster_setup"
}
}
18 changes: 18 additions & 0 deletions terraform/examples/full_cluster_setup/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,21 @@ variable "preemptible" {
default = true
type = string
}

variable "access_points" {
description = "List of servers to add to client .yml files"
default = null
type = list(string)
}

variable "server_daos_crt_timeout" {
description = "crt_timeout"
default = null
type = number
}

variable "server_daos_scm_size" {
description = "scm_size"
default = null
type = number
}
2 changes: 2 additions & 0 deletions terraform/examples/io500/config/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export TF_VAR_preemptible="${PREEMPTIBLE_INSTANCES}"
# Servers
export TF_VAR_server_number_of_instances=${DAOS_SERVER_INSTANCE_COUNT}
export TF_VAR_server_daos_disk_count=${DAOS_SERVER_DISK_COUNT}
export TF_VAR_server_daos_crt_timeout=${DAOS_SERVER_CRT_TIMEOUT}
export TF_VAR_server_daos_scm_size=${DAOS_SERVER_SCM_SIZE}
export TF_VAR_server_instance_base_name="${DAOS_SERVER_BASE_NAME}"
export TF_VAR_server_os_disk_size_gb=20
export TF_VAR_server_os_disk_type="pd-ssd"
Expand Down
2 changes: 2 additions & 0 deletions terraform/examples/io500/config/config_1c_1s_8d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export TF_VAR_preemptible="${PREEMPTIBLE_INSTANCES}"
# Servers
export TF_VAR_server_number_of_instances=${DAOS_SERVER_INSTANCE_COUNT}
export TF_VAR_server_daos_disk_count=${DAOS_SERVER_DISK_COUNT}
export TF_VAR_server_daos_crt_timeout=${DAOS_SERVER_CRT_TIMEOUT}
export TF_VAR_server_daos_scm_size=${DAOS_SERVER_SCM_SIZE}
export TF_VAR_server_instance_base_name="${DAOS_SERVER_BASE_NAME}"
export TF_VAR_server_os_disk_size_gb=20
export TF_VAR_server_os_disk_type="pd-ssd"
Expand Down
2 changes: 2 additions & 0 deletions terraform/examples/io500/config/config_2c_2s_16d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export TF_VAR_preemptible="${PREEMPTIBLE_INSTANCES}"
# Servers
export TF_VAR_server_number_of_instances=${DAOS_SERVER_INSTANCE_COUNT}
export TF_VAR_server_daos_disk_count=${DAOS_SERVER_DISK_COUNT}
export TF_VAR_server_daos_crt_timeout=${DAOS_SERVER_CRT_TIMEOUT}
export TF_VAR_server_daos_scm_size=${DAOS_SERVER_SCM_SIZE}
export TF_VAR_server_instance_base_name="${DAOS_SERVER_BASE_NAME}"
export TF_VAR_server_os_disk_size_gb=20
export TF_VAR_server_os_disk_type="pd-ssd"
Expand Down
1 change: 0 additions & 1 deletion terraform/examples/io500/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ main() {
configure_first_client_nat_ip
configure_ssh
copy_files_to_first_client
configure_daos
show_instances
show_run_steps
}
Expand Down
2 changes: 2 additions & 0 deletions terraform/examples/simple_daos_server_example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ module "daos_server" {

number_of_instances = var.number_of_instances
daos_disk_count = var.daos_disk_count
daos_crt_timeout = var.daos_crt_timeout
daos_scm_size = var.daos_scm_size

instance_base_name = var.instance_base_name
os_disk_size_gb = var.os_disk_size_gb
Expand Down
Loading