Reputation: 13
PB: I have tried to deploy 5 vespa containers on two different hosts but I do not succeed to make my vespa nodes up.
I named my 3 containers vespa0, vespa1 , vespa2 with port 8080, 8081, 8082 respectively on the first host and vespa3, vespa4 with port 8080, 8081 respectively
I start vespa containers this way
sudo docker run --detach --net=host --name vespa0 --hostname admin_paul0 --privileged --volume $PWD/sample-apps:/vespa-sample-apps --publish 8080:8080 vespaengine/vespa
Then I deploy the application with:
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'
When i write the command
sudo docker exec vespa0 bash -c '/opt/vespa/bin/vespa-get-cluster-state'
The cluster detects the nodes on the two hosts but only one is up.
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
hereby the configuration of the applications
host.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>
services.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>
Do you have any tips that will make it work? :)
Upvotes: 1
Views: 211
Reputation: 86
You have to isolate the network to make this work as Vespa uses a range of other ports that would otherwise conflict (i.e no --net=host). Running on baremetal hosts you could use the macvlan network driver to assign the container a cross-host ip, otherwise you would need to setup NPT or something similar.
Upvotes: 4