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

DAOSGCP-85 Add daos_client_install_script output to daos_server module #32

Merged
merged 2 commits into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions terraform/examples/daos_cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ variable "server_daos_scm_size" {
variable "server_daos_crt_timeout" {
description = "crt_timeout"
default = 300
type = number
cboneti marked this conversation as resolved.
Show resolved Hide resolved
}

variable "server_gvnic" {
Expand Down
1 change: 1 addition & 0 deletions terraform/modules/daos_server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ No modules.
|------|-------------|
| <a name="output_access_points"></a> [access\_points](#output\_access\_points) | List of DAOS servers to use as access points |
| <a name="output_daos_agent_yml"></a> [daos\_agent\_yml](#output\_daos\_agent\_yml) | YAML to configure the daos agent. This is typically saved in /etc/daos/daos\_agent.yml |
| <a name="output_daos_client_install_script"></a> [daos\_client\_install\_script](#output\_daos\_client\_install\_script) | Script to install the DAOS client package. |
| <a name="output_daos_config_script"></a> [daos\_config\_script](#output\_daos\_config\_script) | Script to configure the DAOS system. This will format the sytem with dmg -l and optionally create the specified pools. |
| <a name="output_daos_control_yml"></a> [daos\_control\_yml](#output\_daos\_control\_yml) | YAML configuring DAOS control. This is typically saved in /etc/daos/daos\_control.yml |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
3 changes: 3 additions & 0 deletions terraform/modules/daos_server/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ locals {
}
)

daos_client_install_script_content = file(
"${path.module}/scripts/daos_client_install_script.sh")

# Google Virtual NIC (gVNIC) network interface
nic_type = var.gvnic ? "GVNIC" : "VIRTIO_NET"
total_egress_bandwidth_tier = var.gvnic ? "TIER_1" : "DEFAULT"
Expand Down
4 changes: 4 additions & 0 deletions terraform/modules/daos_server/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@
"name": "daos_agent_yml",
"description": "YAML to configure the daos agent. This is typically saved in /etc/daos/daos_agent.yml"
},
{
"name": "daos_client_install_script",
"description": "Script to install the DAOS client package."
},
{
"name": "daos_config_script",
"description": "Script to configure the DAOS system. This will format the sytem with dmg -l and optionally create the specified pools."
Expand Down
5 changes: 5 additions & 0 deletions terraform/modules/daos_server/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ output "daos_config_script" {
description = "Script to configure the DAOS system. This will format the sytem with dmg -l and optionally create the specified pools."
value = local.configure_daos_content
}

output "daos_client_install_script" {
description = "Script to install the DAOS client package."
value = local.daos_client_install_script_content
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash
# Install DAOS Client package
#
# TODO: Add support for installing on openSUSE Leap 15.3 and Ubuntu 20.04 LTS
#

DAOS_VERSION="${DAOS_VERSION:-2.0}"

echo "BEGIN: DAOS Client Installation"

# Determine which repo to use
# shellcheck disable=SC1091
source "/etc/os-release"
OS_VERSION=$(echo "${VERSION_ID}" | cut -d. -f1)
OS_VERSION_ID="${ID,,}_${OS_VERSION}"
case ${OS_VERSION_ID} in
centos_7)
DAOS_OS_VERSION="CentOS7"
;;
centos_8)
DAOS_OS_VERSION="CentOS8"
;;
rocky_8)
DAOS_OS_VERSION="CentOS8"
;;
*)
echo "ERROR: Unsupported OS: ${OS_VERSION_ID}. Exiting."
exit 1
;;
esac

echo "Adding DAOS v${DAOS_VERSION} packages repo"
curl -s --output /etc/yum.repos.d/daos_packages.repo "https://packages.daos.io/v${DAOS_VERSION}/${DAOS_OS_VERSION}/packages/x86_64/daos_packages.repo"

echo "Installing daos-client and daos-devel packages"
yum install -y daos-client daos-devel
systemctl enable daos_agent
Kmannth marked this conversation as resolved.
Show resolved Hide resolved

echo "END: DAOS Client Installation"