You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by jb...@apache.org on 2017/04/12 19:57:11 UTC
[40/50] [abbrv] beam git commit: [BEAM-1882] Update postgres k8
scripts & add scripts for running local dev test
[BEAM-1882] Update postgres k8 scripts & add scripts for running local dev test
Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/4d1feebf
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/4d1feebf
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/4d1feebf
Branch: refs/heads/DSL_SQL
Commit: 4d1feebfd6931882554cec8f459da85047064982
Parents: 435c3b4
Author: Stephen Sisk <si...@google.com>
Authored: Fri Mar 17 15:09:00 2017 -0700
Committer: Jean-Baptiste Onofr� <jb...@apache.org>
Committed: Wed Apr 12 20:07:08 2017 +0200
----------------------------------------------------------------------
.../kubernetes/postgres-pod-no-vol.yml | 32 -----------
.../postgres-service-for-local-dev.yml | 28 ++++++++++
.../kubernetes/postgres-service-public.yml | 28 ----------
.../src/test/resources/kubernetes/postgres.yml | 56 ++++++++++++++++++++
.../jdbc/src/test/resources/kubernetes/setup.sh | 3 +-
.../src/test/resources/kubernetes/teardown.sh | 3 +-
6 files changed, 86 insertions(+), 64 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/beam/blob/4d1feebf/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres-pod-no-vol.yml
----------------------------------------------------------------------
diff --git a/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres-pod-no-vol.yml b/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres-pod-no-vol.yml
deleted file mode 100644
index 17cad93..0000000
--- a/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres-pod-no-vol.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-
-apiVersion: v1
-kind: Pod
-metadata:
- name: postgres-no-pv
- labels:
- name: postgres-no-pv
-spec:
- containers:
- - name: postgres
- image: postgres
- env:
- - name: POSTGRES_PASSWORD
- value: uuinkks
- - name: PGDATA
- value: /var/lib/postgresql/data/pgdata
- ports:
- - containerPort: 5432
http://git-wip-us.apache.org/repos/asf/beam/blob/4d1feebf/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres-service-for-local-dev.yml
----------------------------------------------------------------------
diff --git a/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres-service-for-local-dev.yml b/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres-service-for-local-dev.yml
new file mode 100644
index 0000000..5d2c664
--- /dev/null
+++ b/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres-service-for-local-dev.yml
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: postgres-for-dev
+ labels:
+ name: postgres
+spec:
+ ports:
+ - port: 5432
+ selector:
+ name: postgres
+ type: LoadBalancer
http://git-wip-us.apache.org/repos/asf/beam/blob/4d1feebf/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres-service-public.yml
----------------------------------------------------------------------
diff --git a/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres-service-public.yml b/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres-service-public.yml
deleted file mode 100644
index 24d8eee..0000000
--- a/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres-service-public.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-
-apiVersion: v1
-kind: Service
-metadata:
- name: postgres-no-pv
- labels:
- name: postgres-no-pv
-spec:
- ports:
- - port: 5432
- nodePort: 31234
- selector:
- name: postgres-no-pv
- type: NodePort
http://git-wip-us.apache.org/repos/asf/beam/blob/4d1feebf/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres.yml
----------------------------------------------------------------------
diff --git a/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres.yml b/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres.yml
new file mode 100644
index 0000000..6244968
--- /dev/null
+++ b/sdks/java/io/jdbc/src/test/resources/kubernetes/postgres.yml
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: postgres
+ labels:
+ name: postgres
+spec:
+ ports:
+ - port: 5432
+ nodePort: 31234
+ selector:
+ name: postgres
+ type: NodePort
+
+---
+
+apiVersion: v1
+kind: ReplicationController
+metadata:
+ name: postgres
+spec:
+ replicas: 1
+ selector:
+ name: postgres
+ template:
+ metadata:
+ name: postgres
+ labels:
+ name: postgres
+ spec:
+ containers:
+ - name: postgres
+ image: postgres
+ env:
+ - name: POSTGRES_PASSWORD
+ value: uuinkks
+ - name: PGDATA
+ value: /var/lib/postgresql/data/pgdata
+ ports:
+ - containerPort: 5432
http://git-wip-us.apache.org/repos/asf/beam/blob/4d1feebf/sdks/java/io/jdbc/src/test/resources/kubernetes/setup.sh
----------------------------------------------------------------------
diff --git a/sdks/java/io/jdbc/src/test/resources/kubernetes/setup.sh b/sdks/java/io/jdbc/src/test/resources/kubernetes/setup.sh
index 7d9b2e2..76e4e34 100644
--- a/sdks/java/io/jdbc/src/test/resources/kubernetes/setup.sh
+++ b/sdks/java/io/jdbc/src/test/resources/kubernetes/setup.sh
@@ -16,5 +16,4 @@
# limitations under the License.
#
-kubectl create -f postgres-pod-no-vol.yml
-kubectl create -f postgres-service-public.yml
+kubectl create -f ./sdks/java/io/jdbc/src/test/resources/kubernetes/postgres.yml
http://git-wip-us.apache.org/repos/asf/beam/blob/4d1feebf/sdks/java/io/jdbc/src/test/resources/kubernetes/teardown.sh
----------------------------------------------------------------------
diff --git a/sdks/java/io/jdbc/src/test/resources/kubernetes/teardown.sh b/sdks/java/io/jdbc/src/test/resources/kubernetes/teardown.sh
index 451562e..4fca74a 100644
--- a/sdks/java/io/jdbc/src/test/resources/kubernetes/teardown.sh
+++ b/sdks/java/io/jdbc/src/test/resources/kubernetes/teardown.sh
@@ -16,5 +16,4 @@
# limitations under the License.
#
-kubectl delete service postgres-no-pv
-kubectl delete pod postgres-no-pv
+kubectl delete -f ./sdks/java/io/jdbc/src/test/resources/kubernetes/postgres.yml