slave.yaml 1.5 KB
Newer Older
Balazs's avatar
Balazs committed
1 2 3 4 5 6 7 8 9 10 11 12 13
############### slave $slavenumber$ ################
  hadoop_slave_port_$slavenumber$:
    type: OS::Neutron::Port
    properties:
      name: hadoop_slave_port_$slavenumber$
      network: { get_resource: hadoop_network }
      fixed_ips:
        - subnet_id: { get_resource: hadoop_subnet }
      security_groups: [{ get_resource: hadoop_sec_group }]

  hadoop_slave_$slavenumber$:
    type: OS::Nova::Server
    properties:
14
      image: { get_param: slave_image }
Balazs's avatar
Balazs committed
15 16
      flavor: { get_param: slave_flavor }
      name: { list_join: ["", [{ get_param: slave_name },"$slavenumber$"]] }
17
      key_name: { get_resource: sshpublickey }
Balazs's avatar
Balazs committed
18 19
      networks:
        - port: { get_resource: hadoop_slave_port_$slavenumber$ }
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
      # user_data:
      #   str_replace:
      #     template: |
      #         #!/bin/bash
      #         addgroup hadoop
      #         useradd --gid hadoop --home /home/hduser --create-home --shell /bin/bash hduser
      #         # as the only user to enter this VM is hduser, he needs to be able to access root functionality without a password
      #         echo "hduser        ALL=(ALL)       NOPASSWD: ALL" >> /etc/sudoers
      #         passwd --delete hduser
      #         su hduser -c "mkdir /home/hduser/.ssh"
      #         su hduser -c 'echo -e "$master.id_rsa.pub$" > /home/hduser/.ssh/authorized_keys'
      #         chmod 0600 /home/hduser/.ssh/config
      #         echo $info$
      #     params:
      #       $info$: "no info today"
Balazs's avatar
Balazs committed
35 36 37

############### end slave $slavenumber$ ##############