<commit_before>{#
Copyright 2015 Google Inc. All rights reserved.
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.
#}

#% description: Creates a set of VMs each running a Salt minion daemon in a Docker container.
#% parameters:
#% - name: minionCount
#%   type: int
#%   description: How many minion VMs to set up.
#%   default: 1
#% - name: master
#%   type: string
#%   description: Name of the master.
#%   required: true
#% - name: zone
#%   type: string
#%   description: Zone to create the resources in.
#%   required: true

resources:
{% for replica in range(0, properties["minionCount"]) %}
- type: compute.v1.instance
  name: {{ env["deployment"] + "-" + env["name"] + "-" + replica|string }}
  properties:
    zone: {{ properties["zone"] }}
    machineType: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }}/zones/{{ properties["zone"] }}/machineTypes/f1-micro
    disks:
    - deviceName: boot
      type: PERSISTENT
      boot: true
      autoDelete: true
      initializeParams:
        sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20140619
    networkInterfaces:
    - network: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }}/global/networks/default
      accessConfigs:
      - name: External NAT
        type: ONE_TO_ONE_NAT
    metadata:
      items:
      - key: startup-script
        value: |
          #! /bin/bash
          sudo echo 'deb http://debian.saltstack.com/debian wheezy-saltstack main' >> /etc/apt/sources.list
          sudo wget -q -O- http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key | sudo apt-key add -
          sudo apt-get update
          sudo apt-get -y install salt-minion
          sudo sed -i 's/#master: salt/master: {{ properties["master"] }}/' /etc/salt/minion
          sudo salt-minion -l debug
{% endfor %}

<commit_msg>Update saltstack example templates to use updated image family<commit_after>{#
Copyright 2015 Google Inc. All rights reserved.
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.
#}

#% description: Creates a set of VMs each running a Salt minion daemon in a Docker container.
#% parameters:
#% - name: minionCount
#%   type: int
#%   description: How many minion VMs to set up.
#%   default: 1
#% - name: master
#%   type: string
#%   description: Name of the master.
#%   required: true
#% - name: zone
#%   type: string
#%   description: Zone to create the resources in.
#%   required: true

resources:
{% for replica in range(0, properties["minionCount"]) %}
- type: compute.v1.instance
  name: {{ env["deployment"] + "-" + env["name"] + "-" + replica|string }}
  properties:
    zone: {{ properties["zone"] }}
    machineType: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }}/zones/{{ properties["zone"] }}/machineTypes/f1-micro
    disks:
    - deviceName: boot
      type: PERSISTENT
      boot: true
      autoDelete: true
      initializeParams:
        sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-8
    networkInterfaces:
    - network: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }}/global/networks/default
      accessConfigs:
      - name: External NAT
        type: ONE_TO_ONE_NAT
    metadata:
      items:
      - key: startup-script
        value: |
          #! /bin/bash
          sudo echo 'deb http://debian.saltstack.com/debian wheezy-saltstack main' >> /etc/apt/sources.list
          sudo wget -q -O- http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key | sudo apt-key add -
          sudo apt-get update
          sudo apt-get -y install salt-minion
          sudo sed -i 's/#master: salt/master: {{ properties["master"] }}/' /etc/salt/minion
          sudo salt-minion -l debug
{% endfor %}


{'fraction_non_alphanumeric': 0.12055543867031349, 'fraction_numerical': 0.008415737428992216, 'mean_word_length': 3.0632478632478635, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 8, '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': '650278', 'n_tokens_mistral': 1494, 'n_tokens_neox': 1399, 'n_words': 460}