




















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





















































$ systemctl disable NetworkManager $ systemctl enable network $ systemctl stop NetworkManager.service $ systemctl start network.service
$ yum install -y https://www.rdoproject.org/repos/rdo-release.rp m $ sudo yum update -y $ sudo yum install -y openstack-packstack $ packstack --allinone --os-neutron-lbaas-install=y
$ source ~/keystonerc_admin
$ openstack network list
| ID | Name | Subnets | +--------------------------------------+---------+-------------- ------------------------+ | 84aff6b0-2291-41b5-9871-d3d24906e358 | private | 92432fb8-8c -4abe-98d8-de8bf161a18b | | 427becab-54af-4b43-a5d2-e292b13b6a86 | public | 78eff45a-25f -4904-bab8-a8795d9a7f9b | +--------------------------------------+---------+-------------- ------------------------+
Setup security groups
$ openstack security group create web
| Field | Value | +-------------+--------------------------------------+ | description | web | | id | a98fcd2f-a828-4a88-92aa-36e3c1223a92 | | name | web | | rules | [] | | tenant_id | 3d44af649a1c42fcaa102ed11e3f010f | +-------------+--------------------------------------+
| ID | Name | Description | +--------------------------------------+----------+------------- -----------+ | cf6c0380-e255-4ba8-9258-bb8e9c062fa7 | database | database | | 379b58b2-7ca3-431e-ae1f-cd6a627a9b30 | default | Default secu rity group | | 141ed0d0-c004-457d-8efa-45e0fd2dc986 | ssh | ssh | | a98fcd2f-a828-4a88-92aa-36e3c1223a92 | web | web | +--------------------------------------+----------+------------- -----------+
$ neutron security-group-rule-create --direction ingress --proto col TCP \
--port-range-min 80 --port-range-max 80 web
Created a new security_group_rule: +-------------------+--------------------------------------+ | Field | Value | +-------------------+--------------------------------------+ | direction | ingress | | ethertype | IPv4 | | id | b293d93a-30c2-4854-a890-5ce65639f870 | | port_range_max | 80 | | port_range_min | 80 | | protocol | tcp | | remote_group_id | | | remote_ip_prefix | | | security_group_id | a98fcd2f-a828-4a88-92aa-36e3c1223a92 | | tenant_id | 3d44af649a1c42fcaa102ed11e3f010f | +-------------------+--------------------------------------+
$ neutron security-group-rule-create --direction ingress --proto col TCP \
--port-range-min 3306 --port-range-max 3306 --remote-group-id web database
Created a new security_group_rule: +-------------------+--------------------------------------+ | Field | Value | +-------------------+--------------------------------------+ | direction | ingress | | ethertype | IPv4 | | id | 0c686a2c-304f-42be-9936-cdce46963d46 | | port_range_max | 22 | | port_range_min | 22 | | protocol | tcp | | remote_group_id | 141ed0d0-c004-457d-8efa-45e0fd2dc986 | | remote_ip_prefix | | | security_group_id | cf6c0380-e255-4ba8-9258-bb8e9c062fa7 | | tenant_id | 3d44af649a1c42fcaa102ed11e3f010f | +-------------------+--------------------------------------+
$ neutron security-group-rule-create --direction ingress --proto col TCP \
--port-range-min 22 --port-range-max 22 --remote-group-id ssh web
Created a new security_group_rule: +-------------------+--------------------------------------+ | Field | Value | +-------------------+--------------------------------------+ | direction | ingress | | ethertype | IPv4 | | id | 919a6ede-8dfd-4184-bf2a-f07c0527d5bf | | port_range_max | 22 | | port_range_min | 22 | | protocol | tcp | | remote_group_id | 141ed0d0-c004-457d-8efa-45e0fd2dc986 | | remote_ip_prefix | | | security_group_id | a98fcd2f-a828-4a88-92aa-36e3c1223a92 | | tenant_id | 3d44af649a1c42fcaa102ed11e3f010f | +-------------------+--------------------------------------+
$ neutron security-group-rule-create --direction ingress --proto col tcp \
--port-range-min 22 --port-range-max 22 ssh
Created a new security_group_rule: +-------------------+--------------------------------------+ | Field | Value | +-------------------+--------------------------------------+ | direction | ingress | | ethertype | IPv4 | | id | fb8dcbe6-e553-4a92-aed4-aca7f086dca4 | | port_range_max | 22 | | port_range_min | 22 | | protocol | tcp | | remote_group_id | | | remote_ip_prefix | | | security_group_id | 141ed0d0-c004-457d-8efa-45e0fd2dc986 | | tenant_id | 3d44af649a1c42fcaa102ed11e3f010f | +-------------------+--------------------------------------+
Setup virtual machines
$ openstack network list
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public | +----+-----------+-------+------+-----------+-------+-----------
| 1 | m1.tiny | 512 | 1 | 0 | 1 | True | | 2 | m1.small | 2048 | 20 | 0 | 1 | True | | 3 | m1.medium | 4096 | 40 | 0 | 2 | True | | 4 | m1.large | 8192 | 80 | 0 | 4 | True | | 5 | m1.xlarge | 16384 | 160 | 0 | 8 | True | +----+-----------+-------+------+-----------+-------+-----------
Setup web servers
$ nova boot --image cirros --nic net-id=84aff6b0-2291-41b5-9871- d3d24906e358 \
--security_groups web --flavor 1 web_server
| Property | Value | +--------------------------------------+------------------------ -----------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | | | OS-EXT-SRV-ATTR:host | - | | OS-EXT-SRV-ATTR:hypervisor_hostname | - | | OS-EXT-SRV-ATTR:instance_name | instance- | | OS-EXT-STS:power_state | 0 | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | | OS-SRV-USG:launched_at | - | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | adminPass | rijM8RvVKXhd | | config_drive | | | created | 2016-02-25T08:21:23Z | | flavor | m1.tiny (1) | | hostId | | | id | be6ec624-07cd-45c1-
| OS-EXT-AZ:availability_zone | | | OS-EXT-SRV-ATTR:host | - | | OS-EXT-SRV-ATTR:hypervisor_hostname | - | | OS-EXT-SRV-ATTR:instance_name | instance- | | OS-EXT-STS:power_state | 0 | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | | OS-SRV-USG:launched_at | - | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | adminPass | vyT4575gsqth | | config_drive | | | created | 2016-02-25T08:22:53Z | | flavor | m1.tiny (1) | | hostId | | | id | 146056ad-e8dc-4ad3- -97b753f3d040 | | image | cirros (eea0e326-8e2e- 1db-80a0-1138a4bdd5a6) | | key_name | - | | metadata | {} |
| name | web_server | | os-extended-volumes:volumes_attached | [] | | progress | 0 | | security_groups | web | | status | BUILD | | tenant_id | 3d44af649a1c42fcaa102ed 11e3f010f | | updated | 2016-02-25T08:22:53Z | | user_id | a72ce317d35c47e8b 5d0a2af92 | +--------------------------------------+------------------------ -----------------------+
Setup database server
$ nova boot --image cirros --nic net-id=84aff6b0-2291-41b5-9871- d3d24906e358 \
--security_groups database --flavor 1 database_server
| Property | Value | +--------------------------------------+------------------------ -----------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | | | OS-EXT-SRV-ATTR:host | -
| progress | 0 | | security_groups | database | | status | BUILD | | tenant_id | 3d44af649a1c42fcaa102ed 11e3f010f | | updated | 2016-02-25T08:23:22Z | | user_id | a72ce317d35c47e8b 5d0a2af92 | +--------------------------------------+------------------------ -----------------------+
Setup jumphost server
$ nova boot --image cirros --nic net-id=84aff6b0-2291-41b5-9871- d3d24906e358 \
--security_groups ssh --flavor 1 jumphost
| Property | Value | +--------------------------------------+------------------------ -----------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | | | OS-EXT-SRV-ATTR:host | - | | OS-EXT-SRV-ATTR:hypervisor_hostname | - |
| OS-EXT-SRV-ATTR:instance_name | instance- | | OS-EXT-STS:power_state | 0 | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | | OS-SRV-USG:launched_at | - | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | adminPass | jwbUXkmfEK7Y | | config_drive | | | created | 2016-02-25T08:23:54Z | | flavor | m1.tiny (1) | | hostId | | | id | e540896e-e148-414a- -3b83d3f2b059 | | image | cirros (eea0e326-8e2e- 1db-80a0-1138a4bdd5a6) | | key_name | - | | metadata | {} | | name | jumphost | | os-extended-volumes:volumes_attached | [] | | progress | 0 |