summaryrefslogtreecommitdiffstats
path: root/node-admin
diff options
context:
space:
mode:
Diffstat (limited to 'node-admin')
-rw-r--r--node-admin/.gitignore6
-rw-r--r--node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/docker/LocalZoneUtils.java4
-rw-r--r--node-admin/vespa-local/Dockerfile.template (renamed from node-admin/Dockerfile.template)12
-rw-r--r--node-admin/vespa-local/http-server.xml (renamed from node-admin/include/http-server.xml)0
-rw-r--r--node-admin/vespa-local/node-flavors.xml15
-rwxr-xr-xnode-admin/vespa-local/nodectl-instance.sh (renamed from node-admin/include/nodectl-instance.sh)0
-rw-r--r--node-admin/vespa-local/root-bashrc (renamed from node-admin/include/root-bashrc)0
-rw-r--r--node-admin/vespa-local/services.xml22
-rwxr-xr-xnode-admin/vespa-local/start-config-server.sh (renamed from node-admin/include/start-config-server.sh)0
-rwxr-xr-xnode-admin/vespa-local/start-services.sh (renamed from node-admin/include/start-services.sh)0
10 files changed, 46 insertions, 13 deletions
diff --git a/node-admin/.gitignore b/node-admin/.gitignore
index 750f12730e3..748809cfb78 100644
--- a/node-admin/.gitignore
+++ b/node-admin/.gitignore
@@ -1,4 +1,2 @@
-/dependencies
-/Dockerfile
-include/services.xml
-/**/*.pyc
+vespa-local/Dockerfile
+vespa-local/services.xml
diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/docker/LocalZoneUtils.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/docker/LocalZoneUtils.java
index 2dd2ef6f6ac..0f1f79d68a1 100644
--- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/docker/LocalZoneUtils.java
+++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/docker/LocalZoneUtils.java
@@ -123,9 +123,9 @@ public class LocalZoneUtils {
}
public static void buildVespaLocalDockerImage(Docker docker, DockerImage vespaBaseImage) throws IOException {
- Path dockerfilePath = PROJECT_ROOT.resolve("node-admin/Dockerfile");
+ Path dockerfilePath = PROJECT_ROOT.resolve("node-admin/vespa-local/Dockerfile");
- Path dockerfileTemplatePath = Paths.get("node-admin/Dockerfile.template");
+ Path dockerfileTemplatePath = Paths.get("node-admin/vespa-local/Dockerfile.template");
String dockerfileTemplate = new String(Files.readAllBytes(dockerfileTemplatePath))
.replaceAll("\\$NODE_ADMIN_FROM_IMAGE", vespaBaseImage.asString())
.replaceAll("\\$VESPA_HOME", Defaults.getDefaults().vespaHome());
diff --git a/node-admin/Dockerfile.template b/node-admin/vespa-local/Dockerfile.template
index e69308deae3..53f8bfac18f 100644
--- a/node-admin/Dockerfile.template
+++ b/node-admin/vespa-local/Dockerfile.template
@@ -15,21 +15,19 @@ FROM $NODE_ADMIN_FROM_IMAGE
# Be aware that this Dockerfile is not being used in any pipelines and has no relation to production environments etc.
# It is here for developers' convenience - it allows building and experimenting with node-admin locally.
-CMD $VESPA_HOME/bin/start-services.sh
-
# Things for convenience.
RUN yum install -y tcpdump
-ADD include/root-bashrc /root/.bashrc
+ADD root-bashrc /root/.bashrc
# Make config-server aware of node flavor 'docker'.
-ADD include/node-flavors.xml $VESPA_HOME/conf/configserver-app/node-flavors.xml
+ADD node-flavors.xml $VESPA_HOME/conf/configserver-app/node-flavors.xml
# Make config-server also listen to 4080
-ADD include/http-server.xml $VESPA_HOME/conf/configserver-app/hosted-vespa/http-server.xml
+ADD http-server.xml $VESPA_HOME/conf/configserver-app/hosted-vespa/http-server.xml
# Entrypoint for running config server in a container.
-ADD include/start-config-server.sh $VESPA_HOME/bin/start-config-server.sh
+ADD start-config-server.sh $VESPA_HOME/bin/start-config-server.sh
# Included in base image, but here overridden with local modifications.
# TODO: Update the source instead.
-ADD include/start-services.sh $VESPA_HOME/bin/start-services.sh
+ADD start-services.sh $VESPA_HOME/bin/start-services.sh
diff --git a/node-admin/include/http-server.xml b/node-admin/vespa-local/http-server.xml
index f77d392de97..f77d392de97 100644
--- a/node-admin/include/http-server.xml
+++ b/node-admin/vespa-local/http-server.xml
diff --git a/node-admin/vespa-local/node-flavors.xml b/node-admin/vespa-local/node-flavors.xml
new file mode 100644
index 00000000000..7d22975994a
--- /dev/null
+++ b/node-admin/vespa-local/node-flavors.xml
@@ -0,0 +1,15 @@
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<config name="config.provisioning.flavors">
+ <flavor>
+ <item>
+ <!-- Note: This flavor does NOT match the production 'docker' flavor -->
+ <name>docker</name>
+ <environment>DOCKER_CONTAINER</environment>
+ <minCpuCores>1.0</minCpuCores>
+ <minMainMemoryAvailableGb>3.0</minMainMemoryAvailableGb>
+ <minDiskAvailableGb>10.0</minDiskAvailableGb>
+ <description>DOCKER_CONTAINER with 1.0 CPUs, 3.0 Gb memory and 10.0 Gb disk</description>
+ </item>
+ </flavor>
+</config>
+
diff --git a/node-admin/include/nodectl-instance.sh b/node-admin/vespa-local/nodectl-instance.sh
index b40ce44e33a..b40ce44e33a 100755
--- a/node-admin/include/nodectl-instance.sh
+++ b/node-admin/vespa-local/nodectl-instance.sh
diff --git a/node-admin/include/root-bashrc b/node-admin/vespa-local/root-bashrc
index fda1752c85f..fda1752c85f 100644
--- a/node-admin/include/root-bashrc
+++ b/node-admin/vespa-local/root-bashrc
diff --git a/node-admin/vespa-local/services.xml b/node-admin/vespa-local/services.xml
new file mode 100644
index 00000000000..5c222ebf025
--- /dev/null
+++ b/node-admin/vespa-local/services.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services version="1.0">
+ <jdisc version="1.0" jetty="true">
+ <!-- Please update container test when changing this file -->
+ <handler id="com.yahoo.vespa.hosted.node.admin.restapi.RestApiHandler" bundle="node-admin">
+ <binding>http://*/rest/*</binding>
+ </handler>
+ <component id="node-admin" class="com.yahoo.vespa.hosted.node.admin.provider.ComponentsProviderImpl" bundle="node-admin"/>
+ <component id="docker-api" class="com.yahoo.vespa.hosted.dockerapi.DockerImpl" bundle="docker-api"/>
+ <component id="metrics-wrapper" class="com.yahoo.vespa.hosted.dockerapi.metrics.MetricReceiverWrapper" bundle="docker-api"/>
+
+ <config name='vespa.hosted.dockerapi.docker'>
+ <uri>tcp://localhost:2376</uri>
+ <isRunningLocally>true</isRunningLocally>
+ </config>
+
+ <config name='vespa.hosted.node.admin.node-admin'>
+ <isRunningLocally>true</isRunningLocally>
+ </config>
+ </jdisc>
+</services>
diff --git a/node-admin/include/start-config-server.sh b/node-admin/vespa-local/start-config-server.sh
index a592ec3cbd3..a592ec3cbd3 100755
--- a/node-admin/include/start-config-server.sh
+++ b/node-admin/vespa-local/start-config-server.sh
diff --git a/node-admin/include/start-services.sh b/node-admin/vespa-local/start-services.sh
index 0fe5c1c0724..0fe5c1c0724 100755
--- a/node-admin/include/start-services.sh
+++ b/node-admin/vespa-local/start-services.sh