configure_neutron
configure_mutnauq
_configure_neutron_common
_create_neutron_conf_dir
sudo install -d -o stack /etc/neutron
cd /opt/stack/neutron
exec ./tools/generate_config_file_samples.sh
cp /opt/stack/neutron/etc/neutron.conf.sample /etc/neutron/neutron.conf
Q_POLICY_FILE=/etc/neutron/policy.json
cp /opt/stack/neutron/etc/policy.json /etc/neutron/policy.json
sed -i 's/"context_is_admin": "role:admin"/"context_is_admin": "role:admin or user_name:neutron"/g' /etc/neutron/policy.json
neutron_plugin_configure_common
Q_PLUGIN_CONF_PATH=etc/neutron/plugins/ml2
Q_PLUGIN_CONF_FILENAME=ml2_conf.ini
Q_PLUGIN_CLASS=ml2
_neutron_service_plugin_class_add neutron.services.l3_router.l3_router_plugin.L3RouterPlugin
local service_plugin_class=neutron.services.l3_router.l3_router_plugin.L3RouterPlugin
Q_SERVICE_PLUGIN_CLASSES=neutron.services.l3_router.l3_router_plugin.L3RouterPlugin
mkdir -p /etc/neutron/plugins/ml2
Q_PLUGIN_CONF_FILE=etc/neutron/plugins/ml2/ml2_conf.ini
cp /opt/stack/neutron/etc/neutron/plugins/ml2/ml2_conf.ini.sample /etc/neutron/plugins/ml2/ml2_conf.ini
iniset /etc/neutron/neutron.conf database connection 'mysql+pymysql://root:asdfgh@127.0.0.1/neutron?charset=utf8'
iniset /etc/neutron/neutron.conf DEFAULT state_path /opt/stack/data/neutron
iniset /etc/neutron/neutron.conf DEFAULT use_syslog False
iniset /etc/neutron/neutron.conf DEFAULT bind_host 0.0.0.0
iniset /etc/neutron/neutron.conf oslo_concurrency lock_path /opt/stack/data/neutron/lock
iniset /etc/neutron/neutron.conf nova region_name RegionOne
setup_logging /etc/neutron/neutron.conf
setup_systemd_logging /etc/neutron/neutron.conf
iniset /etc/neutron/neutron.conf DEFAULT logging_debug_format_suffix '�[00;33m{{(pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d}}�[00m'
iniset /etc/neutron/neutron.conf DEFAULT logging_context_format_string '%(color)s%(levelname)s %(name)s [�[01;36m%(global_request_id)s %(request_id)s �[00;36m%(project_name)s %(user_name)s%(color)s] �[01;35m%(instance)s%(color)s%(message)s�[00m'
iniset /etc/neutron/neutron.conf DEFAULT logging_default_format_string '%(color)s%(levelname)s %(name)s [�[00;36m-%(color)s] �[01;35m%(instance)s%(color)s%(message)s�[00m'
iniset /etc/neutron/neutron.conf DEFAULT logging_exception_prefix 'ERROR %(name)s �[01;35m%(instance)s�[00m'
_neutron_setup_rootwrap
Q_CONF_ROOTWRAP_D=/etc/neutron/rootwrap.d
_neutron_deploy_rootwrap_filters /opt/stack/neutron
sudo install -d -o root -m 755 /etc/neutron/rootwrap.d
sudo install -o root -m 644 /opt/stack/neutron/etc/neutron/rootwrap.d/debug.filters /opt/stack/neutron/etc/neutron/rootwrap.d/dhcp.filters /opt/stack/neutron/etc/neutron/rootwrap.d/dibbler.filters /opt/stack/neutron/etc/neutron/rootwrap.d/ebtables.filters /opt/stack/neutron/etc/neutron/rootwrap.d/ipset-firewall.filters /opt/stack/neutron/etc/neutron/rootwrap.d/iptables-firewall.filters /opt/stack/neutron/etc/neutron/rootwrap.d/l3.filters /opt/stack/neutron/etc/neutron/rootwrap.d/linuxbridge-plugin.filters /opt/stack/neutron/etc/neutron/rootwrap.d/netns-cleanup.filters /opt/stack/neutron/etc/neutron/rootwrap.d/openvswitch-plugin.filters /opt/stack/neutron/etc/neutron/rootwrap.d/privsep.filters /etc/neutron/rootwrap.d/
sudo install -o root -g root -m 644 /opt/stack/neutron/etc/rootwrap.conf /etc/neutron/rootwrap.conf
sudo sed -e 's:^filters_path=.*$:filters_path=/etc/neutron/rootwrap.d:' -i /etc/neutron/rootwrap.conf
sudo sed -e 's:^exec_dirs=\(.*\)$:exec_dirs=\1,/usr/local/bin:' -i /etc/neutron/rootwrap.conf
ROOTWRAP_SUDOER_CMD='/usr/local/bin/neutron-rootwrap /etc/neutron/rootwrap.conf *'
ROOTWRAP_DAEMON_SUDOER_CMD='/usr/local/bin/neutron-rootwrap-daemon /etc/neutron/rootwrap.conf'
mktemp
TEMPFILE=/tmp/tmp.UujVFxkjz2
echo 'stack ALL=(root) NOPASSWD: /usr/local/bin/neutron-rootwrap /etc/neutron/rootwrap.conf *'
echo 'stack ALL=(root) NOPASSWD: /usr/local/bin/neutron-rootwrap-daemon /etc/neutron/rootwrap.conf'
chmod 0440 /tmp/tmp.UujVFxkjz2
sudo chown root:root /tmp/tmp.UujVFxkjz2
sudo mv /tmp/tmp.UujVFxkjz2 /etc/sudoers.d/neutron-rootwrap
iniset /etc/neutron/neutron.conf agent root_helper 'sudo /usr/local/bin/neutron-rootwrap /etc/neutron/rootwrap.conf'
iniset /etc/neutron/neutron.conf agent root_helper_daemon 'sudo /usr/local/bin/neutron-rootwrap-daemon /etc/neutron/rootwrap.conf'
iniset_rpc_backend neutron /etc/neutron/neutron.conf
iniset /etc/neutron/neutron.conf DEFAULT transport_url rabbit://stackrabbit:asdfgh@192.168.2.96:5672/
_configure_neutron_service
Q_API_PASTE_FILE=/etc/neutron/api-paste.ini
cp /opt/stack/neutron/etc/api-paste.ini /etc/neutron/api-paste.ini
iniset /etc/neutron/neutron.conf DEFAULT core_plugin ml2
iniset /etc/neutron/neutron.conf DEFAULT debug True
iniset /etc/neutron/neutron.conf oslo_policy policy_file /etc/neutron/policy.json
iniset /etc/neutron/neutron.conf DEFAULT allow_overlapping_ips True
iniset /etc/neutron/neutron.conf DEFAULT auth_strategy keystone
_neutron_setup_keystone /etc/neutron/neutron.conf keystone_authtoken
create_neutron_cache_dir
sudo install -d -o stack /var/cache/neutron
configure_auth_token_middleware /etc/neutron/neutron.conf neutron /var/cache/neutron keystone_authtoken
local admin_user=neutron
local signing_dir=/var/cache/neutron
local section=keystone_authtoken
iniset /etc/neutron/neutron.conf keystone_authtoken auth_type password
iniset /etc/neutron/neutron.conf keystone_authtoken auth_url http://192.168.2.96/identity
iniset /etc/neutron/neutron.conf keystone_authtoken username neutron
iniset /etc/neutron/neutron.conf keystone_authtoken password asdfgh
iniset /etc/neutron/neutron.conf keystone_authtoken user_domain_name Default
iniset /etc/neutron/neutron.conf keystone_authtoken project_name service
iniset /etc/neutron/neutron.conf keystone_authtoken project_domain_name Default
iniset /etc/neutron/neutron.conf keystone_authtoken cafile /opt/stack/data/ca-bundle.pem
iniset /etc/neutron/neutron.conf keystone_authtoken signing_dir /var/cache/neutron
iniset /etc/neutron/neutron.conf keystone_authtoken memcached_servers localhost:11211
iniset /etc/neutron/neutron.conf DEFAULT notify_nova_on_port_status_changes True
iniset /etc/neutron/neutron.conf DEFAULT notify_nova_on_port_data_changes True
configure_auth_token_middleware /etc/neutron/neutron.conf nova /var/cache/neutron nova
local admin_user=nova
local signing_dir=/var/cache/neutron
local section=nova
iniset /etc/neutron/neutron.conf nova auth_type password
iniset /etc/neutron/neutron.conf nova auth_url http://192.168.2.96/identity
iniset /etc/neutron/neutron.conf nova username nova
iniset /etc/neutron/neutron.conf nova password asdfgh
iniset /etc/neutron/neutron.conf nova user_domain_name Default
iniset /etc/neutron/neutron.conf nova project_name service
iniset /etc/neutron/neutron.conf nova project_domain_name Default
iniset /etc/neutron/neutron.conf nova cafile /opt/stack/data/ca-bundle.pem
iniset /etc/neutron/neutron.conf nova signing_dir /var/cache/neutron
iniset /etc/neutron/neutron.conf nova memcached_servers localhost:11211
neutron_plugin_configure_service
_configure_neutron_plugin_agent
_configure_neutron_dhcp_agent
_configure_neutron_l3_agent
_configure_neutron_metadata_agent
iniset /etc/neutron/neutron.conf DEFAULT api_workers 2
iniset /etc/neutron/neutron.conf DEFAULT rpc_state_report_workers 0
网友评论