Привет я хочу развернуть пакет и мой bundle.yaml
похож на это:
series: trusty
services:
testcharm:
charm: "./trusty/testcharm"
num_units: 1
to:
- "0"
neo4j:
charm: "./trusty/test_neo4j"
num_units: 1
to:
- "1"
relations:
- - "neo4j:db"
- "testcharm:db"
machines:
"0":
series: trusty
constraints: "arch=amd64 cpu-cores=1 cpu-power=100 mem=1740 root-disk=8192"
"1":
series: trusty
constraints: "arch=amd64 cpu-cores=1 cpu-power=100 mem=1740 root-disk=8192"
Теперь я должен изменить мой config.yaml
из моего testcharm из-за опции я добавил, что это отличается в каждой модели. Существует ли способ добавить опцию конфигурации для определенного сервиса в пакете, таким образом, Он развертывается с той опцией?
Можно использовать options:
в Вашем bundle.yaml
для добавления определенных значений конфигурации для определенного очарования.
series: trusty
services:
testcharm:
charm: "./trusty/testcharm"
num_units: 1
to:
- "0"
options:
config-option: "config value"
neo4j:
charm: "./trusty/test_neo4j"
num_units: 1
to:
- "1"
options:
port: "7474"
relations:
- - "neo4j:db"
- "testcharm:db"
machines:
"0":
series: trusty
constraints: "arch=amd64 cpu-cores=1 cpu-power=100 mem=1740 root-disk=8192"
"1":
series: trusty
constraints: "arch=amd64 cpu-cores=1 cpu-power=100 mem=1740 root-disk=8192"
я отредактировал bundle.yaml
. Если было port
опции в Вашем neo4j config.yaml
, можно перезаписать то значение при помощи опций как в пакете выше.