3.2. Fujitsu ETERNUS heat テンプレートの例
以下の /home/stack/templates/eternus-temp.yaml
ファイルには、XML 設定ファイルのサンプルを宣言するために必要なパラメーター (eternus-fc.xml
や eternus-iscsi.xml
など) が含まれます。
/home/stack/templates/eternus-temp.yaml
heat_template_version: 2014-10-16
description: >
Add XML configuration file for the driver settings of each back end
parameters:
server:
type: string
resources:
EternusSetup:
type: OS::Heat::SoftwareConfig
properties:
group: script
config: |
#!/bin/bash
sudo cat > /etc/cinder/eternus-fc.xml <<EOF
<?xml version='1.0' encoding='UTF-8'?>
<FUJITSU>
<EternusIP>0.0.0.0</EternusIP>
<EternusPort>5988</EternusPort>
<EternusUser>smisuser</EternusUser>
<EternusPassword>smispassword</EternusPassword>
<EternusPool>raid5_0001</EternusPool>
<EternusSnapPool>raid5_0001</EternusSnapPool>
</FUJITSU>
EOF
sudo cat > /etc/cinder/eternus-iscsi.xml <<EOF
<?xml version='1.0' encoding='UTF-8'?>
<FUJITSU>
<EternusIP>0.0.0.0</EternusIP>
<EternusPort>5988</EternusPort>
<EternusUser>smisuser</EternusUser>
<EternusPassword>smispassword</EternusPassword>
<EternusPool>raid5_0001</EternusPool>
<EternusSnapPool>raid5_0001</EternusSnapPool>
</FUJITSU>
EOF
sudo cat > /etc/cinder/eternus <<EOF
-----BEGIN RSA PRIVATE KEY----- # 1
MIIEpAIBAAKCAQEAv5yMqonpfniu+l1PJ8qdWZpcf0d4UcHj2uyE7ou7vcZUQ1Cq
s5Q5pjkCgYAxlTIpfOYA8jvLgc7vMEa/ZbhUgAPlYlisxbffmRsBWyJSt9gwHpcW
hvaWo6VD/iUKZ3bOcMK0buUwBdFUt5s9B8mXbYsX6bWovlVkyu8DzQfpDiPnV6C8
...
IB+46IdmCUO0DaciuEz5/KQd4AXBNdTOss2od6OzihDJXKjBwPyP1g==
-----END RSA PRIVATE KEY-----
EOF
ExtraPreDeployment:
type: OS::Heat::SoftwareDeployment
properties:
config: {get_resource: EternusSetup}
server: {get_param: server}
actions: [CREATE,UPDATE]