icehouse版devstack構築ではまった。

とある理由で、devstack(icehouse)を構築する必要があり、はまったので備忘録。

devstack構築方法は別のサイトにお願いするとして、使用するlocalrcはこれです。

#Minimal Content
# ---------------

ADMIN_PASSWORD="nova"
MYSQL_PASSWORD=stack
RABBIT_PASSWORD=stack
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=$ADMIN_PASSWORD

# Multi-host
# ----------
#ENABLED_SERVICES=n-cpu,rabbit,q-agt
#SERVICE_HOST=<IP of the controller node>
#MYSQL_HOST=$SERVICE_HOST
#RABBIT_HOST=$SERVICE_HOST

# Neutron
# -------
disable_service n-net
enable_service neutron
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service q-lbaas
OVS_ENABLE_TUNNELING=False
# Bug https://bugs.launchpad.net/neutron/+bug/1112912
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver

# Ceilometer
# ---------
#CEILOMETER_BACKEND=mongo
enable_service ceilometer-acompute ceilometer-acentral
enable_service ceilometer-anotification
enable_service ceilometer-collector ceilometer-api
enable_service ceilometer-alarm-notifier ceilometer-alarm-evaluator

# Heat
# ----
enable_service heat
enable_service h-api
enable_service h-api-cfg
enable_service h-api-cw
enable_service h-eng

# Swift
# -----
enable_service s-proxy
enable_service s-object
enable_service s-container
enable_service s-account
SWIFT_REPLICAS=1
SWIFT_HASH=nova

# Keystone
# --------
KEYSTONE_CATALOG_BACKEND=sql

# Cinder
# ------
VOLUME_BACKING_FILE_SIZE=2560M

# Images
# --------
# Forcing devstack to use cirros-0.3.2-x86_64-uec image
DEFAULT_IMAGE_NAME="cirros-0.3.2-x86_64-uec.tar.gz"
IMAGE_URLS="http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-uec.tar.gz"

# Enable Logging
# --------
LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=True
SCREEN_LOGDIR=/opt/stack/logs

# Others
# ------
# Do not modify below if you don't know what you are doing
HOST_IP_IFACE=eth0
HOST_IP=xxx.xxx.xxx.xxx
OFFLINE=False
disable_service tempest
disable_service n-obj
disable_service ec2
APACHE_ENABLED_SERVICES+=keystone,swift
GIT_DEST=/home/stack/devstack
GIT_BASE=https://git.openstack.org

この設定だと、swiftの構築時にエラーとなります。

理由は、apacheの設定ファイルに.confがつかないためでした。そこで、devstack/lib/swiftを修正します。

--- devstack/lib/swift.orig	2015-02-24 14:44:17.000000000 +0900
+++ devstack/lib/swift	2015-02-24 14:48:58.943772000 +0900
@@ -150,7 +150,7 @@
         for type in object container account; do
             site_name=${type}-server-${node_number}
             disable_apache_site ${site_name}
-            sudo rm -f /etc/$APACHE_NAME/$APACHE_CONF_DIR/${site_name}
+            sudo rm -f /etc/$APACHE_NAME/$APACHE_CONF_DIR/${site_name}.conf
         done
     done
 }
@@ -162,14 +162,14 @@
     local proxy_port=${SWIFT_DEFAULT_BIND_PORT:-8080}
 
     # copy proxy vhost and wsgi file
-    sudo cp ${SWIFT_DIR}/examples/apache2/proxy-server.template ${apache_vhost_dir}/proxy-server
+    sudo cp ${SWIFT_DIR}/examples/apache2/proxy-server.template ${apache_vhost_dir}/proxy-server.conf
     sudo sed -e "
         /^#/d;/^$/d;
         s/%PORT%/$proxy_port/g;
         s/%SERVICENAME%/proxy-server/g;
         s/%APACHE_NAME%/${APACHE_NAME}/g;
         s/%USER%/${STACK_USER}/g;
-    " -i ${apache_vhost_dir}/proxy-server
+    " -i ${apache_vhost_dir}/proxy-server.conf
     enable_apache_site proxy-server
 
     sudo cp ${SWIFT_DIR}/examples/wsgi/proxy-server.wsgi.template ${SWIFT_APACHE_WSGI_DIR}/proxy-server.wsgi
@@ -184,13 +184,13 @@
         container_port=$[CONTAINER_PORT_BASE + 10 * ($node_number - 1)]
         account_port=$[ACCOUNT_PORT_BASE + 10 * ($node_number - 1)]
 
-        sudo cp ${SWIFT_DIR}/examples/apache2/object-server.template ${apache_vhost_dir}/object-server-${node_number}
+        sudo cp ${SWIFT_DIR}/examples/apache2/object-server.template ${apache_vhost_dir}/object-server-${node_number}.conf
         sudo sed -e "
             s/%PORT%/$object_port/g;
             s/%SERVICENAME%/object-server-${node_number}/g;
             s/%APACHE_NAME%/${APACHE_NAME}/g;
             s/%USER%/${STACK_USER}/g;
-        " -i ${apache_vhost_dir}/object-server-${node_number}
+        " -i ${apache_vhost_dir}/object-server-${node_number}.conf
         enable_apache_site object-server-${node_number}
 
         sudo cp ${SWIFT_DIR}/examples/wsgi/object-server.wsgi.template ${SWIFT_APACHE_WSGI_DIR}/object-server-${node_number}.wsgi
@@ -199,14 +199,14 @@
             s/%SERVICECONF%/object-server\/${node_number}.conf/g;
         " -i ${SWIFT_APACHE_WSGI_DIR}/object-server-${node_number}.wsgi
 
-        sudo cp ${SWIFT_DIR}/examples/apache2/container-server.template ${apache_vhost_dir}/container-server-${node_number}
+        sudo cp ${SWIFT_DIR}/examples/apache2/container-server.template ${apache_vhost_dir}/container-server-${node_number}.conf
         sudo sed -e "
             /^#/d;/^$/d;
             s/%PORT%/$container_port/g;
             s/%SERVICENAME%/container-server-${node_number}/g;
             s/%APACHE_NAME%/${APACHE_NAME}/g;
             s/%USER%/${STACK_USER}/g;
-        " -i ${apache_vhost_dir}/container-server-${node_number}
+        " -i ${apache_vhost_dir}/container-server-${node_number}.conf
         enable_apache_site container-server-${node_number}
 
         sudo cp ${SWIFT_DIR}/examples/wsgi/container-server.wsgi.template ${SWIFT_APACHE_WSGI_DIR}/container-server-${node_number}.wsgi
@@ -215,14 +215,14 @@
             s/%SERVICECONF%/container-server\/${node_number}.conf/g;
         " -i ${SWIFT_APACHE_WSGI_DIR}/container-server-${node_number}.wsgi
 
-        sudo cp ${SWIFT_DIR}/examples/apache2/account-server.template ${apache_vhost_dir}/account-server-${node_number}
+        sudo cp ${SWIFT_DIR}/examples/apache2/account-server.template ${apache_vhost_dir}/account-server-${node_number}.conf
         sudo sed -e "
             /^#/d;/^$/d;
             s/%PORT%/$account_port/g;
             s/%SERVICENAME%/account-server-${node_number}/g;
             s/%APACHE_NAME%/${APACHE_NAME}/g;
             s/%USER%/${STACK_USER}/g;
-        " -i ${apache_vhost_dir}/account-server-${node_number}
+        " -i ${apache_vhost_dir}/account-server-${node_number}.conf
         enable_apache_site account-server-${node_number}
 
         sudo cp ${SWIFT_DIR}/examples/wsgi/account-server.wsgi.template ${SWIFT_APACHE_WSGI_DIR}/account-server-${node_number}.wsgi

これで無事に構築することができました。

なぜいまさらicehouseかは気にしないでくださいw

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください