Skip to content

Instantly share code, notes, and snippets.

@venkataanil
Last active April 3, 2019 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save venkataanil/3622bd292abfa9756e9d1b720635cd67 to your computer and use it in GitHub Desktop.
Save venkataanil/3622bd292abfa9756e9d1b720635cd67 to your computer and use it in GitHub Desktop.
create vms using https://gist.github.com/venkataanil/3ec45c26ab3c9dbb6cd1c20eea9c7b16
sudo yum install git gcc libffi-devel openssl-devel python-virtualenv libselinux-python tmux -y
Don't add hostname in /etc/hosts. Make sure /etc/hosts empty in controller-0 and compute-0
# https://docs.openstack.org/tripleo-docs/latest/install/installation/installation.html
useradd stack
passwd stack
echo "stack ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/stack
chmod 0440 /etc/sudoers.d/stack
# create heat-admin user in controller-0 and compute-0
# https://docs.openstack.org/tripleo-docs/latest/install/installation/installation.html
useradd heat-admin
passwd heat-admin
echo "heat-admin ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/heat-admin
chmod 0440 /etc/sudoers.d/heat-admin
mkdir .ssh
chmod -R 0700 .ssh
copy undercloud stack user public key to .ssh/authorized_keys
chmod 644 .ssh/authorized_keys
su - stack
sudo yum install -y yum-utils
# search for python2-tripleo-repos in https://trunk.rdoproject.org/centos7/current/ and use that in below line to install
sudo yum install -y https://trunk.rdoproject.org/centos7/current/python2-tripleo-repos-<version>.el7.centos.noarch.rpm
sudo -E tripleo-repos current-tripleo-dev ceph
sudo yum install -y python-tripleoclient
cp https://github.com/venkataanil/osp_templates/blob/master/deployed_servers/uc/undercloud.conf undercloud.conf
openstack tripleo container image prepare default --local-push-destination --output-env-file ~/containers-prepare-parameter.yaml
openstack undercloud install
check for heat_metadata_server_url in /var/lib/config-data/puppet-generated/heat
/var/lib/config-data/puppet-generated/heat/etc/heat/heat.conf:197:heat_metadata_server_url=http://192.168.24.1:8000
in controller-0
ip a a 192.168.24.14/24 brd 192.168.24.255 dev eth0
ifconfig eth2 up
sudo yum install -y yum-utils
sudo yum install -y https://trunk.rdoproject.org/centos7/current/python2-tripleo-repos-0.0.1-0.20190328140951.a7bc8dc.el7.noarch.rpm
sudo -E tripleo-repos current-tripleo-dev ceph
sudo yum install -y python-heat-agent*
sudo yum install lvm2
systemctl enable lvm2-lvmetad.service
systemctl start lvm2-lvmetad.service
sudo yum start openvswitch
in compute-0
ip a a 192.168.24.15/24 brd 192.168.24.255 dev eth0
ifconfig eth2 up
sudo yum install -y yum-utils
sudo yum install -y https://trunk.rdoproject.org/centos7/current/python2-tripleo-repos-0.0.1-0.20190328140951.a7bc8dc.el7.noarch.rpm
sudo -E tripleo-repos current-tripleo-dev ceph
sudo yum install -y python-heat-agent*
sudo yum start openvswitch
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 .ssh
sudo chmod 0700 .ssh
copy undercloud public key to .ssh/authorized_keys
chmod 600 .ssh/authorized_keys
# start openvswitch on both controller-0 and compute-0
systemctl start openvswitch
make /etc/hosts blank in controller-0 and compute-0
otherwise ansible-ssh-config step will fail
set controller-0 and compute-0 hostnames to contrroler-0 and compute-0 (don't add any domain), otherwise ansible--shc-onfig generation will fail
Must set netmask to unique ip address like https://github.com/venkataanil/osp_templates/blob/master/deployed_servers/uc/virt/network/saravanan_netmask_file
otherwise u have to manullay add unique netwmasks in below files
tripleo-config/ControllerDeployedServer/compute-0/NetworkDeployment and tripleo-config/ControllerDeployedServer/controller-0/NetworkDeployment, in both of them ip_netmask for InternalApiIpSubnet and for any other subnets shouldn't be null. Update them to proper values for example "172.17.1.9/24". It has to be a string.
If not then update tripleo-config/ControllerDeployedServer/compute-0/NetworkDeployment from tripleo-config/ControllerDeployedServer/compute-0/ControllerDeployedServerDeployment. Same with compute
Also add undercloud's dns_servers(/etc/resolv.conf) to compute and controllers tripleo-config/ControllerDeployedServer/compute-0/NetworkDeployment dns-servers field
Add vlan interfaces on undercloud as well, I think this is not needed
[stack@undercloud-0 ~]$ sudo ovs-vsctl add-br br-ex
[stack@undercloud-0 ~]$ sudo ovs-vsctl add-port br-ex eth2
[stack@undercloud-0 ~]$ sudo ovs-vsctl add-port br-ex vlan10 tag=10 -- set interface vlan10 type=internal
[stack@undercloud-0 ~]$ ip a a 10.0.0.104/24 brd 10.0.0.255 dev vlan10
RTNETLINK answers: Operation not permitted
[stack@undercloud-0 ~]$ sudo ip a a 10.0.0.104/24 brd 10.0.0.255 dev vlan10
[stack@undercloud-0 ~]$ sudo ip l set vlan10 up
Debugging tips:
If you want to download and replly netconfig, remove this file in controller node
sudo rm -f /var/lib/heat-config/deployed/43ef6dd9-396a-42e9-adbb-65a2946cea7b.json
Some other config files for debugging
Error running /var/lib/heat-config/heat-config-script/1185e1a1-aa35-439e-9a3e-9dba1246eb29
[INFO] Completed /usr/libexec/heat-config/hooks/script
Running heat-config-notify /var/lib/heat-config/deployed/1185e1a1-aa35-439e-9a3e-9dba1246eb29.json < /var/lib/heat-config/deployed/1185e1a1-aa35-4
39e-9a3e-9dba1246eb29.notify.json
/var/run/heat-config/heat-config-script
/usr/libexec/os-refresh-config/configure.d/55-heat-config
/etc/os-net-config/
/etc/sysconfig/network-scripts/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment