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

Update pbspro-preinstall #722

Merged
merged 1 commit into from
Nov 10, 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: 3 additions & 0 deletions community/modules/scripts/pbspro-preinstall/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ limitations under the License.
| Name | Type |
|------|------|
| [google_storage_bucket_object.client_rpm](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket_object) | resource |
| [google_storage_bucket_object.devel_rpm](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket_object) | resource |
| [google_storage_bucket_object.execution_rpm](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket_object) | resource |
| [google_storage_bucket_object.license_file](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket_object) | resource |
| [google_storage_bucket_object.server_rpm](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket_object) | resource |
Expand All @@ -122,6 +123,7 @@ limitations under the License.
| <a name="input_bucket_viewers"></a> [bucket\_viewers](#input\_bucket\_viewers) | A list of additional accounts that can read packages from this bucket | `list(string)` | `[]` | no |
| <a name="input_client_rpm"></a> [client\_rpm](#input\_client\_rpm) | Absolute path to PBS Pro Client Host RPM file | `string` | n/a | yes |
| <a name="input_deployment_name"></a> [deployment\_name](#input\_deployment\_name) | HPC Toolkit deployment name. Cloud resource names will include this value. | `string` | n/a | yes |
| <a name="input_devel_rpm"></a> [devel\_rpm](#input\_devel\_rpm) | Absolute path to PBS Pro Development RPM file | `string` | n/a | yes |
| <a name="input_execution_rpm"></a> [execution\_rpm](#input\_execution\_rpm) | Absolute path to PBS Pro Execution Host RPM file | `string` | n/a | yes |
| <a name="input_force_destroy"></a> [force\_destroy](#input\_force\_destroy) | Set to true if object versioning is enabled and you are certain that you want to destroy the bucket. | `bool` | `false` | no |
| <a name="input_license_file"></a> [license\_file](#input\_license\_file) | Path to PBS Pro license file | `string` | `null` | no |
Expand All @@ -139,6 +141,7 @@ limitations under the License.
|------|-------------|
| <a name="output_bucket_name"></a> [bucket\_name](#output\_bucket\_name) | Bucket for PBS RPM packages |
| <a name="output_pbs_client_rpm_url"></a> [pbs\_client\_rpm\_url](#output\_pbs\_client\_rpm\_url) | gsutil URL of PBS client RPM package |
| <a name="output_pbs_devel_rpm_url"></a> [pbs\_devel\_rpm\_url](#output\_pbs\_devel\_rpm\_url) | gsutil URL of PBS development RPM package |
| <a name="output_pbs_execution_rpm_url"></a> [pbs\_execution\_rpm\_url](#output\_pbs\_execution\_rpm\_url) | gsutil URL of PBS execution host RPM package |
| <a name="output_pbs_license_file_url"></a> [pbs\_license\_file\_url](#output\_pbs\_license\_file\_url) | gsutil URL of PBS license file |
| <a name="output_pbs_server_rpm_url"></a> [pbs\_server\_rpm\_url](#output\_pbs\_server\_rpm\_url) | gsutil URL of PBS server host RPM package |
Expand Down
6 changes: 6 additions & 0 deletions community/modules/scripts/pbspro-preinstall/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ resource "google_storage_bucket_object" "client_rpm" {
bucket = module.pbspro_bucket.bucket.name
}

resource "google_storage_bucket_object" "devel_rpm" {
name = basename(var.devel_rpm)
source = var.devel_rpm
bucket = module.pbspro_bucket.bucket.name
}

resource "google_storage_bucket_object" "execution_rpm" {
name = basename(var.execution_rpm)
source = var.execution_rpm
Expand Down
8 changes: 8 additions & 0 deletions community/modules/scripts/pbspro-preinstall/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ output "pbs_client_rpm_url" {
]
}

output "pbs_devel_rpm_url" {
description = "gsutil URL of PBS development RPM package"
value = "gs://${module.pbspro_bucket.bucket.name}/${google_storage_bucket_object.devel_rpm.name}"
depends_on = [
google_storage_bucket_object.devel_rpm,
]
}

output "pbs_execution_rpm_url" {
description = "gsutil URL of PBS execution host RPM package"
value = "gs://${module.pbspro_bucket.bucket.name}/${google_storage_bucket_object.execution_rpm.name}"
Expand Down
9 changes: 9 additions & 0 deletions community/modules/scripts/pbspro-preinstall/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ variable "region" {
type = string
}

variable "devel_rpm" {
tpdownes marked this conversation as resolved.
Show resolved Hide resolved
description = "Absolute path to PBS Pro Development RPM file"
type = string
validation {
condition = can(regex("^/", var.devel_rpm))
error_message = "Path to RPM must be an absolute path beginning with \"/\"."
}
}

variable "server_rpm" {
description = "Absolute path to PBS Pro Server Host RPM file"
type = string
Expand Down
1 change: 1 addition & 0 deletions tools/validate_configs/test_configs/pbs-unwrapped.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ deployment_groups:
source: community/modules/scripts/pbspro-preinstall
settings:
client_rpm: /path/to/pbspro-client.el7.x86_64.rpm
devel_rpm: /path/to/pbspro-devel.el7.x86_64.rpm
execution_rpm: /path/to/pbspro-execution.el7.x86_64.rpm
server_rpm: /path/to/pbspro-server.el7.x86_64.rpm

Expand Down