Ask Your Question
0

I need reference heat template to create multiple server with multiple number of network,subnet and port.

asked 2019-05-14 05:46:25 -0500

Sumit1269 gravatar image

First network : net1,subnet1,port1 second network: net2,subnet2,port2 third network: net3,subnet3,port3

Server1: need to attach with all these 3 networks. Server2 : need to attach with net1 and net2 Server3: with net 1 only

Also require to assign fixed IP to all network in each server.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-05-14 07:27:13 -0500

updated 2019-05-14 07:28:59 -0500

Note that if there is only one port on net1, you can only connect one server to it.

See https://docs.openstack.org/heat/lates... to connect instances to a list of networks. Connecting them to existing ports is not much different: Use the port key instead of the network key.

You can attach a fixed IP to a port. Same web page as above, a bit further down shows how to associate a port with a subnet. To associate it with a fixed IP, use the fixed_ip key instead of subnet.

You can also attach a fixed IP to the network of a server. See the the documentation for the Server resource type.

Also see the documentation for the Port resource type.

edit flag offensive delete link more

Comments

Hi,Now i am able to create VM with multiple port and also able to assign fixed ip.

Now my target is to assign both ipv4 and ipv6 to VM. With the help of dashboard,i am able to achieve my target,but i need to automate this work with the help of heat teamplate. but i am getting error while doing this

Sumit1269 gravatar imageSumit1269 ( 2019-06-04 04:23:40 -0500 )edit

template which i am using to do this activity. heat_template_version: '2015-10-15' resources: my_port1: properties: fixed_ips: - [{ip_address: 192.168.10.4, subnet: NET_IPv4},{ip_address: ffff:ffff:ffff:ffff::ff, subnet: NET_IPv6}] network_id: NET type: OS::Neutron::Port

Sumit1269 gravatar imageSumit1269 ( 2019-06-04 04:25:00 -0500 )edit

my_vm1: properties: availability_zone: nova1 flavor: {get_resource: small} image: centos name: server1 networks: - port: {get_resource: my_port1} type: OS::Nova::Server

Sumit1269 gravatar imageSumit1269 ( 2019-06-04 04:50:10 -0500 )edit

Can you add the template to your question and format it for readability (use the 101010 button), and also add the error message you get?

Bernd Bausch gravatar imageBernd Bausch ( 2019-06-04 05:49:40 -0500 )edit

my_vm1: properties: availability_zone: nova1 flavor: {get_resource: small} image: centos name: server1 networks: - port: {get_resource: my_port1} type: OS::Nova::Server

Sumit1269 gravatar imageSumit1269 ( 2019-06-04 06:29:21 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-05-14 05:46:25 -0500

Seen: 29 times

Last updated: May 14