diff options
author | Valerij Fredriksen <valerijf@oath.com> | 2017-09-18 15:25:28 +0200 |
---|---|---|
committer | Valerij Fredriksen <valerijf@oath.com> | 2017-09-18 15:25:28 +0200 |
commit | c7c4d4e32dad561302e742d956fc6876a8a98656 (patch) | |
tree | a89e4c5a4aa9102c315a010ef0d45e7b5fc72fd8 /node-admin | |
parent | 80282532a497eca848480ecc8c931ca9cc9ed9cb (diff) |
Remove old READMEs
Diffstat (limited to 'node-admin')
-rw-r--r-- | node-admin/README.md | 110 | ||||
-rw-r--r-- | node-admin/README_LINUX.md | 52 | ||||
-rw-r--r-- | node-admin/README_MAC.md | 39 |
3 files changed, 1 insertions, 200 deletions
diff --git a/node-admin/README.md b/node-admin/README.md index bab4c17ffbf..a2f0ba2c4ec 100644 --- a/node-admin/README.md +++ b/node-admin/README.md @@ -1,111 +1,3 @@ # Node Admin -## Setup - -Set up Docker on your machine according to the instructions in [Linux](README_LINUX.md) or [Mac](README_MAC.md), depending on your hardware. - -You should have the docker daemon running and the following environment variables set: -``` -VESPA_HOME -VESPA_WEB_SERVICE_PORT -``` - -To update `/etc/hosts` with the required hostnames for the local containers, run -``` -sudo ./scripts/etc-hosts.sh -``` - -## Developing - -We will describe how you can build a Docker image for Vespa which will be used -to set up a local Docker container with the Node Admin, and a local container -with the Config Server. - -Then, we'll show how you bring up this local zone. And finally, how you can -deploy a local Vespa application to this zone. - -[RunVespaLocal.java](src/test/java/com/yahoo/vespa/hosted/node/admin/docker/RunVespaLocal.java) -implements all of the basic methods you need to get started. - -### Starting a Local Zone - -To start a local zone, simply run: -``` - DockerImage dockerImage = new DockerImage("docker-registry.domain.tld:8080/vespa/ci:6.111.21"); - Path pathToVespaRoot = Paths.get("/home/valerijf/dev/vespa"); - Path pathToContainerStorage = Paths.get("/home/docker/container-storage"); - - RunVespaLocal runVespaLocal = new RunVespaLocal(pathToVespaRoot); - runVespaLocal.startLocalZoneWithNodes(dockerImage, 5); - runVespaLocal.startNodeAdminAsContainer(dockerImage, pathToContainerStorage); -``` - -### Deploying a Local Application - -Package and deploy vespa application by running: - -``` - Path pathToApp = pathToVespaRoot.resolve("sample-apps/blog-search"); - runVespaLocal.deployApplication(pathToApp); -``` -If the deployment is successful, the final log entry should be something like -``` -INFO: Endpoint http://cnode-1:4080/ is now ready -``` -use this endpoint URL to feed or query your application. - -You can delete application with - -``` - runVespaLocal.deleteApplication(); -``` - -### Feed and search - 1. **Feed** the data that is to be searched - ```sh - - # Feeding two documents - curl -X POST --data-binary @music-data-1.json <endpoint url>/document/v1/music/music/docid/1 | python -m json.tool - curl -X POST --data-binary @music-data-2.json <endpoint url>/document/v1/music/music/docid/2 | python -m json.tool - - ``` - - 2. **Visit documents** - - Since we do not have many documents we can list them all - ```sh - - # All documents - curl <endpoint url>/document/v1/music/music/docid | python -m json.tool - - # Document with id 1 - curl <endpoint url>/document/v1/music/music/docid/1 | python -m json.tool - - ``` - - 3. **Search** - We can also search for documents: - ```sh - - curl '<endpoint url>/search/?query=bad' | python -m json.tool - - - ``` - -## Troubleshooting - -If the container doesn't start, it can be helpful to look at the jdisc log. First, find the container id: -``` -docker ps -a -``` - -Then, find the log files: -``` -docker diff <container id>| grep $VESPA_HOME/logs -``` - -View the log file (`-L` follows the symbolic link): -``` -docker cp -L <container id>:$VESPA_HOME/logs/jdisc_core/jdisc_core.log - | less -``` - +Manages docker containers that run different applications on a host.
\ No newline at end of file diff --git a/node-admin/README_LINUX.md b/node-admin/README_LINUX.md deleted file mode 100644 index 56c1fb60a7e..00000000000 --- a/node-admin/README_LINUX.md +++ /dev/null @@ -1,52 +0,0 @@ -# Setting up Docker on a linux machine - -First, install Docker. With Fedora 21 you should follow -https://docs.docker.com/engine/installation/linux/fedora/, which describes how to install -Docker. - -## Configuring Docker - -Docker will by default download (huge) images to a directory under `/var`. On our -Fedora machines, `/var` is part of the root filesystem, which does not have a lot -of free space. Since docker runs as `root`, it is allowed to completely fill up -the filesystem, and it will happily do so. Fedora works very poorly with a full -root filesystem. You won't even be able to log in and clean up the disk usage -once it's happened. - -So you'll want to store images somewhere else. An obvious choice is `/home`, -which typically has a lot more room. Make Docker use directories in the docker -user's home directory, set the `--graph` option by editing -`/etc/systemd/system/docker.service.d/docker.conf` to: - -``` -[Service] -ExecStart= -ExecStart=/usr/bin/dockerd \ - --debug \ - --graph=/home/docker/data \ - --host=127.0.0.1:2376 \ - --host=unix:///var/run/docker.sock \ - --selinux-enabled \ - --storage-driver=devicemapper \ - --storage-opt=dm.basesize=20G -``` - -Finally, start docker: -``` -sudo systemctl start docker -``` - - - -## Other - -For more information on how to configure the docker daemon, see https://docs.docker.com/engine/admin/systemd/. - -## Upgrade of Docker - -When Docker upgrades it may overwrite /lib/systemd/system/docker.service. The -symptom is that any docker command will fail with the error message "Cannot -connect to the Docker daemon. Is the docker daemon running on this host?". - -Once you have updated docker.service according to this document, and restarted -the Docker daemon, Docker should work again. diff --git a/node-admin/README_MAC.md b/node-admin/README_MAC.md deleted file mode 100644 index 49c723b2cd6..00000000000 --- a/node-admin/README_MAC.md +++ /dev/null @@ -1,39 +0,0 @@ -# Setting up Docker on OS X -Install Docker Toolbox according to the procedure on [https://www.docker.com/products/docker-toolbox](https://www.docker.com/products/docker-toolbox). -Note: We need to use Docker Toolbox instead of Docker for Mac for running node-admin or system tests, since we need to -configure networking per container. - -# Running Vespa on OS X - -## Starting the VM -On OS X the docker daemon is running inside a VM called boot2docker. This VM is running using the -VirtualBox virtualization software. To setup and start the VM for the first time, execute the -following script: - -``` -docker-machine create -d virtualbox default -``` -You should now have a Docker machine up and running. This can be verified with: - -``` -docker-machine ls -``` - -which should list the running ```default``` machine. - -Regular ```docker``` commands works as in Linux when you have the environment variables set. -Look in [README.md](README.md) for useful docker commands. - -## Running Vespa applications or system tests - -Before running any applications you need to make containers visible for your Mac: -``` -sudo route add 172.18.0.0/16 192.168.99.100 -``` - -Follow the instructions in [README.md](README.md) for starting local zones and deploying applications. - -## Issues -* Accessing Vespa from OS X while on a Cisco VPN connection does not work. This is because the VPN client will protect the routing table on OS X. - * Workaround is to use ```docker-machine ssh vespa``` and then execute everything from inside the VM. - |