This module uploads PBS Pro RPM packages and, optionally, a license file to Google Cloud Storage. This enables machines in a PBS cluster to rapidly download and install PBS at boot or during the building of an image.
The following code snippet uses this module to upload RPM packages to Cloud Storage and make them available as outputs for subsequent modules. It also demonstrates how to give read-only access to service accounts that will be used with PBS clusters. Explicit listing of service accounts is typically necessary if the bucket is provisioned in one project and clusters in other projects.
- id: pbspro_setup
source: community/modules/scripts/pbspro-preinstall
settings:
client_rpm: "/path/to/pbs/packages/pbspro-client-2021.1.3.20220217134230-0.el7.x86_64.rpm"
execution_rpm: "/path/to/pbs/packages/pbspro-execution-2021.1.3.20220217134230-0.el7.x86_64.rpm"
server_rpm: "/path/to/pbs/packages/pbspro-server-2021.1.3.20220217134230-0.el7.x86_64.rpm"
bucket_viewers:
- [email protected]
outputs:
- client_rpm_url
- execution_rpm_url
- server_rpm_url
This module can be used once to support many clusters by granting read-only access to the bucket to other clusters. Begin by identifying the service accounts used by cluster nodes. If you haven't actively chosen a service account, the default Compute Engine service account is being used. In this case, the service account is
where the X
characters should be replaced by the project number of your
project:
gcloud projects describe example-project
Supply all service accounts to the bucket_viewers
setting as shown in the
example above.
By default, object versioning is enabled on the bucket so that PBS packages can
be recovered if they are overwritten or deleted. Buckets with object versioning
enabled cannot be deleted without enabling a special force_destroy
flag which
indicates that the user is aware that they are deleting all version history of
the objects.
terraform apply -var force_destroy=true
terraform destroy
PBS Professional is licensed and supported by Altair. This module is maintained and supported by the Cluster Toolkit team in collaboration with Altair.
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Name | Version |
---|---|
terraform | >= 0.13.0 |
>= 3.83 |
Name | Version |
---|---|
>= 3.83 |
Name | Source | Version |
---|---|---|
pbspro_bucket | terraform-google-modules/cloud-storage/google | ~> 5.0 |
Name | Type |
---|---|
google_storage_bucket_object.client_rpm | resource |
google_storage_bucket_object.devel_rpm | resource |
google_storage_bucket_object.execution_rpm | resource |
google_storage_bucket_object.license_file | resource |
google_storage_bucket_object.server_rpm | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
bucket_lifecycle_rules | Additional lifecycle_rules for specific buckets. Map of lowercase unprefixed name => list of lifecycle rules to configure. | list(object({ |
[ |
no |
bucket_viewers | A list of additional accounts that can read packages from this bucket | set(string) |
[] |
no |
client_rpm | Absolute path to PBS Pro Client Host RPM file | string |
n/a | yes |
deployment_name | Cluster Toolkit deployment name. Cloud resource names will include this value. | string |
n/a | yes |
devel_rpm | Absolute path to PBS Pro Development RPM file | string |
n/a | yes |
execution_rpm | Absolute path to PBS Pro Execution Host RPM file | string |
n/a | yes |
force_destroy | Set to true if object versioning is enabled and you are certain that you want to destroy the bucket. | bool |
false |
no |
labels | Labels to add to the created bucket. Key-value pairs. | map(string) |
n/a | yes |
license_file | Path to PBS Pro license file | string |
null |
no |
location | Google Cloud Storage bucket location (defaults to var.region if not set) | string |
null |
no |
project_id | Project in which Google Cloud Storage bucket will be created | string |
n/a | yes |
region | Default region for creating resources | string |
n/a | yes |
retention_policy | Google Cloud Storage retention policy (to prevent accidental deletion) | any |
{} |
no |
server_rpm | Absolute path to PBS Pro Server Host RPM file | string |
n/a | yes |
storage_class | Google Cloud Storage class | string |
"STANDARD" |
no |
versioning | Enable versioning of Google Cloud Storage objects (cannot be enabled with a retention policy) | bool |
false |
no |
Name | Description |
---|---|
bucket_name | Bucket for PBS RPM packages |
pbs_client_rpm_url | gsutil URL of PBS client RPM package |
pbs_devel_rpm_url | gsutil URL of PBS development RPM package |
pbs_execution_rpm_url | gsutil URL of PBS execution host RPM package |
pbs_license_file_url | gsutil URL of PBS license file |
pbs_server_rpm_url | gsutil URL of PBS server host RPM package |