VScaler: CIX Controller Node OpenStack Installation - Heat
Jump to navigation
Jump to search
Heat Orchestration Service
#!/bin/bash
if [ ! -f ./vscaler-env.sh ]; then
echo "vscaler-env.sh file does not exist. Exiting..."
exit
fi
# source the vscaler installation vars
. vscaler-env.sh
# Create the Database and Openstack entries
mysql -u root --password=$VS_PASS <<MYSQL_SCRIPT
CREATE DATABASE heat;
GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' IDENTIFIED BY '$HEAT_DBPASS';
GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' IDENTIFIED BY '$HEAT_DBPASS';
GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'$HOSTNAME' IDENTIFIED BY '$HEAT_DBPASS';
MYSQL_SCRIPT
source /root/user-openrc/admin-openrc.sh
openstack user create --domain default --password $ADMIN_PASS heat
openstack role add --project service --user heat admin
openstack service create --name heat --description "Orchestration" orchestration
openstack service create --name heat-cfn --description "Orchestration" cloudformation
openstack endpoint create --region RegionOne orchestration public http://controller:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne orchestration internal http://controller:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne orchestration admin http://controller:8004/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne cloudformation public http://controller:8000/v1
openstack endpoint create --region RegionOne cloudformation internal http://controller:8000/v1
openstack endpoint create --region RegionOne cloudformation admin http://controller:8000/v1
openstack domain create --description "Stack projects and users" heat
openstack user create --domain heat --password $ADMIN_PASS heat_domain_admin
openstack role add --domain heat --user heat_domain_admin admin
openstack role create heat_stack_owner
#openstack role add --project demo --user demo heat_stack_owner
openstack role create heat_stack_user
# Installa nd configure packages
yum install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine python-heatclient -y
crudini --set /etc/heat/heat.conf database connection mysql://heat:$HEAT_DBPASS@controller/heat
crudini --set /etc/heat/heat.conf DEFAULT rpc_backend rabbit
crudini --set /etc/heat/heat.conf oslo_messaging_rabbit rabbit_host controller
crudini --set /etc/heat/heat.conf oslo_messaging_rabbit rabbit_userid openstack
crudini --set /etc/heat/heat.conf oslo_messaging_rabbit rabbit_password $RABBIT_PASS
crudini --del /etc/heat/heat.conf keystone_authtoken
crudini --set /etc/heat/heat.conf keystone_authtoken auth_uri http://controller:5000
crudini --set /etc/heat/heat.conf keystone_authtoken auth_url http://controller:35357
crudini --set /etc/heat/heat.conf keystone_authtoken auth_plugin password
crudini --set /etc/heat/heat.conf keystone_authtoken project_domain_id default
crudini --set /etc/heat/heat.conf keystone_authtoken user_domain_id default
crudini --set /etc/heat/heat.conf keystone_authtoken project_name service
crudini --set /etc/heat/heat.conf keystone_authtoken username heat
crudini --set /etc/heat/heat.conf keystone_authtoken password $HEAT_PASS
crudini --set /etc/heat/heat.conf trustee auth_plugin password
crudini --set /etc/heat/heat.conf trustee auth_url http://controller:35357
crudini --set /etc/heat/heat.conf trustee username heat
crudini --set /etc/heat/heat.conf trustee password $HEAT_PASS
crudini --set /etc/heat/heat.conf trustee user_domain_id default
crudini --set /etc/heat/heat.conf clients_keystone auth_uri http://controller:5000
crudini --set /etc/heat/heat.conf ec2authtoken auth_uri http://controller:5000/v3
crudini --set /etc/heat/heat.conf DEFAULT heat_metadata_server_url http://controller:8000
crudini --set /etc/heat/heat.conf DEFAULT heat_waitcondition_server_url http://controller:8000/v1/waitcondition
crudini --set /etc/heat/heat.conf DEFAULT stack_domain_admin heat_domain_admin
crudini --set /etc/heat/heat.conf DEFAULT stack_domain_admin_password $HEAT_DOMAIN_PASS
crudini --set /etc/heat/heat.conf DEFAULT stack_user_domain_name heat
crudini --set /etc/heat/heat.conf DEFAULT verbose True
su -s /bin/sh -c "heat-manage db_sync" heat
systemctl enable openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service
systemctl start openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.serviceProblems
"Constraint not found"
- When trying to create a stack, you may see the following error:
[root@controller01 heat_test]# heat stack-create -f head.yaml head_test
ERROR: Property error: : resources.hpcod_subnet.properties.cidr: : "10.16.0.0/24" does not validate net_cidr (constraint not found)- Install
python-croniter:
[root@controller01 heat_test]# yum install python-croniter.noarch- Restart
heatservices:
[root@controller01 heat_test]# systemctl restart openstack-heat-*