Created
June 10, 2016 07:41
-
-
Save KLuka/a23c1490d49e3fa23f858f510a6e5c94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heat_template_version: 2013-05-23 | |
description: > | |
Deploy 2 Cirros VMs with multiple network interfaces in attached in | |
opposite order (1-4 and 4-1). | |
resources: | |
cirros-one-to-four: | |
type: OS::Nova::Server | |
properties: | |
availability_zone: nova | |
flavor: m1.tiny | |
image: TestVM | |
networks: | |
- network: lkra-mgmt-1 | |
- network: lkra-mgmt-2 | |
- network: lkra-mgmt-3 | |
- network: lkra-mgmt-4 | |
user_data_format: RAW | |
user_data: | | |
#!/bin/sh | |
sudo echo '' > /etc/network/interfaces | |
sudo echo 'auto eth0' >> /etc/network/interfaces | |
sudo echo 'iface eth0 inet dhcp' >> /etc/network/interfaces | |
sudo echo 'auto eth1' >> /etc/network/interfaces | |
sudo echo 'iface eth1 inet dhcp' >> /etc/network/interfaces | |
sudo echo 'auto eth2' >> /etc/network/interfaces | |
sudo echo 'iface eth2 inet dhcp' >> /etc/network/interfaces | |
sudo echo 'auto eth3' >> /etc/network/interfaces | |
sudo echo 'iface eth3 inet dhcp' >> /etc/network/interfaces | |
sudo /etc/init.d/S40network restart | |
cirros-four-to-one: | |
type: OS::Nova::Server | |
properties: | |
availability_zone: nova | |
flavor: m1.tiny | |
image: TestVM | |
networks: | |
- network: lkra-mgmt-4 | |
- network: lkra-mgmt-3 | |
- network: lkra-mgmt-2 | |
- network: lkra-mgmt-1 | |
user_data_format: RAW | |
user_data: | | |
#!/bin/sh | |
sudo echo '' > /etc/network/interfaces | |
sudo echo 'auto eth0' >> /etc/network/interfaces | |
sudo echo 'iface eth0 inet dhcp' >> /etc/network/interfaces | |
sudo echo 'auto eth1' >> /etc/network/interfaces | |
sudo echo 'iface eth1 inet dhcp' >> /etc/network/interfaces | |
sudo echo 'auto eth2' >> /etc/network/interfaces | |
sudo echo 'iface eth2 inet dhcp' >> /etc/network/interfaces | |
sudo echo 'auto eth3' >> /etc/network/interfaces | |
sudo echo 'iface eth3 inet dhcp' >> /etc/network/interfaces | |
sudo /etc/init.d/S40network restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment