Created
June 12, 2015 02:38
-
-
Save kentarosasaki/b37b172edee68d13ea99 to your computer and use it in GitHub Desktop.
OpenStackのconfigファイルをcrudiniで操作する ref: http://qiita.com/kentarosasaki/items/bc11adbbeb219186629b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get -y install crudini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONFIG_FILE=/etc/nova/nova.conf | |
crudini --set $CONFIG_FILE DEFAULT verbose true | |
crudini --set $CONFIG_FILE DEFAULT debug true | |
crudini --set $CONFIG_FILE DEFAULT my_ip $(hostname -i) | |
crudini --set $CONFIG_FILE DEFAULT auth_strategy keystone | |
crudini --set $CONFIG_FILE DEFAULT security_group_api neutron | |
crudini --set $CONFIG_FILE DEFAULT network_api_class nova.network.neutronv2.api.API | |
crudini --set $CONFIG_FILE DEFAULT rabbit_host $(hostname -i) | |
crudini --set $CONFIG_FILE DEFAULT rabbit_userid openstack | |
crudini --set $CONFIG_FILE DEFAULT rabbit_password openstack | |
crudini --set $CONFIG_FILE DEFAULT linuxnet_interface_driver nova.network.linux_net.LinuxOVSInterfaceDriver | |
crudini --set $CONFIG_FILE DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver | |
crudini --set $CONFIG_FILE glance host $(hostname -i) | |
crudini --set $CONFIG_FILE database connection mysql://nova:nova@$(hostname -i)/nova | |
crudini --set $CONFIG_FILE keystone_authtoken auth_uri http://$(hostname -i):5000/v2.0 | |
crudini --set $CONFIG_FILE keystone_authtoken identity_uri http://$(hostname -i):35357 | |
crudini --set $CONFIG_FILE keystone_authtoken admin_tenant_name service | |
crudini --set $CONFIG_FILE keystone_authtoken admin_user nova | |
crudini --set $CONFIG_FILE keystone_authtoken admin_password nova | |
crudini --set $CONFIG_FILE neutron url http://$(hostname -i):9696 | |
crudini --set $CONFIG_FILE neutron auth_strategy keystone | |
crudini --set $CONFIG_FILE neutron admin_auth_url http://$(hostname -i):35357/v2.0 | |
crudini --set $CONFIG_FILE neutron admin_tenant_name service | |
crudini --set $CONFIG_FILE neutron admin_username neutron | |
crudini --set $CONFIG_FILE neutron admin_password neutron | |
crudini --set $CONFIG_FILE neutron service_metadata_proxy true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get -y install ubuntu-cloud-keyring | |
echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu" "trusty-updates/juno main" > /etc/apt/sources.list.d/cloudarchive-juno.list | |
apt-get update && apt-get -y dist-upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get -y install nova-api python-novaclient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service nova-api restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm /var/lib/nova/nova.sqlite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su -s /bin/sh -c "nova-manage db sync" nova |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment