zoukankan      html  css  js  c++  java
  • openstack测试集群扩容配置

    以计算节点10.152.3.14为例

    修改所有节点上/etc/hosts文件

    修改hostname文件

    [root@compute-3-14 ~]# hostname

    compute-3-14.dev01-gonn0101.bj-cn.vps.gmfcloud.com

    安装gome   yum源

    rpm -ivh http://10.143.50.200:8080/Files/rpmbuild/gomerepo-1.0.0-1.x86_64.rpm 

    gomerepo init

    gomerepo enable openstack_newton

    gomerepo enable ovirt

    安装rpm包

    openstack-neutron-common-9.1.1-1.el7.noarch

    openstack-neutron-openvswitch-9.1.1-1.el7.noarch

    openstack-neutron-9.1.1-1.el7.noarch

    openstack-neutron-ml2-9.1.1-1.el7.noarch

    openstack-nova-compute-14.0.2-1.el7.noarch

    openstack-nova-common-14.0.2-1.el7.noarch

    openstack-utils-2016.1-1.el7.noarch

    qemu-kvm-ev-2.6.0-27.1.el7.x86_64

    配置文件

      1 [DEFAULT]
      2 my_ip = 10.152.3.14
      3 log_dir = /var/log/nova
      4 auth_strategy = keystone
      5 debug = false
      6 workers = 40
      7 multi_host = true
      8 state_path = /data/openstack/nova
      9 allow_resize_to_same_host = true
     10 resume_guests_state_on_host_boot = true
     11 virt_type = kvm
     12 cpu_allocation_ratio = 3.0
     13 ram_allocation_ratio = 1.2
     14 disk_allocation_ratio = 1.0
     15 max_instances_per_host = 25
     16 instance_usage_audit = True
     17 instance_usage_audit_period = hour
     18 notify_on_state_change = vm_and_task_state
     19 enabled_apis = osapi_compute,metadata
     20 running_deleted_instance_action = reap
     21 multi_instance_display_name_template = %(name)s-%(count)s
     22 scheduler_driver = nova.scheduler.filter_scheduler.FilterScheduler
     23 #vcpu_pin_set = 8-39
     24 #console_allowed_origins =
     25 scheduler_default_filters = RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NumInstancesFilter
     26 firewall_driver = nova.virt.firewall.NoopFirewallDriver
     27 use_neutron = true
     28 osapi_compute_listen = 10.152.3.14
     29 osapi_compute_listen_port = 8774
     30 metadata_listen = 10.152.3.14
     31 metadata_listen_port = 8775
     32 default_log_levels = amqplib=WARN,sqlalchemy=WARN,boto=WARN,suds=INFO,qpid.messaging=INFO,iso8601.iso8601=INFO
     33 memcached_servers = controller-3-28:11211,controller-3-29:11211
     34 rpc_backend = rabbit
     35 network_api_class = nova.network.neutronv2.api.API
     36 linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
     37 neutron_admin_tenant_name = service
     38 neutron_auth_strategy = keystone
     39 security_group_api = neutron
     40 firewall_driver = nova.virt.firewall.NoopFirewallDriver
     41 force_config_drive = true
     42 # config_drive_skip_versions =
     43 flat_injected = True
     44 use_syslog = false
     45 use_stderr = false
     46 osapi_max_limit = 5000
     47 [api_database]
     48 connection = mysql+pymysql://nova:QVcQ6QJ0Pn1a@mysqlserver/nova_api
     49 max_pool_size = 100
     50 max_overflow = 200
     51 [barbican]
     52 [cache]
     53 [cells]
     54 [cinder]
     55 [cloudpipe]
     56 [conductor]
     57 [cors]
     58 [cors.subdomain]
     59 [crypto]
     60 [database]
     61 connection = mysql+pymysql://nova:QVcQ6QJ0Pn1a@mysqlserver/nova
     62 max_pool_size = 100
     63 max_overflow = 200
     64 [ephemeral_storage_encryption]
     65 [glance]
     66 api_servers = http://bj-cn.vps.gmfcloud.com:9292
     67 [guestfs]
     68 [hyperv]
     69 config_drive_cdrom = true
     70 # config_drive_inject_password = true
     71 [image_file_url]
     72 [ironic]
     73 [key_manager]
     74 [keystone_authtoken]
     75 auth_uri = http://bj-cn.vps.gmfcloud.com:5000/v3
     76 auth_url = http://bj-cn.vps.gmfcloud.com:35357/v3
     77 auth_type = password
     78 project_domain_name = default
     79 user_domain_name = default
     80 project_name = service
     81 username = nova
     82 password = newnovapass
     83 [libvirt]
     84 [matchmaker_redis]
     85 [metrics]
     86 [mks]
     87 [neutron]
     88 url = http://bj-cn.vps.gmfcloud.com:9696
     89 auth_uri = http://bj-cn.vps.gmfcloud.com:5000/v3
     90 auth_url = http://bj-cn.vps.gmfcloud.com:35357/v3
     91 auth_type = password
     92 project_domain_name = default
     93 user_domain_name = default
     94 region_name = RegionOne
     95 project_name = service
     96 username = neutron
     97 password = newneutronpass
     98 service_metadata_proxy = false
     99 [osapi_v21]
    100 [oslo_concurrency]
    101 lock_path = /var/lib/nova/tmp
    102 [oslo_messaging_amqp]
    103 [oslo_messaging_notifications]
    104 [oslo_messaging_rabbit]
    105 rabbit_hosts = controller-3-28:5672,controller-3-29:5672
    106 rabbit_ha_queues = true
    107 rabbit_userid = openstack
    108 rabbit_password = h1Zg3IvdIiCx
    109 heartbeat_timeout_threshold = 0
    110 rabbit_max_retries = 3
    111 [oslo_messaging_zmq]
    112 [oslo_middleware]
    113 [oslo_policy]
    114 [placement]
    115 [placement_database]
    116 [rdp]
    117 [remote_debug]
    118 [serial_console]
    119 [spice]
    120 [ssl]
    121 [trusted_computing]
    122 [upgrade_levels]
    123 [vmware]
    124 [vnc]
    125 novncproxy_base_url=http://10.152.3.1:6080/vnc_auto.html
    126 novncproxy_host = 10.152.3.14
    127 vncserver_listen = 10.152.3.14
    128 vncserver_proxyclient_address = 10.152.3.14
    129 novncproxy_port = 6080
    130 [workarounds]
    131 [wsgi]
    132 [xenserver]
    133 [xvp]
    /etc/nova/nova.conf
     1 [DEFAULT]
     2 bind_host = 10.152.3.14
     3 bind_port = 9696
     4 core_plugin = ml2
     5 debug = false
     6 use_syslog = false
     7 log_dir = /var/log/neutron
     8 service_plugins = router,metering
     9 auth_strategy = keystone
    10 base_mac = fa:16:3f:00:00:00
    11 allow_overlapping_ips = true
    12 mac_generation_retries = 16
    13 auth_strategy = keystone
    14 notify_nova_on_port_status_changes = true
    15 notify_nova_on_port_data_changes = true
    16 notification_driver = neutron.openstack.common.notifier.rpc_notifier
    17 rpc_backend = rabbit
    18 agent_down_time = 75
    19 api_workers = 40
    20 rpc_workers = 40
    21 send_events_interval = 2
    22 [agent]
    23 check_child_processes_interval = 30
    24 check_child_processes_action = respawn
    25 [cors]
    26 [cors.subdomain]
    27 [database]
    28 connection = mysql+pymysql://neutron:Ol1fBhLMCFr7@mysqlserver/neutron
    29 max_pool_size = 150
    30 max_overflow = 300
    31 [keystone_authtoken]
    32 auth_uri = http://bj-cn.vps.gmfcloud.com:5000/v3
    33 auth_url = http://bj-cn.vps.gmfcloud.com:35357/v3
    34 memcached_servers = controller-3-28:11211,controller-3-29:11211
    35 auth_type = password
    36 project_domain_name = default
    37 user_domain_name = default
    38 project_name = service
    39 username = neutron
    40 password = newneutronpass
    41 [matchmaker_redis]
    42 [nova]
    43 url = http://bj-cn.vps.gmfcloud.com:8774/v2.1
    44 auth_uri = http://bj-cn.vps.gmfcloud.com:5000/v3
    45 auth_url = http://bj-cn.vps.gmfcloud.com:35357/v3
    46 auth_type = password
    47 project_domain_name = default
    48 user_domain_name = default
    49 region_name = RegionOne
    50 project_name = service
    51 username = nova
    52 password = newnovapass
    53 [oslo_concurrency]
    54 lock_path = /var/lib/neutron/tmp
    55 [oslo_messaging_amqp]
    56 [oslo_messaging_notifications]
    57 [oslo_messaging_rabbit]
    58 rabbit_hosts=controller-3-28:5672,controller-3-29:5672
    59 rabbit_ha_queues=true
    60 rabbit_userid = openstack
    61 rabbit_password = h1Zg3IvdIiCx
    62 heartbeat_timeout_threshold=0
    63 rabbit_max_retries=2
    64 [oslo_messaging_zmq]
    65 [oslo_middleware]
    66 [oslo_policy]
    67 [qos]
    68 [quotas]
    69 [ssl]
    /etc/neutron/neutron.conf
     1 [DEFAULT]
     2 [ml2]
     3 type_drivers = vlan
     4 tenant_network_types = vlan
     5 mechanism_drivers = openvswitch
     6 [ml2_type_flat]
     7 flat_networks = physnet1
     8 [ml2_type_geneve]
     9 [ml2_type_gre]
    10 [ml2_type_vlan]
    11 network_vlan_ranges = physnet1:1:4000
    12 [ml2_type_vxlan]
    13 [securitygroup]
    14 enable_security_group = false
    15 firewall_driver = neutron.agent.firewall.NoopFirewallDriver
    /etc/neutron/plugins/ml2/ml2_conf.ini
    1 [DEFAULT]
    2 [agent]
    3 prevent_arp_spoofing = false
    4 [ovs]
    5 bridge_mappings = physnet1:br-bond0
    6 [securitygroup]
    7 enable_security_group = false
    /etc/neutron/plugins/ml2/openvswitch_agent.ini

    拷贝key文件

    scp -r root@10.152.3.25:/var/lib/nova/.ssh /var/lib/nova/

    更改权限

    chown -R nova:nova /var/lib/nova/.ssh
    修改passwd文件[root@compute-3-14 ~]# cat /etc/passwd|grep nova
    nova:x:162:162:OpenStack Nova Daemons:/var/lib/nova:/bin/bash

    确保可以切换nova用户

    su - nova

    设置开机启动

    systemctl enable openstack-nova-compute.service neutron-openvswitch-agent.service openvswitch.service

    启动服务

    systemctl start openstack-nova-compute.service neutron-openvswitch-agent.service openvswitch.service

    设置
    ovs-vsctl show
    ovs-vsctl add-br br-int
    ovs-vsctl add-br br-bond0
    ovs-vsctl add-port br-bond0 bond0

    创建openstack目录并拷贝nova文件
    mkdir -p /data/openstack ; cp -a /var/lib/nova /data/openstack/

    更改文件bug(修复创建机器后不挂在盘,没有更改网络主机名等)
    cat /usr/lib/python2.7/site-packages/nova/virt/interfaces.template > /usr/share/nova/interfaces.template
    systemctl restart openstack-nova-compute.service

    重启计算节点

    reboot

  • 相关阅读:
    python连接SMTP的TLS(587端口)发邮件python发邮件(带认证,587端口)202010
    JAVA抓取通过JS渲染的网站(动态)网页数据
    moviepy音视频剪辑:与大小相关的视频变换函数详解
    区块链知识博文1: 共识算法之争(PBFT,Raft,PoW,PoS,DPoS,Ripple)
    MoviePy v2.0.0.dev1尚不成熟,不建议大家使用
    区块链学习2:一些概念性的基础知识笔记
    老猿学5G:3GPP 5G规范中的URI资源概念
    区块链学习1:Merkle树(默克尔树)和Merkle根
    老猿Python博客文章目录索引
    老猿学5G:融合计费场景的Nchf_ConvergedCharging_Create、Update和Release融合计费消息交互过程
  • 原文地址:https://www.cnblogs.com/openstack-elk/p/6678187.html
Copyright © 2011-2022 走看看