13 December 2014

Installing heat stable/juno on centos 7. I want to run heat in standalone mode, i.e., has least dependent Openstack components. AFAIK keystone is needed. Looking forward to make heat a fully independent orchestration engine which can be used even without Openstack.


First I use “CentOS 7 preparation” to prepare the centos 7.

yum install -y python-devel openssl-devel python-pip git gcc mysql-devel postgresql-devel libffi-devel libvirt-devel graphviz sqlite-devel libxslt-devel libxslt libxml2 libxml2-devel

For simplicity we just run heat under root.

yum install -y mariadb mariadb-server mariadb-devel
pip install mysql-python
service mariadb start

mysql -uroot -p
mysql> create schema 'heat';

If you encounter below error in pip install MySQL-python, try comment these lines out

vim /usr/include/mysql/my_config_x86_64.h
#ifdef __GLIBC__
#error <my_config.h> MUST be included first!

Intall rabbitmq. On default we have user guest with full permissions on virtual host /

yum install -y erlang
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.4.2/rabbitmq-server-3.4.2-1.noarch.rpm
rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
yum install rabbitmq-server-3.4.2-1.noarch.rpm 
service rabbitmq-server start

# list permissions for user
rabbitmqctl list_permissions

Follow my prior keystone post, install keystone in local host using local database. Then start it.

# install keystone and start

Create the token rc file

cd ~
echo '
export OS_SERVICE_TOKEN=123abcdef
' > token.rc
chmod a+x token.rc
source token.rc

Add keystone endpoint

keystone tenant-create --name admin
keystone tenant-create --name service
keystone user-create --name admin --pass 123work
keystone user-role-add --user admin --tenant admin --role admin
keystone service-create --name=keystone --type=identity --description="Keystone Identity Service"
keystone endpoint-create --service-id=$(keystone service-list | awk '/ identity / {print $2}') --publicurl= --internalurl= --adminurl=

Add heat user in keystone

keystone user-create --name heat --pass 123work
keystone user-role-add --user heat --tenant service --role admin
keystone role-create --name heat_stack_user
keystone role-create --name heat_stack_owner
keystone service-create --name heat --type orchestration --description "Orchestration"
keystone service-create --name heat-cfn --type cloudformation --description "Orchestration"
keystone endpoint-create --service-id $(keystone service-list | awk '/ orchestration / {print $2}') --publicurl\(tenant_id\)s --internalurl\(tenant_id\)s --adminurl\(tenant_id\)s --region regionOne

Create admin rc file

echo '
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=123work
export OS_AUTH_URL=
' > ~/admin.rc
chmod a+x ~/admin.rc

# enable the rc file
source ~/admin.rc

Install Heat

# install heat
mkdir -p ~/workspace
cd ~/workspace
git clone https://github.com/openstack/heat.git
cd heat
git checkout stable/juno
cd ..

# install heat client
git clone https://github.com/openstack/python-heatclient.git
cd python-heatclient
python setup.py install
mkdir /etc/heat
cp -r ~/workspace/heat/etc/heat/* /etc/heat
mkdir /var/lib/heat
mkdir /var/log/heat

Config Heat

Create the heat config file

echo '
verbose = True
debug = True
log_dir = /var/log/heat/

rpc_backend = rabbit
rabbit_host =
rabbit_userid = guest
rabbit_password = guest

heat_metadata_server_url =
heat_waitcondition_server_url =
heat_watch_server_url =

auth_encryption_key = 123work

connection = mysql://root:123work@localhost/heat

auth_uri =
identity_uri =
admin_tenant_name = service
admin_user = heat
admin_password = 123work
' > /etc/heat/heat.conf

Synchronized heat database

~/workspace/heat/bin/heat-manage db_sync

Start/Stop Heat

# to start
~/workspace/heat/bin/heat-api --config-file /etc/heat/heat.conf >> /var/log/heat/api.log 2>&1 &
~/workspace/heat/bin/heat-engine --config-dir /etc/heat/heat.conf >> /var/log/heat/engine.log 2>&1 &

# to stop
pkill -f 'python.+heat'; ps -ef|grep heat


Create an Issue or comment below