Switch to crudini for easier readability

This does nothing but switch the init container to be a bit more
readable.

TrivialFix

Change-Id: I00766fb6cdb2bbbe4f792ea472c237d8ffb1a7bc
This commit is contained in:
Kevin Fox 2016-08-29 13:56:39 -07:00
parent 1110d2f990
commit 96ed283df4
4 changed files with 32 additions and 32 deletions

View File

@ -18,18 +18,18 @@ spec:
pod.alpha.kubernetes.io/init-containers: '[
{
"name": "initialize-nova-compute",
"image": "{{ nova_compute_image_full }}",
"image": "{{ kolla_toolbox_image_full }}",
"command": [
"sh",
"-c",
"cp -a /config/..data/* /nova/;
ip=$(ip addr show dev {{ tunnel_interface }} | grep -G ''inet '' | awk ''{print $2}'');
sed -i ''s|^my_ip.*=.*|my_ip=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^novncproxy_host.*=.*|novncproxy_host=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^vncserver_listen.*=.*|vncserver_listen=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^vncserver_proxyclient_address.*=.*|vncserver_proxyclient_address=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^novncproxy_base_url.*=.*|novncproxy_base_url=http://''${ip%/*}'':6080/vnc_auto.html|g'' /nova/nova.conf;
sed -i ''s|^connection_uri.*=.*|connection_uri=\"qemu+tcp://''${ip%/*}''/system\"|g'' /nova/nova.conf;"],
IP=$(ip addr show dev {{ tunnel_interface }} | grep -G ''inet '' | awk ''{print $2}'' | sed ''s@/.*@@'');
crudini --set /nova/nova.conf DEFAULT my_ip $IP;
crudini --set /nova/nova.conf vnc novncproxy_host $IP;
crudini --set /nova/nova.conf vnc vncserver_listen $IP;
crudini --set /nova/nova.conf vnc vncserver_proxyclient_address $IP;
crudini --set /nova/nova.conf vnc novncproxy_base_url $IP;
crudini --set /nova/nova.conf vnc connection_uri ''qemu+tcp://''$IP"],
"volumeMounts": [
{
"name": "nova-compute-config",

View File

@ -13,18 +13,18 @@ spec:
pod.alpha.kubernetes.io/init-containers: '[
{
"name": "initialize-nova-api",
"image": "{{ nova_api_image_full }}",
"image": "{{ kolla_toolbox_image_full }}",
"command": [
"sh",
"-c",
"cp -a /config/..data/* /nova/;
ip=$(ip addr show dev {{ tunnel_interface }} | grep -G ''inet '' | awk ''{print $2}'');
sed -i ''s|^my_ip.*=.*|my_ip=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^novncproxy_host.*=.*|novncproxy_host=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^vncserver_listen.*=.*|vncserver_listen=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^vncserver_proxyclient_address.*=.*|vncserver_proxyclient_address=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^novncproxy_base_url.*=.*|novncproxy_base_url=http://''${ip%/*}'':6080/vnc_auto.html|g'' /nova/nova.conf;
sed -i ''s|^connection_uri.*=.*|connection_uri=qemu+tcp://''${ip%/*}''/system|g'' /nova/nova.conf;" ],
IP=$(ip addr show dev {{ tunnel_interface }} | grep -G ''inet '' | awk ''{print $2}'' | sed ''s@/.*@@'');
crudini --set /nova/nova.conf DEFAULT my_ip $IP;
crudini --set /nova/nova.conf vnc novncproxy_host $IP;
crudini --set /nova/nova.conf vnc vncserver_listen $IP;
crudini --set /nova/nova.conf vnc vncserver_proxyclient_address $IP;
crudini --set /nova/nova.conf vnc novncproxy_base_url $IP;
crudini --set /nova/nova.conf vnc connection_uri ''qemu+tcp://''$IP"],
"volumeMounts": [
{
"name": "nova-api-config",

View File

@ -13,18 +13,18 @@ spec:
pod.alpha.kubernetes.io/init-containers: '[
{
"name": "initialize-nova-conductor",
"image": "{{ nova_conductor_image_full }}",
"image": "{{ kolla_toolbox_image_full }}",
"command": [
"sh",
"-c",
"cp -a /config/..data/* /nova/;
ip=$(ip addr show dev {{ tunnel_interface }} | grep -G ''inet '' | awk ''{print $2}'');
sed -i ''s|^my_ip.*=.*|my_ip=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^novncproxy_host.*=.*|novncproxy_host=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^vncserver_listen.*=.*|vncserver_listen=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^vncserver_proxyclient_address.*=.*|vncserver_proxyclient_address=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^novncproxy_base_url.*=.*|novncproxy_base_url=http://''${ip%/*}'':6080/vnc_auto.html|g'' /nova/nova.conf;
sed -i ''s|^connection_uri.*=.*|connection_uri=qemu+tcp://''${ip%/*}''/system|g'' /nova/nova.conf;" ],
IP=$(ip addr show dev {{ tunnel_interface }} | grep -G ''inet '' | awk ''{print $2}'' | sed ''s@/.*@@'');
crudini --set /nova/nova.conf DEFAULT my_ip $IP;
crudini --set /nova/nova.conf vnc novncproxy_host $IP;
crudini --set /nova/nova.conf vnc vncserver_listen $IP;
crudini --set /nova/nova.conf vnc vncserver_proxyclient_address $IP;
crudini --set /nova/nova.conf vnc novncproxy_base_url $IP;
crudini --set /nova/nova.conf vnc connection_uri ''qemu+tcp://''$IP"],
"volumeMounts": [
{
"name": "nova-conductor-config",

View File

@ -13,18 +13,18 @@ spec:
pod.alpha.kubernetes.io/init-containers: '[
{
"name": "initialize-nova-scheduler",
"image": "{{ nova_scheduler_image_full }}",
"image": "{{ kolla_toolbox_image_full }}",
"command": [
"sh",
"-c",
"cp -a /config/..data/* /nova/;
ip=$(ip addr show dev {{ tunnel_interface }} | grep -G ''inet '' | awk ''{print $2}'');
sed -i ''s|^my_ip.*=.*|my_ip=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^novncproxy_host.*=.*|novncproxy_host=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^vncserver_listen.*=.*|vncserver_listen=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^vncserver_proxyclient_address.*=.*|vncserver_proxyclient_address=''${ip%/*}''|g'' /nova/nova.conf;
sed -i ''s|^novncproxy_base_url.*=.*|novncproxy_base_url=http://''${ip%/*}'':6080/vnc_auto.html|g'' /nova/nova.conf;
sed -i ''s|^connection_uri.*=.*|connection_uri=qemu+tcp://''${ip%/*}''/system|g'' /nova/nova.conf;" ],
IP=$(ip addr show dev {{ tunnel_interface }} | grep -G ''inet '' | awk ''{print $2}'' | sed ''s@/.*@@'');
crudini --set /nova/nova.conf DEFAULT my_ip $IP;
crudini --set /nova/nova.conf vnc novncproxy_host $IP;
crudini --set /nova/nova.conf vnc vncserver_listen $IP;
crudini --set /nova/nova.conf vnc vncserver_proxyclient_address $IP;
crudini --set /nova/nova.conf vnc novncproxy_base_url $IP;
crudini --set /nova/nova.conf vnc connection_uri ''qemu+tcp://''$IP"],
"volumeMounts": [
{
"name": "nova-scheduler-config",