You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "advancedxy (via GitHub)" <gi...@apache.org> on 2023/03/10 09:17:40 UTC

[GitHub] [incubator-uniffle] advancedxy commented on a diff in pull request #581: [#564] test(operator): add end-to-end test

advancedxy commented on code in PR #581:
URL: https://github.com/apache/incubator-uniffle/pull/581#discussion_r1132125436


##########
deploy/kubernetes/integration-test/e2e/template/rss-template.yaml:
##########
@@ -0,0 +1,92 @@
+#
+# 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: uniffle.apache.org/v1alpha1
+kind: RemoteShuffleService
+metadata:
+  name: rss-test
+  namespace: kube-system
+spec:
+  configMapName: "rss-configuration"
+  coordinator:
+    image: "${RSS_SERVER_IMAGE}"
+    initContainerImage: "busybox:latest"
+    rpcNodePort:
+      - 30001
+      - 30011
+    httpNodePort:
+      - 30002
+      - 30012
+    xmxSize: "800M"
+    configDir: "/data/rssadmin/rss/conf"
+    replicas: 1
+    excludeNodesFilePath: "/data/rssadmin/rss/coo/exclude_nodes"
+    securityContext:
+      runAsUser: 1000
+      fsGroup: 1000
+    logHostPath: "/data/logs/rss/coordinator"
+    hostPathMounts:
+      /data/logs/rss/coordinator: /data/rssadmin/rss/logs
+  shuffleServer:
+    sync: true
+    replicas: 1
+    image: "${RSS_SERVER_IMAGE}"
+    initContainerImage: "busybox:latest"
+    upgradeStrategy:
+      type: "FullUpgrade"
+    xmxSize: "800M"
+    configDir: "/data/rssadmin/rss/conf"
+    securityContext:
+      runAsUser: 1000
+      fsGroup: 1000
+    logHostPath: "/data/logs/rss/shuffle-server"
+    hostPathMounts:
+      /data/logs/rss/shuffle-server: /data/rssadmin/rss/logs
+      /data/rssdata1: /data1
+---
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: rss-configuration
+  namespace: kube-system
+data:
+  coordinator.conf: |-
+    rss.coordinator.app.expired 60000
+    rss.coordinator.exclude.nodes.file.path /data/rssadmin/rss/coo
+    rss.coordinator.server.heartbeat.timeout 30000
+    rss.jetty.http.port 19996
+    rss.rpc.server.port 19997
+  log4j.properties: |-
+    log4j.rootCategory=INFO, RollingAppender
+    log4j.appender.console=org.apache.log4j.ConsoleAppender
+    log4j.appender.console.Threshold=INFO
+    log4j.appender.console.target=System.err
+    log4j.appender.console.layout=org.apache.log4j.PatternLayout
+    log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: %m%n
+    log4j.appender.RollingAppender=org.apache.log4j.RollingFileAppender
+    log4j.appender.RollingAppender.File=./logs/rss.log
+    log4j.appender.RollingAppender.MaxFileSize=50MB
+    log4j.appender.RollingAppender.MaxBackupIndex=10
+    log4j.appender.RollingAppender.layout=org.apache.log4j.PatternLayout
+    log4j.appender.RollingAppender.layout.ConversionPattern=[%p] %d %t %c{1} %M - %m%n
+  server.conf: |-
+    rss.coordinator.quorum rss-coordinator-rss-demo-0:19997,rss-coordinator-rss-demo-1:19997
+    rss.jetty.http.port 19996
+    rss.server.buffer.capacity 335544320
+    rss.server.read.buffer.capacity 167772160
+    rss.storage.type MEMORY_LOCALFILE

Review Comment:
   nit: please add a new line here.



##########
deploy/kubernetes/integration-test/e2e/kind-config:
##########
@@ -0,0 +1,24 @@
+#
+# 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.
+#
+
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+- role: worker
+- role: worker
+- role: worker

Review Comment:
   nit: Add a new empty line.



##########
deploy/kubernetes/integration-test/e2e/README.md:
##########
@@ -0,0 +1,40 @@
+<!--
+  ~ 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.
+  -->
+
+# End-to-end Test
+
+Currently, we can quickly pull up an e2e test environment locally by executing local-up-cluster.sh.
+
+The kubernetes environment for local testing is built with [kind](https://github.com/kubernetes-sigs/kind).
+
+The script reads parameters from the following environment variables, which are:
+
++ "TEST_REGISTRY": represents the url of the registry where the test image resides
++ "BUILD_NEW_CLUSTER": indicates whether a new kubernetes cluster needs to be built
++ "BUILD_RSS_IMAGE": indicates whether a new rss image needs to be built
++ "BUILD_RSS_OPERATOR": indicates whether a new operator image needs to be built
+
+We can quickly build the environment by executing the following command:
+
+```
+$ TEST_REGISTRY=${users-registry-url} sh local-up-cluster.sh

Review Comment:
   `local-up-cluster.sh` is not the right script name?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org