<commit_before># 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.

---

blueprint_name: omnia-cluster

vars:
  project_id:  ## Set GCP Project ID Here ##
  deployment_name: omnia-cluster
  zone: us-central1-c
  region: us-central1
  instance_image:
    family: rocky-linux-8
    project: rocky-linux-cloud

# Documentation for each of the modules used below can be found at
# https://github.com/GoogleCloudPlatform/hpc-toolkit/blob/main/modules/README.md

deployment_groups:
- group: primary
  modules:

  ## Network
  - id: network
    source: modules/network/vpc
    kind: terraform

  ## File Systems
  - id: homefs
    source: modules/file-system/filestore
    kind: terraform
    use: [network]
    settings:
      local_mount: "/home"

  ## Installation Scripts
  - id: omnia
    source: community/modules/scripts/omnia-install
    kind: terraform
    outputs: [inventory_file, omnia_user_warning]
    settings:
      manager_ips: [localhost]
      compute_ips: $(compute.internal_ip)

  - id: startup-manager
    source: modules/scripts/startup-script
    kind: terraform
    settings:
      runners:
      - type: shell
        source: "modules/startup-script/examples/install_ansible.sh"
        destination: "install_ansible.sh"
      - $(homefs.install_nfs_client_runner)
      - $(homefs.mount_runner)
      - $(omnia.setup_omnia_node_runner)
      - $(omnia.copy_inventory_runner)
      - $(omnia.install_omnia_runner)

  - id: startup-compute
    source: modules/scripts/startup-script
    kind: terraform
    settings:
      runners:
      - type: shell
        source: "modules/startup-script/examples/install_ansible.sh"
        destination: "install_ansible.sh"
      - $(homefs.install_nfs_client_runner)
      - $(homefs.mount_runner)
      - $(omnia.setup_omnia_node_runner)

  ## Compute
  - id: manager
    source: modules/compute/vm-instance
    kind: terraform
    use:
    - network
    - homefs
    - startup-manager
    settings:
      name_prefix: omnia-manager
      machine_type: n2-standard-4

  - id: compute
    source: modules/compute/vm-instance
    kind: terraform
    use:
    - network
    - homefs
    - startup-compute
    settings:
      name_prefix: omnia-compute
      instance_count: 2

  # This module simply makes terraform wait until the startup script is complete
  - id: wait
    source: community/modules/scripts/wait-for-startup
    kind: terraform
    use:
    - network
    settings:
      instance_name: ((module.manager.name[0]))
<commit_msg>Remove "use" from omnia example where no parameters are being passed<commit_after># 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.

---

blueprint_name: omnia-cluster

vars:
  project_id:  ## Set GCP Project ID Here ##
  deployment_name: omnia-cluster
  zone: us-central1-c
  region: us-central1
  instance_image:
    family: rocky-linux-8
    project: rocky-linux-cloud

# Documentation for each of the modules used below can be found at
# https://github.com/GoogleCloudPlatform/hpc-toolkit/blob/main/modules/README.md

deployment_groups:
- group: primary
  modules:

  ## Network
  - id: network
    source: modules/network/vpc
    kind: terraform

  ## File Systems
  - id: homefs
    source: modules/file-system/filestore
    kind: terraform
    use: [network]
    settings:
      local_mount: "/home"

  ## Installation Scripts
  - id: omnia
    source: community/modules/scripts/omnia-install
    kind: terraform
    outputs: [inventory_file, omnia_user_warning]
    settings:
      manager_ips: [localhost]
      compute_ips: $(compute.internal_ip)

  - id: startup-manager
    source: modules/scripts/startup-script
    kind: terraform
    settings:
      runners:
      - type: shell
        source: "modules/startup-script/examples/install_ansible.sh"
        destination: "install_ansible.sh"
      - $(homefs.install_nfs_client_runner)
      - $(homefs.mount_runner)
      - $(omnia.setup_omnia_node_runner)
      - $(omnia.copy_inventory_runner)
      - $(omnia.install_omnia_runner)

  - id: startup-compute
    source: modules/scripts/startup-script
    kind: terraform
    settings:
      runners:
      - type: shell
        source: "modules/startup-script/examples/install_ansible.sh"
        destination: "install_ansible.sh"
      - $(homefs.install_nfs_client_runner)
      - $(homefs.mount_runner)
      - $(omnia.setup_omnia_node_runner)

  ## Compute
  - id: manager
    source: modules/compute/vm-instance
    kind: terraform
    use:
    - network
    - homefs
    - startup-manager
    settings:
      name_prefix: omnia-manager
      machine_type: n2-standard-4

  - id: compute
    source: modules/compute/vm-instance
    kind: terraform
    use:
    - network
    - homefs
    - startup-compute
    settings:
      name_prefix: omnia-compute
      instance_count: 2

  # This module simply makes terraform wait until the startup script is complete
  - id: wait
    source: community/modules/scripts/wait-for-startup
    kind: terraform
    settings:
      instance_name: ((module.manager.name[0]))

{'fraction_non_alphanumeric': 0.0911784068466096, 'fraction_numerical': 0.004937458854509546, 'mean_word_length': 2.948667966211826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '350516', 'n_tokens_mistral': 1872, 'n_tokens_neox': 1835, 'n_words': 500}