This is an automated email from the ASF dual-hosted git repository.
liuxun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new 97829b7 SUBMARINE-366. Support submarine link database in k8s
97829b7 is described below
commit 97829b74c3246fedda4e4b97ef5605c42845405a
Author: Xun Liu <[email protected]>
AuthorDate: Thu Jan 30 19:25:33 2020 +0800
SUBMARINE-366. Support submarine link database in k8s
### What is this PR for?
We need to make the submarine database run in k8s, and let the submarine
server connect to the database.
### What type of PR is it?
[Feature]
### Todos
* [ ] - Task
### What is the Jira issue?
* https://issues.apache.org/jira/browse/SUBMARINE-366
### How should this be tested?
* https://travis-ci.org/liuxunorg/submarine/builds/643813734
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Xun Liu <[email protected]>
Closes #169 from liuxunorg/SUBMARINE-366 and squashes the following commits:
e741833 [Xun Liu] SUBMARINE-366. Support submarine link database in k8s
---
submarine-cloud/hack/kind-cluster-build.sh | 5 ++-
.../manifests/submarine-cluster/deployment.yaml | 37 ++++++++++++++++++++++
2 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/submarine-cloud/hack/kind-cluster-build.sh
b/submarine-cloud/hack/kind-cluster-build.sh
index 0e8b0db..d799eed 100755
--- a/submarine-cloud/hack/kind-cluster-build.sh
+++ b/submarine-cloud/hack/kind-cluster-build.sh
@@ -76,7 +76,7 @@ esac
done
clusterName=${clusterName:-kind}
-nodeNum=${nodeNum:-3}
+nodeNum=${nodeNum:-1}
k8sVersion=${k8sVersion:-v1.12.8}
volumeNum=${volumeNum:-1}
@@ -269,6 +269,7 @@ docker-image <image>' command to load images into nodes.
EOF
# Run submarine in kind cluster
+echo ""
echo -n "Do you want to run submarine in kind cluster now? [y/n]"
read myselect
if [[ "$myselect" == "y" || "$myselect" == "Y" ]]; then
@@ -276,6 +277,8 @@ if [[ "$myselect" == "y" || "$myselect" == "Y" ]]; then
kind load docker-image apache/submarine:operator-0.3.0-SNAPSHOT
kubectl apply -f $ROOT/manifests/submarine-operator/
+ docker pull apache/submarine:database-0.3.0-SNAPSHOT
+ kind load docker-image apache/submarine:database-0.3.0-SNAPSHOT
docker pull apache/submarine:server-0.3.0-SNAPSHOT
kind load docker-image apache/submarine:server-0.3.0-SNAPSHOT
kubectl apply -f $ROOT/manifests/submarine-cluster/
diff --git a/submarine-cloud/manifests/submarine-cluster/deployment.yaml
b/submarine-cloud/manifests/submarine-cluster/deployment.yaml
index 99634eb..4ac9099 100644
--- a/submarine-cloud/manifests/submarine-cluster/deployment.yaml
+++ b/submarine-cloud/manifests/submarine-cluster/deployment.yaml
@@ -68,3 +68,40 @@ spec:
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
+
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+ name: submarine-database
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: submarine-database
+ template:
+ metadata:
+ labels:
+ app: submarine-database
+ spec:
+ containers:
+ - name: submarine-database
+ image: apache/submarine:database-0.3.0-SNAPSHOT
+ ports:
+ - containerPort: 3306
+ env:
+ - name: MYSQL_ROOT_PASSWORD
+ value: "password" # Same submarine-site.xml mysql password
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: submarine-database
+spec:
+ ports:
+ - name: submarine-database
+ port: 3306
+ targetPort: 3306
+ selector:
+ app: submarine-database
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]