Skip to content
Open
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
Binary file added 1.3-kubernetes-deployments/Picture-steps-CI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions 1.3-kubernetes-deployments/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@



# FIWARE:WIRECLOUD DEPLOYMENT ON THE KUBERNETES
This repository folder provides deployment files of the wirecloud docker instances to build wirecloud docker images on the kubernetes cluster.This will help the users manage docker container services with kubernetes infrastructre.

[![image](https://raw.githubusercontent.com/tigalab/kubernetes-deployments-docker-wirecloud/tigalab/1.3-kubernetes-deployments/fiqare-product.png)](https://www.tiga.com.tr/)


Kubernetes can be helpfull for such a CI/CD mechanism below.

[![image](https://raw.githubusercontent.com/tigalab/kubernetes-deployments-docker-wirecloud/tigalab/1.3-kubernetes-deployments/Picture-steps-CI.png)](https://www.tiga.com.tr/)

Binary file added 1.3-kubernetes-deployments/fiqare-product.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions 1.3-kubernetes-deployments/postgres-deployment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@




# How to use Deployment files
This folder consists:
-deployments file
-service file
-persistent volume file
-persisten volume claim

How to build the deployments:
***Make sure you have an installed kubernetes cluster node and kubectl tool to manage kubernetes deployments***




edit volume file's #change this part

- create volume with the following command
```
kubectl apply -f postgres-data-volume.yaml
```

- create persistent volume with the following command
```
kubectl apply -f postgres-data-claim.yaml
```

edit the deployment file's #change this part
- create deployment with the following command:
```
kubectl apply -f postgres-deployment.yaml
```

edit service file's #change this part
- create services with the following command:
```
kubectl apply -f postgres-service.yaml
```














Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: postgres-data-claim
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
kind: PersistentVolume
apiVersion: v1
metadata:
name: postgres-data-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
#change this
path: "/mnt/wirecloud/postgres/"
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: postgres
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
app: postgres
spec:
containers:
- env:
- name: POSTGRES_PASSWORD
value: wirepass
image: postgres:latest
name: postgres
ports:
- containerPort: 5432
resources: {}
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgres-data
restartPolicy: Always
volumes:
- name: postgres-data
persistentVolumeClaim:
claimName: postgres-data-claim
status: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: postgres
labels:
app: postgres
spec:
type: NodePort
ports:
- port: 5432
targetPort: 5432
#change this according to you
nodePort: 30220
selector:
app: postgres
44 changes: 44 additions & 0 deletions 1.3-kubernetes-deployments/wirecloud-deployment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@


# How to use Deployment files
This folder consists:
-deployments file
-service file
-persistent volume file
-persisten volume claim

How to build the deployments:
***Make sure you have an installed kubernetes cluster node and kubectl tool to manage kubernetes deployments***




edit volume file's #change this part
- create volume with the following command
```
kubectl apply -f wirecloud-static-volume.yaml
```

- create persistent volume with the following command
```
kubectl apply -f wirecloud-static-persistentvolumeclaim.yaml
```

edit the deployment file's #change this part
- create deployment with the following command:
```
kubectl apply -f wirecloud-deployment.yaml
```

edit service file's #change this part
- create services with the following command:
```
kubectl apply -f wirecloud-service.yaml
```







Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
kind: PersistentVolume
apiVersion: v1
metadata:
name: wirecloud-data
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
hostPath:
#change this
path: "/mnt/wirecloud/wirecloud_data/"
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: wirecloud
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
app: wirecloud
spec:
containers:
- env:
- name: DB_HOST
#change this according to you
value: "192.168.1.123"
- name: "DB_PASSWORD"
#change this according to you
value: wirepass
- name: DB_PORT
#change this according to you
value: "30220"
- name: DEBUG
value: "True"
# - name: ELASTICSEARCH2_URL
# value: http://192.168.1.123:30920/
- name: FORWARDED_ALLOW_IPS
value: '*'
- name: LOGLEVEL
value: INFO
# - name: MEMCACHED_LOCATION
# value: memcached:11211
image: fiware/wirecloud:1.3
name: wirecloud
ports:
- containerPort: 8000
resources: {}
volumeMounts:
- mountPath: /opt/wirecloud_instance/data
name: wirecloud-data
- mountPath: /var/www/static
name: wirecloud-static
restartPolicy: Always
volumes:
- name: wirecloud-data
persistentVolumeClaim:
claimName: wirecloud-data
- name: wirecloud-static
persistentVolumeClaim:
claimName: wirecloud-static
status: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: wirecloud
labels:
app: wirecloud
spec:
type: NodePort
ports:
- port: 8000
targetPort: 8000
#change this according to you
nodePort: 30230
selector:
app: wirecloud
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: wirecloud-static
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
kind: PersistentVolume
apiVersion: v1
metadata:
name: wirecloud-static
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
hostPath:
#change this according to you
path: "/mnt/wirecloud/wirecloud_static/"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ services:
restart: always
image: postgres
environment:
- POSTGRES_PASSWORD=wirepass # Change this password!
- POSTGRES_PASSWORD=wirepass
volumes:
- ./postgres-data:/var/lib/postgresql/data

Expand Down