Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deployment config #43

Merged
merged 3 commits into from
Jul 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,17 @@ docker run -it --network=host asia.gcr.io/linker-aurora/vortex:<git-branch> bash
// example
docker run -it --network=host asia.gcr.io/linker-aurora/vortex:develop bash
```

# Deploy to Kubernetes

1. Apply base storage system
2. Apply service
3. Apply apps
- require cluster admin to apply role binding

```
kubectl apply -f deploy/kubernetes/base/service/mongodb

kubectl apply -f deploy/kubernetes/apps/monitoring/monitoring-namespace.yaml
kubectl apply -f deploy/kubernetes/apps/ --resursive
```
13 changes: 0 additions & 13 deletions deploy/kubernetes/base/gluster/slow-many.yaml

This file was deleted.

38 changes: 38 additions & 0 deletions deploy/kubernetes/service/mongodb/statefulset-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: mongo
spec:
serviceName: "mongo"
replicas: 1
template:
metadata:
labels:
service: mongo
role: db
spec:
terminationGracePeriodSeconds: 10
containers:
- name: mongo
resources:
requests:
cpu: 100m
image: mongo
command:
- mongod
- "--bind_ip"
- 0.0.0.0
ports:
- containerPort: 27017
volumeMounts:
- name: mongodb
mountPath: /data/db
volumeClaimTemplates:
- metadata:
name: mongodb
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "manual"
resources:
requests:
storage: 10Gi
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate mongo/statefulset
dev -> manual for local testing
default -> slow-many for production

4 changes: 2 additions & 2 deletions deploy/kubernetes/service/mongodb/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ spec:
- metadata:
name: mongodb
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "manual"
accessModes: [ "ReadWriteMany" ]
storageClassName: "slow-many"
resources:
requests:
storage: 10Gi