[rdo-dev] OpenStack on CentOS 8 VM using packstack

Pradeep Antil pradeepantil at gmail.com
Sat Jun 27 02:49:13 UTC 2020


 Hi YATIN,

Thanks for the help.

I manage to install single node Openstack on CentOS 8 by disablings
Network-Manager and enabling native network-scripts.

Below is the URL:

https://www.linuxtechi.com/install-openstack-centos-8-with-packstack/


On Fri, Jun 26, 2020 at 9:16 PM YATIN KAREL <yatinkarel at gmail.com> wrote:

> Hi Pradeep,
>
> On Sun, Jun 21, 2020 at 6:22 PM Pradeep Antil <pradeepantil at gmail.com>
> wrote:
>
>> Hi Techies,
>>
>> I am trying to deploy the latest Openstack "ussuri" on CentOS 8 VM using
>> packstack.  I have successfully installed it but the issue is that i want
>> to i want to add my interface "enp0s3" to ovs bridge br-ex. On CentOS 7 we
>> can do this via ifcfg-* files using network-scripts.
>>
>
> Yes in CentOS8 network-script is not installed/enabled by default. So to
> manage ovs bridges you either need to install/enable network-scripts or
> manage bridges with NetworkManager via nmcli or other tools.
>
>>
>> But i am not sure how this can be done on CentOS 8 VM as in this release
>> network is controlled via network manager. On br-ex i will attach an
>> external provider network or a flat network.
>>
>
> I have pushed some fixes to doc[1] and packstack[2] to have bridges work
> with network-scripts and remove Network Manager warning.
> [1] https://github.com/redhat-openstack/website/pull/1388
> [2] https://review.opendev.org/738223
>
>>
>> [image: image.png]
>>
>> I have referred the below steps for the deployment.
>>
>> dnf update -y
>> dnf config-manager --enable PowerTools
>> dnf install -y centos-release-openstack-ussuri
>> dnf update -y
>> dnf install -y openstack-packstack
>> reboot
>> packstack --gen-answer-file=/root/answer.txt
>>
>> Edit answer file
>>
>> CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vxlan,flat
>> CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vxlan
>> CONFIG_PROVISION_DEMO=n
>> CONFIG_KEYSTONE_ADMIN_PW=P at ssw0rd
>> packstack  --answer-file=/root/answer.txt
>>
>>
> Following is the output of ovs command and interfaces on my centos 8
>> system
>>
>> [image: image.png]
>>
>>
>> If you like to manage ovs bridges with Network Manager you can try below
> steps:-
>
> # Install and Enable ovs plugin for NetworkManager
> sudo dnf install -y NetworkManager-ovs
> sudo systemctl restart NetworkManager
>
> # Discover network configs for external interface
> export IP=`ip r get 1.1.1.1 | awk '/dev/{print $7}' | tr -d '[[:space:]]'`
> export NETMASK=`ip route show | grep $IP |cut -d" " -f1|cut -d"/" -f2 |tr
> -d '[[:space:]]'`
> # We need the gateway as we'll be reconfiguring the interface
> export GATEWAY=`ip r get 1.1.1.1 | awk '/dev/{print $3}' | tr -d
> '[[:space:]]'`
> export MAC=`ip a show enp0s3|grep link/ether|awk '{print $2}' | tr -d
> '[[:space:]]'`
>
> # Delete ovs bridge created outside of NetworkManager
> sudo ovs-vsctl del-br br-ex
>
> sudo nmcli conn add type ovs-bridge conn.interface br-ex
> sudo nmcli conn add type ovs-port conn.interface port0 master br-ex
> sudo nmcli conn add type ovs-interface slave-type ovs-port conn.interface
> br-ex  master port0 ipv4.method manual ipv4.address $IP/$NETMASK
> ipv4.gateway $GATEWAY ipv4.dns 8.8.8.8
>
> # This do no't persist after reboot
> sudo ovs-vsctl set bridge br-ex other-config:hwaddr=$MAC
>
> sudo nmcli conn add type ovs-port conn.interface port1 master br-ex
> sudo nmcli conn add type ethernet conn.interface enp0s3 master port1
>
> sudo nmcli conn up ovs-slave-enp0s3
>
>
> # to persist mac on ovs bridge with reboots
> sudo tee /etc/NetworkManager/dispatcher.d/25-ovs-br-ex <<EOF
> #!/bin/sh
> # This is a NetworkManager dispatcher / networkd-dispatcher script for
> # ovs to set mac address for slave
>
> # For NetworkManager consider only up/down events
> [ 0 -ge 2 ] && [ "" != "up" ] && exit 0
>
> if [ "\$DEVICE_IFACE" == "br-ex" ]; then
> export MAC=\$(ip a show enp0s3|grep link/ether|awk '{print \$2}' | tr -d
> '[[:space:]]')
> ovs-vsctl set bridge br-ex other-config:hwaddr=\$MAC
> fi
>
> exit 0
> EOF
> sudo chmod +x /etc/NetworkManager/dispatcher.d/25-ovs-br-ex
>
>
> Ensure you have console access to the packstack vm as in case of wrong
> network config ssh connection will be lost.
>
> --
>> Best Regards
>> Pradeep Kumar
>> _______________________________________________
>> dev mailing list
>> dev at lists.rdoproject.org
>> http://lists.rdoproject.org/mailman/listinfo/dev
>>
>> To unsubscribe: dev-unsubscribe at lists.rdoproject.org
>>
>
>
> Thanks and Regards
> Yatin Karel
>


-- 
Best Regards
Pradeep Kumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rdoproject.org/pipermail/dev/attachments/20200627/332d6bb1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 74507 bytes
Desc: not available
URL: <http://lists.rdoproject.org/pipermail/dev/attachments/20200627/332d6bb1/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 59896 bytes
Desc: not available
URL: <http://lists.rdoproject.org/pipermail/dev/attachments/20200627/332d6bb1/attachment-0003.png>


More information about the dev mailing list