Skip to content

Commit

Permalink
add deploy shell
Browse files Browse the repository at this point in the history
  • Loading branch information
wackxu committed Nov 13, 2018
1 parent 619b9c1 commit 5b789b8
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $ git clone https://github.com/kubegene/kubegene.git
We have provide the YAML file that contains all API objects that are necessary to run kubedag, you can easily deploy the kubedag using the follow commands:

```bash
$ kubectl create -f deploy/setup-kubedag.yaml
$ ./hack/local-up-kubedag.sh
```

kubedag will automatically create a Kubernetes Custom Resource Definition (CRD):
Expand Down
5 changes: 4 additions & 1 deletion deploy/clusterRole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ rules:
verbs: ["update", "patch"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["create", "get", "list", "watch", "update", "delete"]
verbs: ["create", "get", "list", "watch", "update", "delete"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
5 changes: 4 additions & 1 deletion deploy/setup-kubedag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["create", "get", "list", "watch", "update", "delete"]

- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]

---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
30 changes: 30 additions & 0 deletions hack/local-up-kubedag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash

# Copyright 2018 The Kubegene Authors.
#
# 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.

# This is a simple script to deploy kubedag in local kubernetes cluster.

set -o errexit
set -o nounset
set -o pipefail

# compile kubedag
make kube-dag

# build docker image
docker build -t kube-dag:v1 .

# deploy kubedag
kubectl create -f ./deploy/setup-kubedag.yaml

0 comments on commit 5b789b8

Please sign in to comment.