pull/128/merge
Brendan Melville 10 years ago
commit eef02244ca

@ -1,4 +1,4 @@
SUBDIRS := expandybird/. resourcifier/. manager/.
SUBDIRS := expandybird/. resourcifier/. manager/. dm/.
TARGETS := all build test push container clean
SUBDIRS_TARGETS := \

@ -87,13 +87,41 @@ is up and running!
### Setting up the client
The easiest way to interact with Deployment Manager is through the `dm` tool
hitting a `kubectl` proxy. To set that up:
hitting a `kubectl` proxy.
1. Build the tool by running `make` in the deployment-manager repository.
1. Run `kubectl proxy --port=8001 --namespace=dm &` to start a proxy that lets you interact
with the Kubernetes API server through port 8001 on localhost. `dm` uses
#### Creating a proxy
You can run the following to start a proxy that lets you interact with the
Kubernetes API server through port 8001 on `localhost`
```
kubectl proxy --port=8001 --namespace=dm &
```
`dm` will use
`http://localhost:8001/api/v1/proxy/namespaces/dm/services/manager-service:manager`
as the default service address for DM.
as the default service address for the DM service.
#### Getting the client
You can get access to the client in one of two ways:
1. Build the client by running `make` in the deployment-manager repository.
1. Use the client from the container `gcr.io/dm-k8s-testing/dm`.
**NOTE**: If you are using the client from the docker container, you will need
to substitute the following docker command in place of `dm` in all of the
examples below, or alias the command appropriately.
```
alias dm="docker run --net=host gcr.io/dm-k8s-testing/dm"
```
If you are running the docker container on a Mac, you'll also need to substitute
your machine IP to access the Kubernetes proxy running locally:
```
alias dm="docker run gcr.io/dm-k8s-testing/dm --service http://<MACHINE IP ADDRESS>:8001/api/v1/proxy/namespaces/dm/services/manager-service:manager"
```
### Using the client

@ -0,0 +1,25 @@
# Copyright 2015 Google, Inc. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.4
MAINTAINER Jack Greenfield <jackgr@google.com>
RUN mkdir -p "$GOPATH/src/github.com" && chmod 777 "$GOPATH/src/github.com"
WORKDIR "$GOPATH"
RUN go-wrapper download github.com/kubernetes/deployment-manager/dm/...
RUN go-wrapper install github.com/kubernetes/deployment-manager/dm/...
ENTRYPOINT ["bin/dm"]

@ -0,0 +1,27 @@
# Makefile for the Docker image $(DOCKER_REGISTRY)/$(PROJECT)/dm
# MAINTAINER: Jack Greenfield <jackgr@google.com>
# If you update this image please check the tag value before pushing.
.PHONY : all build test push container clean .project
DOCKER_REGISTRY := gcr.io
PREFIX := $(DOCKER_REGISTRY)/$(PROJECT)
IMAGE := dm
TAG := latest
ROOT_DIR := $(abspath ./..)
DIR = $(ROOT_DIR)
push: container
ifeq ($(DOCKER_REGISTRY),gcr.io)
gcloud docker push $(PREFIX)/$(IMAGE):$(TAG)
else
docker push $(PREFIX)/$(IMAGE):$(TAG)
endif
container:
docker build -t $(PREFIX)/$(IMAGE):$(TAG) -f Dockerfile $(DIR)
clean:
-docker rmi $(PREFIX)/$(IMAGE):$(TAG)
Loading…
Cancel
Save