diff --git a/examples/bootstrap/README.md b/examples/bootstrap/README.md deleted file mode 100644 index 9d53ac695..000000000 --- a/examples/bootstrap/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# Bootstrapping Deployment Manager - -Welcome to the bootstrap example. The instructions below will step you through -the process of building and running a local instance of DM on your local machine, -and then using it to deploy another instance of DM in your cluster. - -This example provides insights into how DM works, and is recommended for anyone -interested in contributing to the project. - -## Prerequisites - -Before you can bootstrap DM, the following prerequisites must be satisfied. - -### Kubernetes cluster and go configuration - -1. Make sure your Kubernetes cluster is up and running, and that you can run -`kubectl` commands against it. -1. Clone this repository into the src folder of your GOPATH, if you haven't already. -1. Make sure your PATH contains `$GOPATH/bin`. - -### Installing required python packages - -Since Deployment Manager uses Python and will be running locally on your -machine, you need to make sure the necessary Python packages are installed. This -step assumes that you have already installed the pip package management system -on your machine. - -``` -pip install -r expandybird/requirements.txt -``` - -Note: depending on how you installed python and pip, you may need to use `sudo` -for this command. - -## Bootstrapping Deployment Manager - -With the prerequisites satisfied, you're ready to bootstrap DM. - -### Building and installing the binaries - -First, you're going to build and install the DM binaries. You can do this by -running make in the repository root. - -``` -make -``` - -### Start Deployment Manager on localhost - -Next, start the three DM binaries on localhost using the supplied bootstrap script. - -``` -./examples/bootstrap/bootstrap.sh -``` - -The script starts the following binaries: -* manager (frontend service) running on port 8080 -* expandybird (expands templates) running on port 8081 -* resourcifier (reifies primitive Kubernetes resources) running on port 8082 - -It also starts kubectl proxy on port 8001. - -### Deploy Deployment Manager into your cluster - -Finally, use the DM running on localhost to deploy another instance of DM onto -the cluster using `dm` and the supplied template. Note that you are using the -`--service` flag to point `dm` to the instance of DM running on localhost, rather -than to an instance of DM running in the cluster through `kubectl proxy`, which -is the default. - -``` -dm --service=http://localhost:8080 deploy examples/bootstrap/bootstrap.yaml -``` - -You now have Deployment Manager running on your cluster. You can see it running -using `kubectl`, as described in the top level [README.md](../../README.md). diff --git a/examples/bootstrap/bootstrap.sh b/examples/bootstrap/bootstrap.sh deleted file mode 100755 index ad6222a3a..000000000 --- a/examples/bootstrap/bootstrap.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -LOGDIR=log -if [[ ! -d $LOGDIR ]]; then - mkdir $LOGDIR -fi - -KUBECTL=`which kubectl` -if [[ -z $KUBECTL ]] ; then - echo Cannot find kubectl - exit 1 -fi - -echo "Starting resourcifier..." -RESOURCIFIER=`which resourcifier` -if [[ -z $RESOURCIFIER ]] ; then - echo Cannot find resourcifier - exit 1 -fi -pkill -f $RESOURCIFIER -nohup $RESOURCIFIER > $LOGDIR/resourcifier.log 2>&1 --kubectl=$KUBECTL --port=8082 & -echo - -echo "Starting expandybird..." -EXPANDYBIRD=`which expandybird` -if [[ -z $EXPANDYBIRD ]] ; then - echo Cannot find expandybird - exit 1 -fi -pkill -f $EXPANDYBIRD -nohup $EXPANDYBIRD > $LOGDIR/expandybird.log 2>&1 --port=8081 --expansion_binary=expandybird/expansion/expansion.py & -echo - -echo "Starting deployment manager..." -MANAGER=`which manager` -if [[ -z $MANAGER ]] ; then - echo Cannot find manager - exit 1 -fi -pkill -f $MANAGER -nohup $MANAGER > $LOGDIR/manager.log 2>&1 --port=8080 --kubectl=$KUBECTL --expanderURL=http://localhost:8081 --deployerURL=http://localhost:8082 & -echo - -echo "Creating dm namespace..." -$KUBECTL get namespace dm >/dev/null 2>/dev/null -if [ $? -ne 0 ]; then - BOOTSTRAP_PATH=$( cd $(dirname $0) ; pwd -P ) - $KUBECTL create -f $BOOTSTRAP_PATH/dm-namespace.yaml -fi -echo - -echo "Starting kubectl proxy..." -pkill -f "$KUBECTL proxy" -nohup $KUBECTL proxy --port=8001 --namespace=dm & -sleep 1s -echo - -echo "Done." diff --git a/examples/bootstrap/bootstrap.yaml b/examples/bootstrap/bootstrap.yaml deleted file mode 100644 index 4deabeb45..000000000 --- a/examples/bootstrap/bootstrap.yaml +++ /dev/null @@ -1,37 +0,0 @@ -resources: -- name: expandybird - type: github.com/kubernetes/application-dm-templates/common/replicatedservice:v1 - properties: - namespace: dm - service_port: 8081 - target_port: 8080 - container_port: 8080 - external_service: false - replicas: 2 - image: gcr.io/dm-k8s-prod/expandybird:latest - labels: - app: dm -- name: resourcifier - type: github.com/kubernetes/application-dm-templates/common/replicatedservice:v1 - properties: - namespace: dm - service_port: 8082 - target_port: 8080 - container_port: 8080 - external_service: false - replicas: 2 - image: gcr.io/dm-k8s-prod/resourcifier:latest - labels: - app: dm -- name: manager - type: github.com/kubernetes/application-dm-templates/common/replicatedservice:v1 - properties: - namespace: dm - service_port: 8080 - target_port: 8080 - container_port: 8080 - external_service: false - replicas: 1 - image: gcr.io/dm-k8s-prod/manager:latest - labels: - app: dm diff --git a/examples/bootstrap/dm-namespace.yaml b/examples/bootstrap/dm-namespace.yaml deleted file mode 100644 index 91eeb5bac..000000000 --- a/examples/bootstrap/dm-namespace.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - labels: - app: dm - name: dm-namespace - name: dm