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
c51edede
Commit
c51edede
authored
Nov 17, 2015
by
vaikas-google
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #90 from goltermann/ns
Put DM into its own namespace
parents
701f5945
6b4726d3
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
13 deletions
+35
-13
README.md
README.md
+3
-3
dm.go
dm/dm.go
+1
-1
bootstrap.sh
examples/bootstrap/bootstrap.sh
+5
-1
bootstrap.yaml
examples/bootstrap/bootstrap.yaml
+3
-0
dm-namespace.yaml
examples/bootstrap/dm-namespace.yaml
+7
-0
install.yaml
install.yaml
+14
-6
deployer_test.go
manager/manager/deployer_test.go
+2
-2
No files found.
README.md
View file @
c51edede
...
@@ -55,7 +55,7 @@ install.yaml`
...
@@ -55,7 +55,7 @@ install.yaml`
That's it. You can now use
`kubectl`
to see DM running in your cluster:
That's it. You can now use
`kubectl`
to see DM running in your cluster:
```
```
kubectl get pod,rc,service
kubectl get pod,rc,service
--namespace=dm
```
```
If you see expandybird-service, manager-service, resourcifier-service, and
If you see expandybird-service, manager-service, resourcifier-service, and
...
@@ -70,9 +70,9 @@ The easiest way to interact with Deployment Manager is through the `dm` tool
...
@@ -70,9 +70,9 @@ 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. To set that up:
1.
Build the tool by running
`make`
in the deployment-manager repository.
1.
Build the tool by running
`make`
in the deployment-manager repository.
1.
Run
`kubectl proxy --port=8001 &`
to start a proxy that lets you interact
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
with the Kubernetes API server through port 8001 on localhost.
`dm`
uses
`http://localhost:8001/api/v1/proxy/namespaces/d
efault
/services/manager-service:manager`
`http://localhost:8001/api/v1/proxy/namespaces/d
m
/services/manager-service:manager`
as the default service address for DM.
as the default service address for DM.
### Using the client
### Using the client
...
...
dm/dm.go
View file @
c51edede
...
@@ -39,7 +39,7 @@ var (
...
@@ -39,7 +39,7 @@ var (
stdin
=
flag
.
Bool
(
"stdin"
,
false
,
"Reads a configuration from the standard input"
)
stdin
=
flag
.
Bool
(
"stdin"
,
false
,
"Reads a configuration from the standard input"
)
properties
=
flag
.
String
(
"properties"
,
""
,
"Properties to use when deploying a template (e.g., --properties k1=v1,k2=v2)"
)
properties
=
flag
.
String
(
"properties"
,
""
,
"Properties to use when deploying a template (e.g., --properties k1=v1,k2=v2)"
)
template_registry
=
flag
.
String
(
"registry"
,
"kubernetes/deployment-manager/templates"
,
"Github based template registry (owner/repo[/path])"
)
template_registry
=
flag
.
String
(
"registry"
,
"kubernetes/deployment-manager/templates"
,
"Github based template registry (owner/repo[/path])"
)
service
=
flag
.
String
(
"service"
,
"http://localhost:8001/api/v1/proxy/namespaces/d
efault
/services/manager-service:manager"
,
"URL for deployment manager"
)
service
=
flag
.
String
(
"service"
,
"http://localhost:8001/api/v1/proxy/namespaces/d
m
/services/manager-service:manager"
,
"URL for deployment manager"
)
binary
=
flag
.
String
(
"binary"
,
"../expandybird/expansion/expansion.py"
,
"Path to template expansion binary"
)
binary
=
flag
.
String
(
"binary"
,
"../expandybird/expansion/expansion.py"
,
"Path to template expansion binary"
)
)
)
...
...
examples/bootstrap/bootstrap.sh
View file @
c51edede
...
@@ -41,9 +41,13 @@ pkill -f $MANAGER
...
@@ -41,9 +41,13 @@ pkill -f $MANAGER
$MANAGER
>
$LOGDIR
/manager.log 2>&1
--port
=
8080
--expanderURL
=
http://localhost:8081
--deployerURL
=
http://localhost:8082 &
$MANAGER
>
$LOGDIR
/manager.log 2>&1
--port
=
8080
--expanderURL
=
http://localhost:8081
--deployerURL
=
http://localhost:8082 &
echo
echo
echo
"Creating dm namespace..."
$KUBECTL
create
-f
dm-namespace.yaml
echo
echo
"Starting kubectl proxy..."
echo
"Starting kubectl proxy..."
pkill
-f
"
$KUBECTL
proxy"
pkill
-f
"
$KUBECTL
proxy"
$KUBECTL
proxy
--port
=
8001 &
$KUBECTL
proxy
--port
=
8001
--namespace
=
dm
&
sleep
1s
sleep
1s
echo
echo
...
...
examples/bootstrap/bootstrap.yaml
View file @
c51edede
...
@@ -2,6 +2,7 @@ resources:
...
@@ -2,6 +2,7 @@ resources:
-
name
:
expandybird
-
name
:
expandybird
type
:
https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v1/replicatedservice.py
type
:
https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v1/replicatedservice.py
properties
:
properties
:
namespace
:
dm
service_port
:
8081
service_port
:
8081
target_port
:
8080
target_port
:
8080
container_port
:
8080
container_port
:
8080
...
@@ -13,6 +14,7 @@ resources:
...
@@ -13,6 +14,7 @@ resources:
-
name
:
resourcifier
-
name
:
resourcifier
type
:
https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v1/replicatedservice.py
type
:
https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v1/replicatedservice.py
properties
:
properties
:
namespace
:
dm
service_port
:
8082
service_port
:
8082
target_port
:
8080
target_port
:
8080
container_port
:
8080
container_port
:
8080
...
@@ -24,6 +26,7 @@ resources:
...
@@ -24,6 +26,7 @@ resources:
-
name
:
manager
-
name
:
manager
type
:
https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v1/replicatedservice.py
type
:
https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v1/replicatedservice.py
properties
:
properties
:
namespace
:
dm
service_port
:
8080
service_port
:
8080
target_port
:
8080
target_port
:
8080
container_port
:
8080
container_port
:
8080
...
...
examples/bootstrap/dm-namespace.yaml
0 → 100644
View file @
c51edede
apiVersion
:
v1
kind
:
Namespace
metadata
:
labels
:
app
:
dm
name
:
dm-namespace
name
:
dm
install.yaml
View file @
c51edede
...
@@ -11,6 +11,14 @@
...
@@ -11,6 +11,14 @@
# limitations under the License.
# limitations under the License.
######################################################################
######################################################################
---
apiVersion
:
v1
kind
:
Namespace
metadata
:
labels
:
app
:
dm
name
:
dm-namespace
name
:
dm
---
---
apiVersion
:
v1
apiVersion
:
v1
kind
:
Service
kind
:
Service
...
@@ -19,7 +27,7 @@ metadata:
...
@@ -19,7 +27,7 @@ metadata:
app
:
dm
app
:
dm
name
:
expandybird-service
name
:
expandybird-service
name
:
expandybird-service
name
:
expandybird-service
namespace
:
d
efault
namespace
:
d
m
spec
:
spec
:
ports
:
ports
:
-
name
:
expandybird
-
name
:
expandybird
...
@@ -36,7 +44,7 @@ metadata:
...
@@ -36,7 +44,7 @@ metadata:
app
:
dm
app
:
dm
name
:
expandybird-rc
name
:
expandybird-rc
name
:
expandybird-rc
name
:
expandybird-rc
namespace
:
d
efault
namespace
:
d
m
spec
:
spec
:
replicas
:
2
replicas
:
2
selector
:
selector
:
...
@@ -63,7 +71,7 @@ metadata:
...
@@ -63,7 +71,7 @@ metadata:
app
:
dm
app
:
dm
name
:
resourcifier-service
name
:
resourcifier-service
name
:
resourcifier-service
name
:
resourcifier-service
namespace
:
d
efault
namespace
:
d
m
spec
:
spec
:
ports
:
ports
:
-
name
:
resourcifier
-
name
:
resourcifier
...
@@ -80,7 +88,7 @@ metadata:
...
@@ -80,7 +88,7 @@ metadata:
app
:
dm
app
:
dm
name
:
resourcifier-rc
name
:
resourcifier-rc
name
:
resourcifier-rc
name
:
resourcifier-rc
namespace
:
d
efault
namespace
:
d
m
spec
:
spec
:
replicas
:
2
replicas
:
2
selector
:
selector
:
...
@@ -107,7 +115,7 @@ metadata:
...
@@ -107,7 +115,7 @@ metadata:
app
:
dm
app
:
dm
name
:
manager-service
name
:
manager-service
name
:
manager-service
name
:
manager-service
namespace
:
d
efault
namespace
:
d
m
spec
:
spec
:
ports
:
ports
:
-
name
:
manager
-
name
:
manager
...
@@ -124,7 +132,7 @@ metadata:
...
@@ -124,7 +132,7 @@ metadata:
app
:
dm
app
:
dm
name
:
manager-rc
name
:
manager-rc
name
:
manager-rc
name
:
manager-rc
namespace
:
d
efault
namespace
:
d
m
spec
:
spec
:
replicas
:
1
replicas
:
1
selector
:
selector
:
...
...
manager/manager/deployer_test.go
View file @
c51edede
...
@@ -37,7 +37,7 @@ resources:
...
@@ -37,7 +37,7 @@ resources:
apiVersion: v1
apiVersion: v1
metadata:
metadata:
name: test-controller-v1
name: test-controller-v1
namespace: d
efault
namespace: d
m
labels:
labels:
k8s-app: test
k8s-app: test
version: v1
version: v1
...
@@ -66,7 +66,7 @@ resources:
...
@@ -66,7 +66,7 @@ resources:
kind: Service
kind: Service
metadata:
metadata:
name: test
name: test
namespace: d
efault
namespace: d
m
labels:
labels:
k8s-app: test
k8s-app: test
version: v1
version: v1
...
...
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