calculate instances for openstack
cpu_allocation_ratio=16.0
ram_allocation_ratio=1.5
nova flavor-list
number of instances = ( cpu_allocation_ratio x total physical cores ) / virtual cores per instance
number of instances = ( ram_allocation_ratio x total physical memory ) / flavor memory size
size of instances = number of instances x flavor disk size ( /var/lib/nova/instances )
f_user = f_tenant = ""
if "-u" in sys.argv: f_user = sys.argv[sys.argv.index("-u")+1]
if "-t" in sys.argv: f_tenant = sys.argv[sys.argv.index("-t")+1]
tenants = [t for t in keystone.tenants.list() if f_tenant in t.name]
users = [u for u in keystone.users.list() if f_user in u.name]
pt = prettytable.PrettyTable(["name"]+[t.name for t in tenants])
for user in users:
row = [user.name]
for tenant in tenants:
row.append("\n".join([u.name for u in user.list_roles(tenant.id)]))
pt.add_row(row)
print pt.get_string(sortby="name")
Hosted MySQL Server
yum -y install mysql mysql-server MySQL-python
all other openstack nodes
yum -y install mysql MySQL-python openstack-utils
1. The public_url parameteris the URL that end users would connect on. In a public
cloud environment, this would be a public URL that resolves to a public IP address.
2. The admin_url parameteris a restricted address for conducting administration.
In a public deployment, you would keep this separate from the public_URL by
presenting the service you are configuring on a different, restricted URL. Some
services have a different URI for the admin service, so this is configured using this
attribute.
3. The internal_url parameterwould be the IP or URL that existed only within the
private local area network. The reason for this is that you are able to connect to
services from your cloud environment internally without connecting over a public IP
address space, which could incur data charges for traversing the Internet. It is also
potentially more secure and less complex to do so.
my notes:
vi /root/checkiso.sh
#!/bin/bash
DIR=/icehouse
if [ "$(ls -A $DIR 2> /dev/null)" == '' ]; then
mount -o loop /tmp/OpenStackIcehouse.iso /icehouse/
fi
chmod +x /root/checkiso.sh
echo "/root/checkiso.sh" >> root/.bash_profile
nova live migration libvirt related configuration:
for CentOS 6.5
vi /etc/libvirt/libvirtd.conf
listen_tls = 0
listen_tcp = 1
auth_tcp = “none”
vi /etc/sysconfig/libvirtd
LIBVIRTD_ARGS="--listen"
service libvirtd restart
for Ubuntu 14.04
vi /etc/libvirt/libvirtd.conf
listen_tls = 0
listen_tcp = 1
auth_tcp = “none”