Kolla-ansible 离线部署 多节点 高可用性 queens(ceph baremetal aodh ceilometer gnocchi grafana)

环境

vmware exsi 6.5虚拟平台
centos 7.6
openstack queens版本,三controller节点启用高可用性,三compute节点多挂硬盘复用为ceph的osd,monitoring节点启用ceilometer、aodh数据存至gnocchi,grafana展示。cinder、glance、gnocchi后端存储均为ceph。启用裸金属ironic。
kolla-ansible离线部署


 

机器列表
 

机器名称 IP地址 角色 备注
kolla-ansible-master 10.0.49.130 kolla主机  
controller01 10.0.49.131 controller 所有目标主机均为双网卡,一内一外,对外IP可以不配
controller02 10.0.49.132 controller  
controller03 10.0.49.133 controller  
compute01 10.0.49.134 compute,storage 挂第二个硬盘160G,为ceph的osd
compute02 10.0.49.135 compute,storage 挂第二个硬盘160G,为ceph的osd
compute03 10.0.49.136 compute,storage 挂第二个硬盘160G,为ceph的osd
monitoring01 10.0.49.139 monitoring aodh,ceilometer,gnocchi,grafana
network01 10.0.49.148 network  
  10.0.49.149   VirtualIPAddress

所有主机准备

  1. 配置网卡和主机名

    nmtui
    将目标主机配为上表所示
  2. 关闭防火墙


    systemctl stop firewalld
    systemctl disable firewalld
    vi /etc/selinux/config
    SELINUX=disabled 

  3. 安装docker

    yum update -y
    yum install -y wget vim net-tools
    wget -P /etc/yum.repos.d/ https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
    yum install -y docker-ce
    mkdir -pv /etc/docker
    #修改docker配置使用国内仓库
     vi /etc/docker/daemon.json
    {
        "registry-mirrors": ["http://hub-mirror.c.163.com"]
    }
    systemctl daemon-reload && systemctl enable docker && systemctl restart docker
    #测试docker是够正常运行
    docker run hello-world
     
  4. 修改/etc/hosts
    vim /etc/hosts
     

    10.0.49.130 kolla-ansible-master
    10.0.49.131 controller01
    10.0.49.132 controller02
    10.0.49.133 controller03
    10.0.49.134 compute01
    10.0.49.135 compute02
    10.0.49.136 compute03
    10.0.49.148 network01
    10.0.49.139 monitoring01

  5. 下载安装基本工具
    yum install -y epel-release
    yum install -y python-pip
    pip install -U pip
    yum install -y python-devel libffi-devel gcc openssl-devel libselinux-python git
    yum install -y ansible
    #修改pip源
    mkdir ~/.pip
    vim ~/.pip/pip.conf
    [global] 
    index-url = https://pypi.tuna.tsinghua.edu.cn/simple
    [install]
    trusted-host = https://pypi.tuna.tsinghua.edu.cn

  • 配置各主机间免密登录
    #在各主机依次执行
    ssh-keygen
    ssh-copy-id -i ~/.ssh/id_rsa.pub root@controller01

    #将authorized_key文件发放到各主机的~/.ssh/目录
    scp authorized_keys kolla-ansible-master:~/.ssh/
    scp authorized_keys controller01:~/.ssh/
    scp authorized_keys controller02:~/.ssh/
    scp authorized_keys controller03:~/.ssh/
    scp authorized_keys compute01:~/.ssh/
    scp authorized_keys compute02:~/.ssh/
    scp authorized_keys compute03:~/.ssh/
    scp authorized_keys monitoring01:~/.ssh/
    scp authorized_keys network01:~/.ssh/
     

kolla-ansible-master准备

  1. 下载安装基本工具
    yum install -y epel-release
    yum install -y python-pip
    pip install -U pip

yum install -y yum-utils device-mapper-persistent-data lvm2
yum install -y python-devel libffi-devel gcc openssl-devel libselinux-python git openldap-devel
yum install -y ansible
#修改pip源
mkdir ~/.pip
vim ~/.pip/pip.conf
[global] 
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn

  1. 下载kolla、kolla-ansible

    git clone -b stable/queens https://github.com/openstack/kolla
    git clone -b stable/queens https://github.com/openstack/kolla-ansible
     
  2. 安装kolla-ansible
    # 先预装版本不匹配的包
    pip install -U idna
    pip install -I PyYAML
    # 安装kolla-ansible
    cd kolla-ansible
    pip install .
     
  3. 配置kolla-ansible
    vi /etc/ansible/ansible.cfg
    [defaults]
    host_key_checking=False
    pipelining=True
    forks=100
  4. 配置kolla-ansible-master离线源
    cp -r kolla-ansible/etc/kolla /etc/kolla
    cp kolla-ansible/ansible/inventory/* .
    #编辑/etc/kolla/globals.yml,修改如下部分
    vim /etc/kolla/globals.yml
    kolla_base_distro: "centos"
    kolla_install_type: "source"
    openstack_release: "queens"
    kolla_internal_vip_address: "10.0.49.149"
    network_interface: "ens224"
    neutron_external_interface: "ens192"

    #下拉常用部分镜像
    kolla-ansible pull -vvv

    #再次修改/etc/kolla/globals.yml,打开所有功能

    ...
    # OpenStack services can be enabled or disabled with these options
    enable_aodh: "yes"enable_barbican: "yes"
    enable_blazar: "yes"
    enable_ceilometer: "yes"
    enable_central_logging: "yes"
    enable_ceph: "yes"
    enable_ceph_mds: "yes"
    enable_ceph_rgw: "yes"
    enable_ceph_nfs: "yes"
    enable_chrony: "yes"
    enable_cinder: "yes"
    enable_cinder_backup: "yes"
    enable_cinder_backend_hnas_iscsi: "yes"
    enable_cinder_backend_hnas_nfs: "yes"
    enable_cinder_backend_iscsi: "yes"
    enable_cinder_backend_lvm: "yes"
    enable_cinder_backend_nfs: "yes"
    enable_cloudkitty: "yes"
    enable_collectd: "yes"
    enable_congress: "yes"
    enable_designate: "yes"
    enable_destroy_images: "yes"
    enable_etcd: "yes"
    enable_fluentd: "yes"
    enable_freezer: "yes"
    enable_gnocchi: "yes"
    enable_grafana: "yes"
    enable_haproxy: "yes"
    enable_heat: "yes"
    enable_horizon: "yes"
    enable_horizon_cloudkitty: "{{ enable_cloudkitty | bool }}"
    enable_horizon_designate: "{{ enable_designate | bool }}"
    enable_horizon_freezer: "{{ enable_freezer | bool }}"
    enable_horizon_ironic: "{{ enable_ironic | bool }}"
    enable_horizon_karbor: "{{ enable_karbor | bool }}"
    enable_horizon_magnum: "{{ enable_magnum | bool }}"
    enable_horizon_manila: "{{ enable_manila | bool }}"
    enable_horizon_mistral: "{{ enable_mistral | bool }}"
    enable_horizon_murano: "{{ enable_murano | bool }}"
    enable_horizon_neutron_lbaas: "{{ enable_neutron_lbaas | bool }}"
    enable_horizon_sahara: "{{ enable_sahara | bool }}"
    enable_horizon_searchlight: "{{ enable_searchlight | bool }}"
    enable_horizon_senlin: "{{ enable_senlin | bool }}"
    enable_horizon_solum: "{{ enable_solum | bool }}"
    enable_horizon_tacker: "{{ enable_tacker | bool }}"
    enable_horizon_trove: "{{ enable_trove | bool }}"
    enable_horizon_watcher: "{{ enable_watcher | bool }}"
    enable_horizon_zun: "{{ enable_zun | bool }}"
    enable_hyperv: "yes"
    enable_influxdb: "yes"
    enable_ironic: "yes"
    enable_ironic_pxe_uefi: "yes"
    enable_karbor: "yes"
    enable_kuryr: "yes"
    enable_magnum: "yes"
    enable_manila: "yes"
    enable_manila_backend_generic: "yes"
    enable_manila_backend_hnas: "yes"
    enable_manila_backend_cephfs_native: "yes"
    enable_manila_backend_cephfs_nfs: "yes"
    enable_mistral: "yes"
    enable_mongodb: "yes"
    enable_murano: "yes"
    enable_multipathd: "yes"
    enable_neutron_bgp_dragent: "yes"
    enable_neutron_dvr: "yes"
    enable_neutron_lbaas: "yes"
    enable_neutron_fwaas: "yes"
    enable_neutron_qos: "yes"
    enable_neutron_agent_ha: "yes"
    enable_neutron_aas: "yes"
    enable_neutron_sriov: "yes"
    enable_neutron_sfc: "yes"
    enable_nova_fake: "yes"
    enable_nova_serialconsole_proxy: "yes"
    enable_octavia: "yes"
    enable_opendaylight: "yes"
    enable_openvswitch: "{{ neutron_plugin_agent != 'linuxbridge' }}"
    enable_ovs_dpdk: "no"
    enable_osprofiler: "yes"
    enable_panko: "yes"
    enable_qdrouterd: "yes"
    enable_rally: "yes"
    enable_redis: "yes"
    enable_sahara: "yes"
    enable_searchlight: "yes"
    enable_senlin: "yes"
    enable_skydive: "yes"
    enable_solum: "yes"
    enable_swift: "yes"
    enable_telegraf: "yes"
    enable_tacker: "yes"
    enable_tempest: "yes"
    enable_trove: "yes"
    enable_vitrage: "yes"
    enable_vmtp: "yes"
    enable_watcher: "yes"
    enable_zun: "yes"
     ...
    #再次下拉所有镜像(耗时较长,至少数个小时)
    kolla-ansible pull -vvv
     
  5. 上传镜像到本地registry仓库

    配置Docker共享挂载
    mkdir -p /etc/systemd/system/docker.service.d
    vim /etc/systemd/system/docker.service.d/kolla.conf
    [Service]
    MountFlags=shared

    systemctl daemon-reload && systemctl restart docker && systemctl status docker

    启动registry容器,并将端口映射到4000端口
    docker run -d --name registry --restart=always -p 4000:5000 -v /opt/registry:/var/lib/registry registry:2.6.2

    修改Docker服务配置,信任本地Registry服务
    vim /usr/lib/systemd/system/docker.service
    ExecStart=/usr/bin/dockerd --insecure-registry kolla-ansible-master:4000

    systemctl daemon-reload && systemctl restart docker

    测试registry服务是否正常
    [root@kolla ~]# curl -X GET http://kolla-ansible-master:4000/v2/_catalog
    {"repositories":[]}

    修改镜像tag
    for i in `docker images|grep -v registry|grep -v R||awk '{print $1}'`;do docker image tag $i:queens kolla-ansible-master:4000/$i:queens;done

    push到本地库
    for i in `docker images|grep kolla-ansible-master:4000|awk '{print $1}'`;do docker push $i:queens;done

    查看镜像是否上传成功
    curl -XGET http://kolla-ansible-master:4000/v2/_catalog
    {"repositories":["kolla/centos-source-aodh-api","kolla/centos-source-aodh-evaluator","kolla/centos-source-aodh-listener","kolla/centos-source-aodh-notifier","kolla/centos-source-barbican-api","kolla/centos-source-barbican-keystone-listener","kolla/centos-source-barbican-worker","kolla/centos-source-blazar-api","kolla/centos-source-blazar-manager","kolla/centos-source-ceilometer-central","kolla/centos-source-ceilometer-compute","kolla/centos-source-ceilometer-notification","kolla/centos-source-ceph-mds","kolla/centos-source-ceph-mgr","kolla/centos-source-ceph-mon","kolla/centos-source-ceph-nfs","kolla/centos-source-ceph-osd","kolla/centos-source-ceph-rgw","kolla/centos-source-chrony","kolla/centos-source-cinder-api","kolla/centos-source-cinder-backup","kolla/centos-source-cinder-scheduler","kolla/centos-source-cinder-volume","kolla/centos-source-cloudkitty-api","kolla/centos-source-cloudkitty-processor","kolla/centos-source-collectd","kolla/centos-source-congress-api","kolla/centos-source-congress-datasource","kolla/centos-source-congress-policy-engine","kolla/centos-source-cron","kolla/centos-source-designate-api","kolla/centos-source-designate-backend-bind9","kolla/centos-source-designate-central","kolla/centos-source-designate-mdns","kolla/centos-source-designate-producer","kolla/centos-source-designate-sink","kolla/centos-source-designate-worker","kolla/centos-source-dnsmasq","kolla/centos-source-elasticsearch","kolla/centos-source-etcd","kolla/centos-source-fluentd","kolla/centos-source-freezer-api","kolla/centos-source-glance-api","kolla/centos-source-glance-registry","kolla/centos-source-gnocchi-api","kolla/centos-source-gnocchi-metricd","kolla/centos-source-gnocchi-statsd","kolla/centos-source-grafana","kolla/centos-source-haproxy","kolla/centos-source-heat-api","kolla/centos-source-heat-api-cfn","kolla/centos-source-heat-engine","kolla/centos-source-horizon","kolla/centos-source-influxdb","kolla/centos-source-ironic-api","kolla/centos-source-ironic-conductor","kolla/centos-source-ironic-inspector","kolla/centos-source-ironic-pxe","kolla/centos-source-iscsid","kolla/centos-source-karbor-api","kolla/centos-source-karbor-operationengine","kolla/centos-source-karbor-protection","kolla/centos-source-keepalived","kolla/centos-source-keystone","kolla/centos-source-kibana","kolla/centos-source-kolla-toolbox","kolla/centos-source-kuryr-libnetwork","kolla/centos-source-magnum-api","kolla/centos-source-magnum-conductor","kolla/centos-source-manila-api","kolla/centos-source-manila-data","kolla/centos-source-manila-scheduler","kolla/centos-source-manila-share","kolla/centos-source-mariadb","kolla/centos-source-memcached","kolla/centos-source-mistral-api","kolla/centos-source-mistral-engine","kolla/centos-source-mistral-executor","kolla/centos-source-mongodb","kolla/centos-source-multipathd","kolla/centos-source-murano-api","kolla/centos-source-murano-engine","kolla/centos-source-neutron-bgp-dragent","kolla/centos-source-neutron-dhcp-agent","kolla/centos-source-neutron-l3-agent","kolla/centos-source-neutron-lbaas-agent","kolla/centos-source-neutron-metadata-agent","kolla/centos-source-neutron-openvswitch-agent","kolla/centos-source-neutron-server","kolla/centos-source-neutron-server-opendaylight","kolla/centos-source-neutron-sriov-agent","kolla/centos-source-nova-api","kolla/centos-source-nova-compute","kolla/centos-source-nova-compute-ironic","kolla/centos-source-nova-conductor","kolla/centos-source-nova-consoleauth","kolla/centos-source-nova-libvirt","kolla/centos-source-nova-novncproxy","kolla/centos-source-nova-placement-api","kolla/centos-source-nova-scheduler"]}
  6. 修改globals.yml

    kolla_base_distro: "centos"
    kolla_install_type: "source"
    openstack_release: "queens"
    node_custom_config: "/etc/kolla/config"
    kolla_internal_vip_address: "10.0.49.149"
    docker_registry: "kolla-ansible-master:4000"
    docker_namespace: "kolla"
    network_interface: "ens224"
    neutron_external_interface: "ens192"
    neutron_plugin_agent: "openvswitch"
    enable_aodh: "yes"
    enable_ceilometer: "yes"
    enable_ceph: "yes"
    enable_ceph_rgw: "yes"
    enable_cinder: "yes"
    enable_cinder_backup: "yes"
    enable_gnocchi: "yes"
    enable_grafana: "yes"
    enable_haproxy: "yes"
    enable_heat: "yes"
    enable_ironic: "yes"
    enable_ironic_pxe_uefi: "yes"
    enable_neutron_lbaas: "yes"
    enable_neutron_fwaas: "yes"
    enable_neutron_qos: "yes"
    enable_neutron_aas: "yes"


    详细如链接所示
    globals.yml
  7. 修改mutinode
    详细如链接所示
    multinode

     

准备ceph硬盘
 

在三个计算节点上运行
fdisk -l

...
Disk /dev/sdb: 171.8 GB, 171798691840 bytes, 335544320 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
...

/dev/sdb为第二个硬盘,打上ceph标签

parted /dev/sdb -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP 1 -1
有第三个、第四个盘时依次为/dev/sdc  /dev/sdd等

编辑ceph配置文件

vim /etc/kolla/config/ceph.conf
[global]
osd pool default size = 3
osd pool default min size = 3

若部署失败,开始第二次部署前需删除分区并重打标签
fdisk /dev/sdb

依次按键为 d 2 d w

parted /dev/sdb -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP 1 -1

生成密码

kolla-genpwd

# 生成的文件在/etc/kolla/passwords.yml,修改二行便于使用

vi /etc/kolla/passwords.yml

gnocchi_database_password: abcd@123 #gnocchi数据库密码,便于grafana使用
keystone_admin_password: abcd@123 #OpenStack登录密码

 

部署openstack

#检查 

kolla-ansible -i ./multinode  bootstrap-servers

PLAY RECAP *******************************************************************************************************************************************************************************************************************************************************************
compute01                  : ok=39   changed=7    unreachable=0    failed=0    skipped=19   rescued=0    ignored=0   
compute02                  : ok=39   changed=7    unreachable=0    failed=0    skipped=19   rescued=0    ignored=0   
compute03                  : ok=39   changed=7    unreachable=0    failed=0    skipped=19   rescued=0    ignored=0   
controller01               : ok=39   changed=7    unreachable=0    failed=0    skipped=19   rescued=0    ignored=0   
controller02               : ok=39   changed=7    unreachable=0    failed=0    skipped=19   rescued=0    ignored=0   
controller03               : ok=39   changed=7    unreachable=0    failed=0    skipped=19   rescued=0    ignored=0   
localhost                  : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
monitoring01               : ok=39   changed=7    unreachable=0    failed=0    skipped=19   rescued=0    ignored=0   
network01                  : ok=39   changed=7    unreachable=0    failed=0    skipped=19   rescued=0    ignored=0   

 

kolla-ansible -i ./multinode  prechecks

PLAY RECAP *******************************************************************************************************************************************************************************************************************************************************************
compute01                  : ok=25   changed=1    unreachable=0    failed=0    skipped=60   rescued=0    ignored=0   
compute02                  : ok=25   changed=1    unreachable=0    failed=0    skipped=60   rescued=0    ignored=0   
compute03                  : ok=25   changed=1    unreachable=0    failed=0    skipped=60   rescued=0    ignored=0   
controller01               : ok=37   changed=1    unreachable=0    failed=0    skipped=181  rescued=0    ignored=0   
controller02               : ok=36   changed=1    unreachable=0    failed=0    skipped=175  rescued=0    ignored=0   
controller03               : ok=36   changed=1    unreachable=0    failed=0    skipped=175  rescued=0    ignored=0   
localhost                  : ok=7    changed=1    unreachable=0    failed=0    skipped=12   rescued=0    ignored=0   
monitoring01               : ok=20   changed=1    unreachable=0    failed=0    skipped=38   rescued=0    ignored=0   
network01                  : ok=25   changed=1    unreachable=0    failed=0    skipped=91   rescued=0    ignored=0  

#开始部署

kolla-ansible -i ./multinode deploy

部署成功后可以用虚拟IP地址10.0.49.149登录

#摧毁集群

kolla-ansible destroy -i ./multinode --yes-i-really-really-mean-it

 

Kolla-ansible 离线部署 多节点 高可用性 queens(ceph baremetal aodh ceilometer gnocchi grafana)_第1张图片

Kolla-ansible 离线部署 多节点 高可用性 queens(ceph baremetal aodh ceilometer gnocchi grafana)_第2张图片

#grafana访问 10.0.49.139:3000

Kolla-ansible 离线部署 多节点 高可用性 queens(ceph baremetal aodh ceilometer gnocchi grafana)_第3张图片

 

生成openrc文件

kolla-ansible -i ./multinode post-deploy

#使用文件

source /etc/kolla/admin-openrc.sh

#安装openstack部分客户端

pip install python-openstackclient python-glanceclient python-neutronclient

[root@kolla-ansible-master ~]# openstack network agent list
+--------------------------------------+----------------------+-----------+-------------------+-------+-------+---------------------------+
| ID                                   | Agent Type           | Host      | Availability Zone | Alive | State | Binary                    |
+--------------------------------------+----------------------+-----------+-------------------+-------+-------+---------------------------+
| 306ed9ef-3490-475e-b5b8-f736e337c7e0 | Open vSwitch agent   | compute01 | None              | :-)   | UP    | neutron-openvswitch-agent |
| a88e5126-6a39-4fed-8a50-d5d4f95d87d2 | Metadata agent       | network01 | None              | :-)   | UP    | neutron-metadata-agent    |
| af71ed00-9d85-46ad-9a19-8eb0c11b7ace | Open vSwitch agent   | network01 | None              | :-)   | UP    | neutron-openvswitch-agent |
| d422f3f8-ac9a-44b2-9e88-e87e4027307f | L3 agent             | network01 | nova              | :-)   | UP    | neutron-l3-agent          |
| dad9872f-4a93-4d0c-9bcd-7a20e0e71e3a | Open vSwitch agent   | compute02 | None              | :-)   | UP    | neutron-openvswitch-agent |
| dd0f0c52-3dde-4b28-bc1b-2f46d51892d6 | Loadbalancerv2 agent | network01 | None              | :-)   | UP    | neutron-lbaasv2-agent     |
| f0ec8c06-18a8-45f4-9ac0-4b6c19fdb306 | DHCP agent           | network01 | nova              | :-)   | UP    | neutron-dhcp-agent        |
| f770b237-cdb1-4d39-9d3e-27352c772a2e | Open vSwitch agent   | compute03 | None              | :-)   | UP    | neutron-openvswitch-agent |
+--------------------------------------+----------------------+-----------+-------------------+-------+-------+---------------------------+
 

[root@kolla-ansible-master ~]# gnocchi resource-type list
+----------------------------+---------------------------------------------------------------------------------------+
| name                       | attributes                                                                            |
+----------------------------+---------------------------------------------------------------------------------------+
| ceph_account               |                                                                                       |
| generic                    |                                                                                       |
| host                       | - host_name: min_length: 0 , max_length: 255 , type: string , required: True          |
| host_disk                  | - host_name: min_length: 0 , max_length: 255 , type: string , required: True          |
|                            | - device_name: min_length: 0 , max_length: 255 , type: string , required: False       |
| host_network_interface     | - host_name: min_length: 0 , max_length: 255 , type: string , required: True          |
|                            | - device_name: min_length: 0 , max_length: 255 , type: string , required: False       |
| identity                   |                                                                                       |
| image                      | - container_format: min_length: 0 , max_length: 255 , type: string , required: True   |
|                            | - disk_format: min_length: 0 , max_length: 255 , type: string , required: True        |
|                            | - name: min_length: 0 , max_length: 255 , type: string , required: True               |
| instance                   | - display_name: min_length: 0 , max_length: 255 , type: string , required: True       |
|                            | - host: min_length: 0 , max_length: 255 , type: string , required: True               |
|                            | - image_ref: min_length: 0 , max_length: 255 , type: string , required: False         |
|                            | - flavor_name: min_length: 0 , max_length: 255 , type: string , required: True        |
|                            | - server_group: min_length: 0 , max_length: 255 , type: string , required: False      |
|                            | - flavor_id: min_length: 0 , max_length: 255 , type: string , required: True          |
| instance_disk              | - instance_id: required: True , type: uuid                                            |
|                            | - name: min_length: 0 , max_length: 255 , type: string , required: True               |
| instance_network_interface | - instance_id: required: True , type: uuid                                            |
|                            | - name: min_length: 0 , max_length: 255 , type: string , required: True               |
| ipmi                       |                                                                                       |
| manila_share               | - status: min_length: 0 , max_length: 255 , type: string , required: True             |
|                            | - host: min_length: 0 , max_length: 255 , type: string , required: True               |
|                            | - protocol: min_length: 0 , max_length: 255 , type: string , required: False          |
|                            | - name: min_length: 0 , max_length: 255 , type: string , required: False              |
|                            | - availability_zone: min_length: 0 , max_length: 255 , type: string , required: False |
| network                    |                                                                                       |
| nova_compute               | - host_name: min_length: 0 , max_length: 255 , type: string , required: True          |
| port                       | - controller: min_length: 0 , max_length: 255 , type: string , required: True         |
| stack                      |                                                                                       |
| swift_account              |                                                                                       |
| switch                     | - controller: min_length: 0 , max_length: 255 , type: string , required: True         |
| switch_port                | - neutron_port_id: min_length: 0 , max_length: 255 , type: string , required: False   |
|                            | - port_number_on_switch: max: 4294967295 , required: False , type: number , min: 0    |
|                            | - switch: min_length: 0 , max_length: 64 , type: string , required: True              |
|                            | - controller: min_length: 0 , max_length: 255 , type: string , required: True         |
| switch_table               | - switch: min_length: 0 , max_length: 64 , type: string , required: True              |
|                            | - controller: min_length: 0 , max_length: 255 , type: string , required: True         |
| volume                     | - display_name: min_length: 0 , max_length: 255 , type: string , required: False      |
|                            | - volume_type: min_length: 0 , max_length: 255 , type: string , required: False       |
| volume_provider            |                                                                                       |
| volume_provider_pool       | - provider: min_length: 0 , max_length: 255 , type: string , required: True           |
+----------------------------+---------------------------------------------------------------------------------------+
 

 

 

初始化openstack环境

#修改初始文件

vim /usr/share/kolla-ansible/init-runonce

#配置公网浮动网段
# This EXT_NET_CIDR is your public network,that you want to connect to the internet via.
EXT_NET_CIDR='10.0.53.0/24'
EXT_NET_RANGE='start=10.0.53.150,end=10.0.53.199'
EXT_NET_GATEWAY='10.0.53.1'

#修改演示内网为实际所需
openstack network create --provider-network-type vxlan demo-net
openstack subnet create --subnet-range 192.168.1.0/24 --network demo-net \
    --gateway 192.168.1.1 --dns-nameserver 60.191.134.196  demo-subnet
 

#初始化

/usr/share/kolla-ansible/init-runonce

 

遇到的问题

  1. 部署成功后neutron 创建网络失败
    经检查,controller与network节点复用,并启用haproxy的情况下neutron无法正常工作,将network移至独立节点后正常。
  2. 部署成功后glance没有访问权限
    因后端存储启用了ceph,所以需要启用enable_ceph_rgw_keystone,启用后访问正常。
  3. 部署成功后horizon无法登录
    因为使用了cloudkitty组件,而cloudkittyclient 7.0可能有bug,关闭此组件后登录正常
    https://bugs.launchpad.net/kolla-ansible/+bug/1787014
     
  4. 开启裸金属服务的情况下,无法使用linuxbridge,并自动启用vlan网络
  5. 集群运行中若断电重启后,controller节点容器会不断重启,不能自动变为正常状态,不知是何原因,还在排查中。

 

你可能感兴趣的:(监控计费数据,高可用性,openstack)