PB:我尝试在两个不同的主机上部署 5 个 vespa 容器,但我没有成功启动我的 vespa 节点。
我在第一台主机上分别用端口 8080、8081、8082 命名了我的 3 个容器 vespa0、vespa1、vespa2,分别用端口 8080、8081 命名了 vespa3、vespa4
我以这种方式启动 vespa 容器
sudo docker run --detach --net=host --name vespa0 --hostname admin_paul0 --privileged --volume $PWD/sample-apps:/vespa-sample-apps --publish 8080:8080 vespaengine/vespa
然后我部署应用程序:
sudo docker exec vespa0 bash -c '/opt/vespa/bin/vespa-deploy prepare /vespa-sample-apps/site_search_multi_node_on_multi_server/src/main/application && /opt/vespa/bin/vespa-deploy activate'
当我写命令时
sudo docker exec vespa0 bash -c '/opt/vespa/bin/vespa-get-cluster-state'
集群检测到两台主机上的节点,但只有一台启动。
Cluster site:
site/distributor/0: down
site/distributor/1: down
site/distributor/3: down
site/distributor/4: up
site/storage/0: down
site/storage/1: down
site/storage/3: down
site/storage/4: up
特此配置应用程序
主机.xml
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
<hosts>
<host name="admin_paul0">
<alias>admin_paul0</alias>
</host>
<host name="stateless_paul0">
<alias>stateless_paul0</alias>
</host>
<host name="content_paul0">
<alias>content_paul0</alias>
</host>
<host name="content_paul1">
<alias>content_paul1</alias>
</host>
<host name="stateless_paul1">
<alias>stateless_paul1</alias>
</host>
</hosts>
服务.xml
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
<services version="1.0">
<admin version="2.0">
<adminserver hostalias="admin_paul0"/>
<configservers>
<configserver hostalias="admin_paul0"/>
</configservers>
</admin>
<container id="container" version="1.0">
<document-api/>
<search/>
<nodes>
<node hostalias="stateless_paul0"/>
<node hostalias="stateless_paul1"/>
<node hostalias="content_paul0"/>
<node hostalias="content_paul1"/>
</nodes>
</container>
<content id="site" version="1.0">
<redundancy>1</redundancy>
<documents>
<document type="site" mode="index"/>
</documents>
<nodes>
<node hostalias="content_paul0" distribution-key="0"/>
<node hostalias="content_paul1" distribution-key="1"/>
<node hostalias="stateless_paul0" distribution-key="3"/>
<node hostalias="stateless_paul1" distribution-key="4"/>
</nodes>
</content>
</services>
你有什么技巧可以让它发挥作用吗?:)