Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
curl -o rhos-release-latest.noarch.rpm
yum install -y rhos-release-latest.noarch.rpm
rhos-release --help
rhos-release 14-director -p passed_phase2
yum update -y; reboot
sudo yum install git gcc libffi-devel openssl-devel python-virtualenv libselinux-python tmux -y
#install kvm and libvirt
sudo yum install qemu-kvm libvirt libvirt-python libguestfs-tools virt-install -y
sudo yum install libguestfs libguestfs-tools-c libguestfs-tools-xfs python-lxml wget libselinux-python expect -y
systemctl enable libvirtd
systemctl start libvirtd
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
create authorized_keys and add stack user public key in authorized_keys
sudo cp -r ~/.ssh /root/
# test ssh root
# ssh root@localhost
cd /home/stack
git clone
cd infrared
virtualenv .venv && source .venv/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
pip install .
# add plugins
infrared plugin add plugins/virsh
infrared plugin add plugins/tripleo-undercloud
infrared plugin add plugins/tripleo-overcloud
# note clone to local machine and copy to gprfc machine
git clone
# copy openshift-ir-plugin to infrared/plugins
ir plugin add --revision ocp3 plugins/openshift-ir-plugin
infrared virsh -v -o cleanup.yml --host-address $HOST --host-key ~/.ssh/id_rsa --cleanup yes 2>&1 | tee ir_virsh_cleanup_log.txt
infrared virsh -v --topology-nodes $TOPOLOGY_NODES --host-address $HOST --host-key ~/.ssh/id_rsa --image-url $IMAGE --host-memory-overcommit True 2>&1 | tee ir_virsh_log.txt
infrared tripleo-undercloud -v --mirror $MIRROR --version 14 --build passed_phase1 --images-task rpm --images-update no --config-options DEFAULT.clean_nodes='true' --registry-mirror 2>&1 | tee ir_uc_log.txt
infrared tripleo-overcloud -v --introspect yes --tagging yes --deploy no --deployment-files virt --ansible-args='tag=introspect,tag' 2>&1 | tee ir_oc_log.txt
ir -vv openshift --tripleo-dns yes --openshift-release 3.11 2>&1 | tee ir_ocp_dns_log.txt
ir -vv openshift --tripleo-deploy yes --openshift-release 3.11 2>&1 | tee ir_ocp_log.txt
============== need to change internal_api network =============
# change the name of the network
openstack network set --name internal_api_test 267579ca-526e-4b59-a06f-f4a2eb31683c
openstack network segment list
# create new segment for the network, with the updated network name
openstack network segment create --physical-network internal_api_osp --network-type flat --network 52e36f09-3b4c-4fb0-9a8c-efb962a38e30 internal_api_osp
# delete the segment with internal network name
openstack network segment delete d8896af7-9a3b-446d-9699-ad5e1d2cbd8d
# now we can create internal_api network, no need, THT will create that
# openstack network create --provider-network-type flat --provider-physical-network internal_api internal_api
# in infrared node, create oc_extra_templates.yml and instackenv.json under /home/stack/infrared/
# instackenv.json file should have only compute and controller like in
# oc_extra_templates.yml content
(.venv) [stack@gprfc049 infrared]$ cat oc_extra_templates.yml
- /home/stack/osp/networks-disable.yaml
- /home/stack/osp/network-environment.yaml
- /home/stack/osp/ips-from-pool-all.yaml
- /home/stack/osp/disable-telemetry.yaml
# network_data.yaml in undercloud should be like Add tenant and StorageMgmt in this file, as osp will create them.
# networks-dasble in undercloud , keep None as definition for Storage, internal, external and management networks as they are already created by OCP. Remove Tenant and StorageMgmt here as default resource definition will be used for them
# copy to /home/stack/osp/disable-telemetry.yaml
# copy network-environment.yaml, controller.yaml, compute.yaml, ips-from-pool-all.yaml from to /home/stack/osp
infrared tripleo-overcloud --deployment-files virt --controller-nodes 1 --compute-nodes 1 --version 14 --deploy yes --overcloud-templates /home/stack/infrared/oc_extra_templates.yml --instackenv-file /home/stack/infrared/instackenv.json --extra-deploy-params="-n /home/stack/network_data.yaml" 2>&1 | tee ir_oc14_log1.txt
Add below flows for pods to communicate with controller
1) Add flows in worker node
sudo ovs-ofctl add-flow -O OpenFlow13 br0 "table=90,priority=100,ip,nw_dst=,actions=move:NXM_NX_REG0[]->NXM_NX_TUN_ID[0..31],set_field:>tun_dst,output:1"
sudo ovs-ofctl add-flow -O OpenFlow13 br0 "table=50,priority=100,arp,arp_tpa=,actions=move:NXM_NX_REG0[]->NXM_NX_TUN_ID[0..31],set_field:>tun_dst,output:1"
sudo ovs-ofctl add-flow -O OpenFlow13 br0 "table=10,priority=100,tun_src=,actions=goto_table:30"
2) Add below flow in controller
sudo ip r a dev br0
make masters as unschedulable
oc adm manage-node openshift-master-0 --schedulable=false
run busybox image and check if we can ping controller from container
# to create pod, go to master node and execute below command
kubectl run busybox -ti --image=busybox /bin/sh
compute node ===
cd /var/lib/config-data/puppet-generated/
sudo tar -czf /tmp/compute_config.tar.gz nova_libvirt neutron
worker node ====
git clone
mkdir compute_node
cp overcloud_basic/roles/simulate-compute-node/files/* compute_node/
# copy compute config which we have copied from compue node
cp compute_config compute_node/
Add delorean and delorean-deps in Dockerfile instead of args
sudo docker build compute_node
sudo docker image save 0a84624ef471 -o fake_node.tar
undercloud =====
scp heat-admin@worker:~/fake_node.tar .
sudo docker image load -i fake_node.tar
sudo docker tag 0a84624ef471
sudo docker push
# on the worker node add selinux rule to access mount paths
[root@openshift-worker-0 compute_node]# chcon -Rt svirt_sandbox_file_t /home/tripleo-admin/compute_node/hosts
[root@openshift-worker-0 compute_node]# chcon -Rt svirt_sandbox_file_t /home/tripleo-admin/compute_node/neutron/etc/neutron
[root@openshift-worker-0 compute_node]# chcon -Rt svirt_sandbox_file_t /home/tripleo-admin/compute_node/nova_libvirt/etc/nova
oc adm policy add-scc-to-user privileged -z default
use the replica set from as fake_node.yaml
kubectl create -f fake_node.yaml
(overcloud) [stack@undercloud-0 ~]$ openstack compute service list
[heat-admin@controller-0 ~]$ sudo docker exec nova_api nova-manage cell_v2 discover_hosts
note: neutron-openvswitch-agent was terminating as bridge_mappings were set like
and it is unable to find br-isolatated. I removed br-isolated and retained br-ex like below and it started working.
bridge_mappings = datacentre:br-ex
== in undercloud,
source overcloudrc
openstack image list
openstack image create "cirros" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --public
openstack flavor list
openstack flavor create --id 0 --ram 512 --vcpus 1 --disk 10 m1.tiny
neutron net-create n1
neutron subnet-create --name sn1 n1
nova availability-zone-list
openstack host list
nova boot --flavor 0 --image cirros --availability-zone nova:fake-node-ch7r8 --nic net-id=8e7bf3ef-543a-416b-966c-a1e16f81c19b vm3
########################################################### ignore below commands, (these are other approaches which I tried :) ================================
# test with docker run
# sudo docker run -d -v "/home/heat-admin/compute_node/hosts:/etc/hosts_compute:ro" -v "/home/heat-admin/compute_node/neutron/etc/neutron:/etc/neutron/original:ro" -v "/home/heat-admin/compute_node/nova_libvirt/etc/nova:/etc/nova/original/:ro"
use the fake_node.yaml from
kubectl create -f fake_node.yaml
# overcloud14 command
# make sure below files(network_data.yaml and networks-daible.yaml) exist in uc
# cat oc_extra_templates.yml
# - /home/stack/network_data.yaml
# - /home/stack/networks-disable.yaml
# -
# infrared tripleo-overcloud --deployment-files virt --version 14 --introspect yes --tagging yes --deploy yes --overcloud-templates oc_extra_templates.yml 2>&1 | tee ir_oc14_log.txt
cp instackenv.json /home/stack/.infrared/plugins/tripleo-overcloud/instackenv.json
infrared tripleo-overcloud --deployment-files virt --controller-nodes 1 --compute-nodes 1 --version 14 --deploy yes --overcloud-templates oc_extra_templates.yml --instackenv-file instackenv.json 2>&1 | tee ir_oc14_log1.txt
#infrared tripleo-overcloud --deployment-files virt --controller-nodes 1 --compute-nodes 1 --version 14 --deploy yes --instackenv-file instackenv.json --overcloud-script 2>&1 | tee ir_oc14_log2.txt
# infrared tripleo-overcloud --deployment-files virt --controller-nodes 1 --compute-nodes 1 --version 14 --deploy yes --overcloud-templates /home/stack/oc_extra_templates.yml --instackenv-file /home/stack/instackenv.json --extra-deploy-params="-n /home/stack/network_data.yaml" 2>&1 | tee ir_oc14_log4.txt
infrared tripleo-overcloud --deployment-files virt --controller-nodes 1 --compute-nodes 1 --version 14 --deploy yes --overcloud-templates /home/stack/infrared/oc_extra_templates.yml --instackenv-file /home/stack/infrared/instackenv.json --extra-deploy-params="-n /home/stack/network_data.yaml" 2>&1 | tee ir_oc14_log4.txt
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.