On the left is my personal micro-letter. If you need further communication, Please add micro-letter. On the right is my public number, Openstack Private Cloud. If you are interested, please pay attention.
After the Openstack deployment and installation, the default tenant network is vxlan, but in actual projects, more tenants use vlan or flat network. Here, in the experimental environment, we simulate how to set up the tenant vlan network in the production environment at the time of installation.
Or use the 3-node experimental environment, using Ocata version, install kolla with one-click installation mirror, complete the following steps:
Note: In case of redeployment, besides performing kolla_ansible destroy, you also need to clear the osd disk partition of ceph and use the fdisk command to clear the partition.
1.Upload file 3 node ,globals.yml file 2.The second hard disk partition of all nodes is labeled: parted /dev/sdb -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP 1 -1 //View the results: parted /dev/sdb print 3.control01 To configure ceph: //Create/etc/kolla/config/ceph.conf: [global] osd pool default size = 3 osd pool default min size = 1 //Add: / etc/kolla/config/neutron-openvswitch-agent/ml2_conf.ini and / etc/kolla/config/neutron-server/ml2_conf.ini files: [root@control01 config]# more ml2_conf.ini [ml2] tenant_network_types = //Because it is a virtualized test environment (VMWare or PVE environment), you need to turn on qemu and add / etc/kolla/config/nova.conf file: [root@control01 config]# more nova.conf [libvirt] virt_type = qemu cpu_mode = none 4.modify/etc/kolla/globals.yml Documents: //The modified configuration is as follows: kolla_base_distro: "centos" kolla_install_type: "source" openstack_release: "4.0.2.1" kolla_internal_vip_address: "192.168.170.160" docker_registry: "192.168.170.150:4000" docker_namespace: "kolla" network_interface: "eth0" neutron_external_interface: "eth1" designate_backend: "bind9" designate_ns_record: "sample.openstack.org" tempest_image_id: tempest_flavor_ref_id: tempest_public_network_id: tempest_floating_network_name: enable_cinder: "yes" enable_haproxy: "yes" enable_neutron_***aas: "yes" enable_neutron_lbaas: "yes" enable_neutron_fwaas: "yes" enable_chrony: "yes" enable_neutron_agent_ha: "yes" //Note that neutron_tenant_network_types: This parameter defaults to vxlan, where we set it to vlan 5.modify /etc/docker/daemon.json ,take insecure-registry Configuration item cancellation 6.Pre-deployment bootstrap-server: /root/kolla-ansible-4.0.3.dev36/tools/kolla-ansible -i 3node bootstrap-servers 7.Pre-deployment inspection: /root/kolla-ansible-4.0.3.dev36/tools/kolla-ansible -i 3node prechecks 8.Deployment: /root/kolla-ansible-4.0.3.dev36/tools/kolla-ansible -i 3node deploy //After execution, check the ml2_conf.ini file and find that tenant_network_types still have vxlan parameters, as follows: [ml2] type_drivers = flat,vlan,vxlan tenant_network_types = vxlan mechanism_drivers = openvswitch,l2population [ml2_type_vlan] network_vlan_ranges = [ml2_type_flat] flat_networks = physnet1 //After modifying tenant_network_types and network_vlan_ranges parameters, the following is done: [ml2] type_drivers = flat,vlan,vxlan tenant_network_types = vlan,flat mechanism_drivers = openvswitch,l2population [ml2_type_vlan] network_vlan_ranges = physnet1 [ml2_type_flat] flat_networks = physnet1 //Then restart the two containers: docker restart neutron_server docker restart neutron_openvswitch_agent 9.Execution after successful deployment post-deploy: /root/kolla-ansible-4.0.3.dev36/tools/kolla-ansible -i 3node post-deploy
Note that I did not execute the init-runonce script here, because the script initializes the configuration in vxlan mode by default. We use vlan mode here, so we initialize the image, network and routing manually. Of course, the quicker way is to modify the init-runonce script to fit the vlan itself.
Download and upload the test mirror cirros, here using the raw format, you can download the qcow2 format, and then convert, specific reference to other materials.
Create instance types:
The key is to create the network and subnetwork of the vlan, and then create the virtual machine in the network of the vlan. Create two network and subnetwork, create virtual machines in these two networks respectively. Create two virtual machines in the same network, test whether the virtual machines in the same vlan's network are accessible, and then test whether the virtual machines across VLAN are accessible. Cross-vlan needs to create a router, and then create a router to connect two vlans.
The test environment is pve, network card can not set trunk mode, can not be tested. There are some shortcomings.