Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
046b210a
Commit
046b210a
authored
Mar 30, 2016
by
Adam Reese
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #528 from adamreese/fix/bootstrap
fix(examples): remove bootstrap example
parents
2d131e91
fc746c64
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
178 deletions
+0
-178
README.md
examples/bootstrap/README.md
+0
-76
bootstrap.sh
examples/bootstrap/bootstrap.sh
+0
-58
bootstrap.yaml
examples/bootstrap/bootstrap.yaml
+0
-37
dm-namespace.yaml
examples/bootstrap/dm-namespace.yaml
+0
-7
No files found.
examples/bootstrap/README.md
deleted
100644 → 0
View file @
2d131e91
# 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
)
.
examples/bootstrap/bootstrap.sh
deleted
100755 → 0
View file @
2d131e91
#!/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."
examples/bootstrap/bootstrap.yaml
deleted
100644 → 0
View file @
2d131e91
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
examples/bootstrap/dm-namespace.yaml
deleted
100644 → 0
View file @
2d131e91
apiVersion
:
v1
kind
:
Namespace
metadata
:
labels
:
app
:
dm
name
:
dm-namespace
name
:
dm
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment