规划PaaS平台的部署架构,PaaS部署在IaaS平台的3台虚拟机上。PaaS采用分开安装的方式部署, VM1部署PaaS平台Registry节点,VM2部署PaaS平台Server节点,VM3部署client节点。每个虚拟机配置如下:
注意:具体环境根据竞赛环境配置
1) 系统配置:
Registry节点:2CPU,4G内存,100G硬盘
Server节点:2CPU,4G内存,50G硬盘
Client节点:2CPU,4G内存,50G硬盘
2) 操作系统
centos_7-x86_64
3) IP地址
Registry,Server和Client节点ip动态分配
4) 主机名
Registry节点的主机名为:Registry;
Server节点的主机名为:Server;
Client节点的主机名为:Client。
根据配置要求,完成配置文件的自定义与修改,搭建PaaS平台。
使用nova命令查询IaaS平台已创建云主机所使用的云主机类型及各云主机详细信息, 并通过curl命令查询Rancher管理平台首页,将以上查询命令及结果输入命令行界面。
[root@controller ~]# nova flavor-show Registry +----------------------------+--------------------------------------+ | Property | Value | +----------------------------+--------------------------------------+ | OS-FLV-DISABLED:disabled | False | | OS-FLV-EXT-DATA:ephemeral | 0 | | disk | 100 | | extra_specs | {} | | id | 73218a55-9253-49a4-bcd3-c3256859abc8 | | name | Registry | | os-flavor-access:is_public | True | | ram | 4096 | | rxtx_factor | 1.0 | | swap | | | vcpus | 2 | +----------------------------+--------------------------------------+ [root@controller ~]# nova flavor-show Server +----------------------------+--------------------------------------+ | Property | Value | +----------------------------+--------------------------------------+ | OS-FLV-DISABLED:disabled | False | | OS-FLV-EXT-DATA:ephemeral | 0 | | disk | 50 | | extra_specs | {} | | id | a96dab53-b960-4257-a2ca-bf0b379522ac | | name | Server | | os-flavor-access:is_public | True | | ram | 4096 | | rxtx_factor | 1.0 | | swap | | | vcpus | 2 | +----------------------------+--------------------------------------+ [root@controller ~]# nova flavor-show Client +----------------------------+--------------------------------------+ | Property | Value | +----------------------------+--------------------------------------+ | OS-FLV-DISABLED:disabled | False | | OS-FLV-EXT-DATA:ephemeral | 0 | | disk | 50 | | extra_specs | {} | | id | 5d10b26c-93c6-40f7-a73a-fc5a28d071b1 | | name | Client | | os-flavor-access:is_public | True | | ram | 4096 | | rxtx_factor | 1.0 | | swap | | | vcpus | 2 | +----------------------------+--------------------------------------+ [root@controller ~]# nova show Registry +--------------------------------------+----------------------------------------------------------+ | Property | Value | +--------------------------------------+----------------------------------------------------------+ | OS-DCF:diskConfig | AUTO | | OS-EXT-AZ:availability_zone | nova | | OS-EXT-SRV-ATTR:host | compute | | OS-EXT-SRV-ATTR:hostname | registry | | OS-EXT-SRV-ATTR:hypervisor_hostname | compute | | OS-EXT-SRV-ATTR:instance_name | instance-0000000f | | OS-EXT-SRV-ATTR:kernel_id | | | OS-EXT-SRV-ATTR:launch_index | 0 | | OS-EXT-SRV-ATTR:ramdisk_id | | | OS-EXT-SRV-ATTR:reservation_id | r-x20hxtpi | | OS-EXT-SRV-ATTR:root_device_name | /dev/vda | | OS-EXT-SRV-ATTR:user_data | - | | OS-EXT-STS:power_state | 1 | | OS-EXT-STS:task_state | - | | OS-EXT-STS:vm_state | active | | OS-SRV-USG:launched_at | 2017-03-04T01:18:27.000000 | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | config_drive | | | created | 2017-03-04T01:18:20Z | | demo-net network | 10.0.0.7, 192.168.200.12 | | description | Registry | | flavor | Registry (73218a55-9253-49a4-bcd3-c3256859abc8) | | hostId | cfb89d16838d86ee31977e16e7a94eb4e14608486ef337365f329a67 | | host_status | UP | | id | 0c65be9d-0eb5-468a-b89f-fee93dc8471b | | image | centos_7-x86_64 (8da45136-f4d6-4888-bf7f-79d484949689) | | key_name | - | | locked | False | | metadata | {} | | name | Registry | | os-extended-volumes:volumes_attached | [] | | progress | 0 | | security_groups | default | | status | ACTIVE | | tenant_id | 6653be674ca14e5194dc67bee9362b56 | | updated | 2017-03-04T01:18:27Z | | user_id | abceac91d5e5430697cc3ef3ac0c5814 | +--------------------------------------+----------------------------------------------------------+ [root@controller ~]# nova show Server +--------------------------------------+----------------------------------------------------------+ | Property | Value | +--------------------------------------+----------------------------------------------------------+ | OS-DCF:diskConfig | AUTO | | OS-EXT-AZ:availability_zone | nova | | OS-EXT-SRV-ATTR:host | compute | | OS-EXT-SRV-ATTR:hostname | server | | OS-EXT-SRV-ATTR:hypervisor_hostname | compute | | OS-EXT-SRV-ATTR:instance_name | instance-0000000d | | OS-EXT-SRV-ATTR:kernel_id | | | OS-EXT-SRV-ATTR:launch_index | 0 | | OS-EXT-SRV-ATTR:ramdisk_id | | | OS-EXT-SRV-ATTR:reservation_id | r-v4192kzk | | OS-EXT-SRV-ATTR:root_device_name | /dev/vda | | OS-EXT-SRV-ATTR:user_data | - | | OS-EXT-STS:power_state | 1 | | OS-EXT-STS:task_state | - | | OS-EXT-STS:vm_state | active | | OS-SRV-USG:launched_at | 2017-03-04T01:11:40.000000 | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | config_drive | | | created | 2017-03-04T01:11:31Z | | demo-net network | 10.0.0.5, 192.168.200.10 | | description | Server | | flavor | Server (a96dab53-b960-4257-a2ca-bf0b379522ac) | | hostId | cfb89d16838d86ee31977e16e7a94eb4e14608486ef337365f329a67 | | host_status | UP | | id | e6e4e2bb-0d45-4253-8b8d-84bb73ba7d79 | | image | centos_7-x86_64 (8da45136-f4d6-4888-bf7f-79d484949689) | | key_name | - | | locked | False | | metadata | {} | | name | Server | | os-extended-volumes:volumes_attached | [] | | progress | 0 | | security_groups | default | | status | ACTIVE | | tenant_id | 6653be674ca14e5194dc67bee9362b56 | | updated | 2017-03-04T01:11:40Z | | user_id | abceac91d5e5430697cc3ef3ac0c5814 | +--------------------------------------+----------------------------------------------------------+ [root@controller ~]# nova show Client +--------------------------------------+----------------------------------------------------------+ | Property | Value | +--------------------------------------+----------------------------------------------------------+ | OS-DCF:diskConfig | AUTO | | OS-EXT-AZ:availability_zone | nova | | OS-EXT-SRV-ATTR:host | compute | | OS-EXT-SRV-ATTR:hostname | client | | OS-EXT-SRV-ATTR:hypervisor_hostname | compute | | OS-EXT-SRV-ATTR:instance_name | instance-0000000e | | OS-EXT-SRV-ATTR:kernel_id | | | OS-EXT-SRV-ATTR:launch_index | 0 | | OS-EXT-SRV-ATTR:ramdisk_id | | | OS-EXT-SRV-ATTR:reservation_id | r-6iuwh37v | | OS-EXT-SRV-ATTR:root_device_name | /dev/vda | | OS-EXT-SRV-ATTR:user_data | - | | OS-EXT-STS:power_state | 1 | | OS-EXT-STS:task_state | - | | OS-EXT-STS:vm_state | active | | OS-SRV-USG:launched_at | 2017-03-04T01:17:08.000000 | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | config_drive | | | created | 2017-03-04T01:17:00Z | | demo-net network | 10.0.0.6, 192.168.200.12 | | description | Client | | flavor | Client (5d10b26c-93c6-40f7-a73a-fc5a28d071b1) | | hostId | cfb89d16838d86ee31977e16e7a94eb4e14608486ef337365f329a67 | | host_status | UP | | id | 75e21b8a-a3ab-4e30-a913-afe8be9cb515 | | image | centos_7-x86_64 (8da45136-f4d6-4888-bf7f-79d484949689) | | key_name | - | | locked | False | | metadata | {} | | name | Client | | os-extended-volumes:volumes_attached | [] | | progress | 0 | | security_groups | default | | status | ACTIVE | | tenant_id | 6653be674ca14e5194dc67bee9362b56 | | updated | 2017-03-04T01:17:07Z | | user_id | abceac91d5e5430697cc3ef3ac0c5814 | +--------------------------------------+----------------------------------------------------------+ [root@controller ~]# curl http://192.168.200.10/env/1a5/apps/stacks
[root@controller ~]# |