- First, an image needs to be uploaded:
wget -qO - http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img | openstack image create cirros --public --container-format=bare --disk-format=qcow2
- Then we need to create a network:
openstack network create testnetwork
- Within the network, a subnet needs to be created:
neutron subnet-create --name testsubnet testnetwork 192.168.37.0/24
- Please note that a more recent version of OpenStack might support the openstack subnet create command as well.
- Let's create a router now:
neutron router-create testrouter
- Now set the router's default gateway by connecting it to a network:
neutron router-gateway-set testrouter floating
- And link the router to the subnet:
neutron router-interface-add testrouter testsubnet
- Now launch your instance:
nova boot --flavor m1.tiny --image cirros --nic net-id=a6a6c271-a391-4bff-9eda-79a97a8e1154 i1
- Create a floating IP:
neutron floatingip-create floating
nova floating-ip-associate i1 192.168.122.131
- Add rules to security group for icmp and ssh
openstack security group rule create --proto icmp default
openstack security group rule create --proto tcp --dst-port 22:22 default
No comments:
Post a Comment