openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rab...@apache.org
Subject [incubator-openwhisk-deploy-kube] branch master updated: Add redis and apigateway deployments (#52)
Date Mon, 02 Oct 2017 14:20:09 GMT
This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-deploy-kube.git


The following commit(s) were added to refs/heads/master by this push:
     new 241fb96  Add redis and apigateway deployments (#52)
241fb96 is described below

commit 241fb9648ec71ae2b5d18cfe070c02495cef8cc8
Author: Dan Lavine <dlavine@us.ibm.com>
AuthorDate: Mon Oct 2 14:20:08 2017 +0000

    Add redis and apigateway deployments (#52)
---
 README.md                            |  2 ++
 configure/cleanup.sh                 |  5 +++-
 kubernetes/apigateway/README.md      | 10 ++++++++
 kubernetes/apigateway/apigateway.yml | 50 ++++++++++++++++++++++++++++++++++++
 kubernetes/redis/README.md           | 11 ++++++++
 kubernetes/redis/redis.yml           | 40 +++++++++++++++++++++++++++++
 tools/travis/build.sh                | 14 ++++++++++
 7 files changed, 131 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 4908cef..555a7a4 100644
--- a/README.md
+++ b/README.md
@@ -54,6 +54,8 @@ for CouchDB.
 Once CouchDB has been successfully deployed, you will need
 manually deploy the rest of the OpenWhisk components.
 
+* [Redis](kubernetes/redis/README.md)
+* [ApiGateway](kubernetes/apigateway/README.md)
 * [Zookeeper](kubernetes/zookeeper/README.md)
 * [Kafka](kubernetes/kafka/README.md)
 * [Controller](kubernetes/controller/README.md)
diff --git a/configure/cleanup.sh b/configure/cleanup.sh
index 5cc6ef3..d9b3349 100755
--- a/configure/cleanup.sh
+++ b/configure/cleanup.sh
@@ -6,6 +6,8 @@ set -x
 
 # delete deployments
 kubectl -n openwhisk delete deployment couchdb
+kubectl -n openwhisk delete deployment redis
+kubectl -n openwhisk delete deployment apigateway
 kubectl -n openwhisk delete deployment zookeeper
 kubectl -n openwhisk delete deployment kafka
 kubectl -n openwhisk delete statefulsets controller
@@ -13,7 +15,6 @@ kubectl -n openwhisk delete statefulsets invoker
 kubectl -n openwhisk delete deployment nginx
 
 # delete configmaps
-kubectl -n openwhisk delete cm controller
 kubectl -n openwhisk delete cm nginx
 
 # delete secrets
@@ -21,6 +22,8 @@ kubectl -n openwhisk delete secret nginx
 
 # delete services
 kubectl -n openwhisk delete service couchdb
+kubectl -n openwhisk delete service redis
+kubectl -n openwhisk delete service apigateway
 kubectl -n openwhisk delete service zookeeper
 kubectl -n openwhisk delete service kafka
 kubectl -n openwhisk delete service controller
diff --git a/kubernetes/apigateway/README.md b/kubernetes/apigateway/README.md
new file mode 100644
index 0000000..91db8e2
--- /dev/null
+++ b/kubernetes/apigateway/README.md
@@ -0,0 +1,10 @@
+ApiGateway
+-----
+
+# Deploying
+
+To deploy the ApiGateway, you only need to run the following command:
+
+```
+kubectl apply -f apigateway.yml
+```
diff --git a/kubernetes/apigateway/apigateway.yml b/kubernetes/apigateway/apigateway.yml
new file mode 100644
index 0000000..b69c67c
--- /dev/null
+++ b/kubernetes/apigateway/apigateway.yml
@@ -0,0 +1,50 @@
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: apigateway
+  namespace: openwhisk
+  labels:
+    name: apigateway
+spec:
+  selector:
+    name: apigateway
+  ports:
+    - port: 8080
+      targetPort: 8080
+      name: mgmt
+    - port: 9000
+      targetPort: 9000
+      name: api
+
+---
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: apigateway
+  namespace: openwhisk
+  labels:
+    name: apigateway
+spec:
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        name: apigateway
+    spec:
+      restartPolicy: Always
+
+      containers:
+      - name: apigateway
+        imagePullPolicy: IfNotPresent
+        image: openwhisk/apigateway
+        ports:
+        - name: mgmt
+          containerPort: 8080
+        - name: api
+          containerPort: 9000
+        env:
+        - name: "REDIS_HOST"
+          value: "redis.openwhisk"
+        - name: "REDIS_PORT"
+          value: "6379"
diff --git a/kubernetes/redis/README.md b/kubernetes/redis/README.md
new file mode 100644
index 0000000..ede13a8
--- /dev/null
+++ b/kubernetes/redis/README.md
@@ -0,0 +1,11 @@
+Redis
+-----
+
+# Deploying
+
+To deploy Redis, you will just need to deploy the public redis docker
+container and a service.
+
+```
+kubectl apply -f redis.yml
+```
diff --git a/kubernetes/redis/redis.yml b/kubernetes/redis/redis.yml
new file mode 100644
index 0000000..447e6f4
--- /dev/null
+++ b/kubernetes/redis/redis.yml
@@ -0,0 +1,40 @@
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: redis
+  namespace: openwhisk
+  labels:
+    name: redis
+spec:
+  selector:
+    name: redis
+  ports:
+    - port: 6379
+      targetPort: 6379
+      name: redis
+
+---
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: redis
+  namespace: openwhisk
+  labels:
+    name: redis
+spec:
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        name: redis
+    spec:
+      restartPolicy: Always
+
+      containers:
+      - name: redis
+        imagePullPolicy: IfNotPresent
+        image: redis:3.2
+        ports:
+        - name: redis
+          containerPort: 6379
diff --git a/tools/travis/build.sh b/tools/travis/build.sh
index 578e3c3..5d117e6 100755
--- a/tools/travis/build.sh
+++ b/tools/travis/build.sh
@@ -105,6 +105,20 @@ pushd kubernetes/couchdb
   couchdbHealthCheck
 popd
 
+# setup redis
+pushd kubernetes/redis
+  kubectl apply -f redis.yml
+
+  deploymentHealthCheck "redis"
+popd
+
+# setup redis
+pushd kubernetes/apigateway
+  kubectl apply -f apigateway.yml
+
+  deploymentHealthCheck "apigateway"
+popd
+
 # setup zookeeper
 pushd kubernetes/zookeeper
   kubectl apply -f zookeeper.yml

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <commits@openwhisk.apache.org>'].

Mime
View raw message