Skip to content

Instantly share code, notes, and snippets.

@yuuichi-fujioka
Last active January 21, 2016 05:29
Show Gist options
  • Save yuuichi-fujioka/638596c9bc9600ea8863 to your computer and use it in GitHub Desktop.
Save yuuichi-fujioka/638596c9bc9600ea8863 to your computer and use it in GitHub Desktop.
my local.conf and local.sh
[[local|localrc]]
ADMIN_PASSWORD=openstack
MYSQL_PASSWORD=stackdb
RABBIT_PASSWORD=stackqueue
SERVICE_PASSWORD=$ADMIN_PASSWORD
HOST_IP=$(ip addr show dev br-eth0 | awk '/ inet / { print $2 }' | head -1 | sed 's#/.*##g')
SERVICE_TOKEN=tokentoken
RECLONE=yes
DEST=/opt/stack/
SERVICE_DIR=${DEST}/status
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=7
SCREEN_LOGDIR=$DEST/logs/screen
DATA_DIR=${DEST}/data
API_RATE_LIMIT=False
PIP_USE_MIRRORS=False
# ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-net,n-cond,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,horizon,rabbit,tempest,mysql
# ENABLED_SERVICES=key,rabbit,tempest,mysql
## AMQP
# disable_service rabbit
# enable_service qpid
## cinder
disable_service n-vol
disable_service c-api c-sch c-vol cinder
#
# VOLUME_GROUP="stack-volumes"
# VOLUME_NAME_PREFIX="volume-"
# VOLUME_BACKING_FILE_SIZE=5130M
## heat
ENABLED_SERVICES+=,heat,h-api-cfn,h-api-cw,h-eng,h-api
# disable_service heat
# disable_service h-api-cfn
# disable_service h-api-cw
# disable_service h-eng
# disable_service h-api
# IMAGE_URLS+=",http://fedorapeople.org/groups/heat/prebuilt-jeos-images/F17-x86_64-cfntools.qcow2,http://fedorapeople.org/groups/heat/prebuilt-jeos-images/F17-i386-cfntools.qcow2"
## ceilometer
## Enable the ceilometer metering services
# enable_service ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-anotification
## Enable the ceilometer alarming services
# enable_service ceilometer-alarm-evaluator,ceilometer-alarm-notifier
## Enable the ceilometer api services
# enable_service ceilometer-api
## Backend
# CEILOMETER_BACKEND=mysql
# CEILOMETER_BACKEND=mongo
## neutron
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service neutron
enable_service q-lbaas
# enable_service q-fwaas
enable_service q-vpn
ALLOCATION_POOL="start=192.168.100.100,end=192.168.100.200"
FIXED_RANGE=192.168.100.0/24
NETWORK_GATEWAY=192.168.100.1
Q_FLOATING_ALLOCATION_POOL="start=172.16.0.100,end=192.168.11.200"
FLOATING_RANGE=172.16.0.0/24
PUBLIC_NETWORK_GATEWAY=172.16.0.254
Q_PLUGIN=ml2
Q_ML2_TENANT_NETWORK_TYPE=vxlan
ENABLE_TENANT_TUNNELS=True
ENABLE_TENANT_VLANS=True
TENANT_VLAN_RANGE=1000:1999
## tempest
enable_service tempest
## nova
# LIBVIRT_TYPE=lxc
# VIRT_DRIVER=docker
## keystone
# IDENTITY_API_VERSION=3
# OS_IDENTITY_API_VERSION=3
# KEYSTONE_IDENTITY_BACKEND=ldap
# enable_service ldap
# LDAP_PASSWORD=openstack
KEYSTONE_CATALOG_BACKEND=sql
KEYSTONE_TOKEN_FORMAT=UUID
## trove
# enable_service trove
# enable_service tr-tmgr
# enable_service tr-cond
# enable_service tr-api
## swift
# enable_service s-proxy s-object s-container s-account
SWIFT_HASH=swifthash
## zaqar
# enable_service zaqar-server
## horizon
disable_service horizon
[[post-config|$NOVA_CONF]]
[DEFAULT]
metadata_workers = 0
ec2_workers = 0
osapi_compute_workers = 0
[conductor]
workers = 0
[[post-config|/$Q_PLUGIN_CONF_FILE]]
# [ovs]
# bridge_mappings = usa:br-ex-usa, tokyo:br-ex-tok, osaka:br-ex-osk, okinawa:br-ex-oknw, vlan:br-vlan
#
# [ml2]
# tenant_network_type = vlan
#
# [ml2_type_flat]
# flat_networks = tokyo, osaka, okinawa, usa
#
# [ml2_type_vlan]
# network_vlan_rangeie = vlan:1000:1999
[securitygroup]
firewall_driver = neutron.agent.firewall.NoopFirewallDriver
#!/bin/bash -x
source accrc/demo/admin
source locarc.auto
neutron security-group-list -c id -f json | jq '.[].id' -r | while read sec_group
do
neutron security-group-rule-create --direction ingress --ethertype IPv4 --remote-ip-prefix 0.0.0.0/0 ${sec_group}
neutron security-group-rule-create --direction ingress --ethertype IPv6 --remote-ip-prefix 0.0.0.0/0 ${sec_group}
neutron security-group-rule-create --direction egress --ethertype IPv4 --remote-ip-prefix 0.0.0.0/0 ${sec_group}
neutron security-group-rule-create --direction egress --ethertype IPv6 --remote-ip-prefix 0.0.0.0/0 ${sec_group}
done
nova flavor-create --is-public true diskless 99 1024 0 1
nova keypair-add --pub-key ~/.ssh/id_rsa.pub mykey
ls ~/images/*.img | while read line
do
glance image-create --is-public True --name $(basename $line .img) --disk-format qcow2 --container-format --poll --file $line
done
sudo ip addr flush br-ex
sudo ovs-vsctl add-port br-ex eth0
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment