Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# this can be used for non-ovn i.e ml2/ovs based deployment as well.
curl -o rhos-release-latest.noarch.rpm http://download-node-02.eng.bos.redhat.com/rcm-guest/puddles/OpenStack/rhos-release/rhos-release-latest.noarch.rpm
yum install -y rhos-release-latest.noarch.rpm
rhos-release --help
rhos-release 13-director -p passed_phase2
yum update -y; reboot
=======================================
yum install tmux -y
tmux new -s osp
useradd stack
passwd stack
echo "stack ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/stack
chmod 0440 /etc/sudoers.d/stack
su - stack
mkdir ~/images
mkdir ~/templates
# update hostname in /etc/hosts and /etc/hostname
sudo yum install -y python-tripleoclient
cp /usr/share/instack-undercloud/undercloud.conf.sample ~/undercloud.conf
# update local_interface and ntp servers in undercloud.conf
# local_interface = em2
# undercloud_ntp_servers = clock.redhat.com
openstack undercloud install
===============================
source ~/stackrc
sudo yum install rhosp-director-images rhosp-director-images-ipa
cd ~/images
for i in /usr/share/rhosp-director-images/overcloud-full-latest-13.0.tar /usr/share/rhosp-director-images/ironic-python-agent-latest-13.0.tar; do tar -xvf $i; done
openstack overcloud image upload --image-path /home/stack/images/
openstack image list
cat /etc/resolv.conf
openstack subnet list
openstack subnet set --dns-nameserver 10.11.5.19 --dns-nameserver 10.10.160.2 --dns-nameserver 10.5.30.160 aa3c59e3-7239-4696-bb41-1fcda1de777b
vi ~/instackenv.json
openstack overcloud node import ~/instackenv.json
openstack overcloud node introspect --all-manageable --provide
# note while preparing nic-configs/controller.yaml and compute.yaml. In osp14 we have new ExternalInterfaceDefaultRoute paramters
# also change get_file to complete path in osp14 like below in these files
# get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
# prepare network-environment.yaml templates/nic-configs/controller.yaml compute.yaml
# Before below command add brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888 to /etc/sysconfig/docker
cat /etc/sysconfig/docker
#INSECURE_REGISTRY='--insecure-registry 192.168.24.1:8787 --insecure-registry 192.168.24.3:8787 --insecure-registry docker-registry.engineering.redhat.com --insecure-registry 192.168.24.1:8787 --insecure-registry brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888'
# otherwise will get this error - "docker pull failed: Get https://brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/v1/_ping: http: server gave HTTP response to HTTPS client" for 'openstack tripleo container image prepare' command
sudo systemctl restart docker
Use these nic configs https://github.com/venkataanil/nic-configs/tree/master/nic-configs_ovn_osp13_scalelab_r630/nic-configs
# for non ovn based deployments i.e ml2/ovs, remove neutron-ovn-ha.yaml from "openstack overcloud container image prepare" and "openstack overcloud deploy" commands
openstack overcloud container image prepare \
--environment-file=/usr/share/openstack-tripleo-heat-templates/environments/services/neutron-ovn-dvr-ha.yaml \
--namespace=docker-registry.engineering.redhat.com/rhosp13 \
--push-destination=192.168.24.1:8787 \
--prefix=openstack- \
--tag=latest \
--output-env-file=/home/stack/templates/overcloud_images.yaml \
--output-images-file /home/stack/local_registry_images.yaml
sudo openstack overcloud container image upload --config-file /home/stack/local_registry_images.yaml --verbose
ip a a 10.0.0.1/16 brd 10.0.255.255 dev em3 <i.e interface which is added to br-ex in nic-configs controller.yml>
# note: if above ip is not set then below deployment will fail at ping validations
# most of the time above non-vlan based address add is sufficient. But some times when external network is valn based( external network shares interface with internal/tenant/stroage/storagemgmt/ctlplane network using vlans in nic-configs i.e external network is configured with vlans, then you need to add vlan interface on undercloud like below 3 steps).
# ovs-vsctl add-port br-ctlplane vlan10 tag=10 -- set interface vlan10 type=internal
# ip a a 10.0.0.1/16 brd 10.0.255.255 dev vlan10
# ip l set vlan10 up
# don't try adding tap interface and then adding this tap to br-ctlpane with vlan tag, that doesn't work.
# non ovs based
# sudo ip link add link em1 name em1.10 type vlan id 10
# sudo ip link set dev em1.10 up
# sudo ip a a 10.0.0.1/16 brd 10.0.255.255 dev em1.10
cp /usr/share/openstack-tripleo-heat-templates/roles_data.yaml /home/stack
vi /home/stack/roles_data.yaml
# And add below External network related stuff to compute role ( this is needed for dvr ha)
- name: Compute
description: |
Basic Compute Node role
networks:
- External
default_route_networks: ['External']
openstack overcloud deploy --templates -r /home/stack/roles_data.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml -e /home/stack/nic-configs/network-environment.yaml -e /home/stack/templates/overcloud_images.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/disable-telemetry.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/services/neutron-ovn-dvr-ha.yaml --control-scale 3 --compute-scale 3 --ntp-server clock.redhat.com 2>&1 | tee deploy_ovn_dvr_ha1.log
ml2/ovs dvr
---
(undercloud) [stack@f27-h32-000-r630 ~]$ cat container_prepare.sh
openstack overcloud container image prepare \
--environment-file=/usr/share/openstack-tripleo-heat-templates/environments/services/neutron-ovs-dvr.yaml \
--namespace=docker-registry.engineering.redhat.com/rhosp13 \
--push-destination=192.168.24.1:8787 \
--prefix=openstack- \
--tag=latest \
--output-env-file=/home/stack/templates/overcloud_images.yaml \
--output-images-file /home/stack/local_registry_images.yaml
sudo openstack overcloud container image upload --config-file /home/stack/local_registry_images.yaml --verbose
openstack overcloud deploy --templates -r /home/stack/roles_data.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml -e /home/stack/nic-configs/network-environment.yaml -e /home/stack/templates/overcloud_images.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/disable-telemetry.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/services/neutron-ovs-dvr.yaml --control-scale 3 --compute-scale 3 --ntp-server clock.redhat.com 2>&1 | tee deploy_ovs_dvr_ha1.log
# creating external network
openstack network create --external --default --provider-network-type flat --provider-physical-network datacentre --share external
neutron subnet-create --gateway 10.0.0.1 --allocation-pool start=10.0.1.1,end=10.0.255.254 --disable-dhcp external 10.0.0.0/16
# openstack network create --external --default --provider-network-type vlan --provider-segment 10 --provider-physical-network datacentre --share external
git clone https://github.com/openstack/browbeat.git
cd browbeat/ansible
./generate_tripleo_hostfile.sh -l
edit ansible/install/group_vars/all.yml
dns_server: 10.1.32.3 (take first entry from undercloud /etc/resolv.conf)
collectd_compute: true
iostat_controller_collectd_plugin: true
rabbitmq_controller_collectd_plugin: true
graphite_host: norton.perf.lab.eng.rdu2.redhat.com
graphite_prefix: ovn_dvr_osp13_2_11
grafana_host: norton.perf.lab.eng.rdu2.redhat.com
grafana_password: 100yard-
grafana_apikey: eyJrIjoiSVpNMkZxb2pVMFlYbk1BNno3enhhRWxwbmN2YkhYWloiLCJuIjoic2FpLWFkbWluIiwiaWQiOjF9
ansible-playbook -i hosts install/browbeat.yml
ansible-playbook -i hosts install/collectd-openstack.yml
Edit browbeat-config.yaml
browbeat:
cloud_name: ovn_osp13_2_11
elasticsearch:
enabled: true
host: elk-b09-h30-r720xd.rdu.openstack.engineering.redhat.com
#rally in debug mode
vi ./.rally-venv/etc/rally/rally.conf
debug = true
flush arp cache in undercloud
arp -na
ip -s -s neigh flush all
cat ./.rally-venv/lib/python2.7/site-packages/rally_openstack/cfg/nova.py
cat ./.rally-venv/lib/python2.7/site-packages/rally_openstack/cfg/vm.py
change vm_ping_timeout to 240 secs
#open new tmux window and take tcpdump
sudo tcpdump -vvv -n -e -i em4 arp or icmp -w ping500vms.pcap
on each node,
ovs-vsctl set open . external_ids:ovn-openflow-probe-interval=180
ovs-vsctl set open . external_ids:ovn-remote-probe-interval=180000
cd ~/browbeat
source .browbeat-venv/bin/activate
./browbeat.py -s <neutron.yaml> rally --debug
==============================
Deleting overcloud to rerun "overcloud deploy" command
openstack stack delete overcloud -y --wait
swift delete overcloud
===================================
source overcloudrc
neutron net-create public --provider:network_type vlan --router:external true --provider:physical_network datacentre --provider:segmentation_id 10 --shared
neutron subnet-create --name subnet-public public 10.0.0.0/24 --enable-dhcp --gateway 10.0.0.1
openstack router create router1
openstack router set router1 --external-gateway public
openstack network create private
openstack subnet create --network private --subnet-range 20.0.0.0/24 private
openstack router add subnet router1 private
wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
openstack image create "cirros" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --public;
openstack flavor create --vcpus 1 --ram 64 --disk 1 m1.nano
# delete all security groups
openstack security group delete <security group id>
openstack security group create sg1
openstack security group rule create --proto icmp sg1
openstack security group rule create 3401b115-e009-453d-a4ab-5b1bd7d0acec --protocol tcp --dst-port 22:22 --remote-ip 0.0.0.0/0
openstack server create --image ba1ce07c-0ceb-4b59-9ffb-6892a34e9ca0 --nic net-id=c6761f4c-5342-4b80-a6ba-7c25ab4ceb03 --flavor m1.nano --security-group 92b60acc-2dc8-4407-aae5-419a2b767bb7 vm1
openstack floating ip create public
openstack server add floating ip vm1 98e7179e-b317-4e42-8d4f-33ace7c149a1
============= deletion============
openstack floating ip delete a07080bd-d750-414e-a7df-c83811bf5b54
nova delete vm1
openstack security group delete <security group id>
manually patch OVS in (all) nodes
[heat-admin@overcloud-controller-2 ~]$ ls
openvswitch2.11-2.11.0-24.el7fdp.x86_64.rpm python-rhosp-openvswitch-2.11-0.1.el7ost.noarch.rpm
python-openvswitch2.11-2.11.0-24.el7fdp.x86_64.rpm rhosp-openvswitch-2.11-0.1.el7ost.noarch.rpm
curl -L -O http://download.eng.bos.redhat.com/brewroot/vol/rhel-7/packages/openvswitch2.11/2.11.0/24.el7fdp/x86_64/python-openvswitch2.11-2.11.0-24.el7fdp.x86_64.rpm
sudo yum install rhosp-openvswitch-2.11-0.1.el7ost.noarch.rpm python-rhosp-openvswitch-2.11-0.1.el7ost.noarch.rpm -y openvswitch2.11-2.11.0-24.el7fdp.x86_64.rpm python-openvswitch2.11-2.11.0-24.el7fdp.x86_64.rpm
sudo systemctl restart openvswitch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.