瀏覽代碼

add idctest

Zhang Li 2 年之前
父節點
當前提交
2963d085e2

+ 16 - 0
Dockerfile.dev

@@ -133,6 +133,7 @@ stdout_logfile_maxbytes=50MB\n\
 " > /etc/supervisor/conf.d/jupyter.conf
 
 
+# 腾讯云生产
 FROM builder3 as image-prod
 ADD confs/prod/krb5.conf /etc/
 ADD confs/prod/config.json .
@@ -149,3 +150,18 @@ redirect_stderr=true\n\
 stdout_logfile=/var/log/jupyter.log\n\
 stdout_logfile_maxbytes=50MB\n\
 " > /etc/supervisor/conf.d/jupyter.conf
+
+# 电信云测试
+FROM builder3 as image-idctest
+ADD confs/idctest/config.json .
+RUN mkdir -p $HOME/.sparkmagic && cp config.json $HOME/.sparkmagic
+RUN echo "\
+[program:jupyter]\n\
+directory=/workspace\n\
+command=/bin/bash -c '/opt/conda/bin/jupyter lab --ip 0.0.0.0 --port 8888 --allow-root --no-browser' \n\
+autorestart=true\n\
+startretries=0\n\
+redirect_stderr=true\n\
+stdout_logfile=/var/log/jupyter.log\n\
+stdout_logfile_maxbytes=50MB\n\
+" > /etc/supervisor/conf.d/jupyter.conf

+ 3 - 0
Makefile

@@ -14,3 +14,6 @@ test:
 dev:
 	@DOCKER_BUILDKIT=1 docker build -f Dockerfile.dev  --build-arg BUILDKIT_INLINE_CACHE=1  --target image-dev -t jupyterlab:dev .
 
+idctest:
+	@docker build -f Dockerfile.dev  --target image-idctest -t registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab:idctest .
+	@docker push registry.cn-hangzhou.aliyuncs.com/sxtest/jupyterlab:idctest

+ 75 - 0
confs/idctest/config.json

@@ -0,0 +1,75 @@
+{
+    "kernel_python_credentials": {
+        "username": "",
+        "password": "",
+        "url": "http://10.138.143.16:8998",
+        "auth": "None"
+    },
+    "kernel_scala_credentials": {
+        "username": "",
+        "password": "",
+        "url": "http://10.138.143.16:8998",
+        "auth": "None"
+    },
+    "kernel_r_credentials": {
+        "username": "",
+        "password": "",
+        "url": "http://10.138.143.16:8998"
+    },
+    "logging_config": {
+        "version": 1,
+        "formatters": {
+            "magicsFormatter": {
+                "format": "%(asctime)s\t%(levelname)s\t%(message)s",
+                "datefmt": ""
+            }
+        },
+        "handlers": {
+            "magicsHandler": {
+                "class": "hdijupyterutils.filehandler.MagicsFileHandler",
+                "formatter": "magicsFormatter",
+                "home_path": "~/.sparkmagic"
+            }
+        },
+        "loggers": {
+            "magicsLogger": {
+                "handlers": [
+                    "magicsHandler"
+                ],
+                "level": "DEBUG",
+                "propagate": 0
+            }
+        }
+    },
+    "authenticators": {
+        "Kerberos": "sparkmagic.auth.kerberos.Kerberos",
+        "None": "sparkmagic.auth.customauth.Authenticator",
+        "Basic_Access": "sparkmagic.auth.basic.Basic"
+    },
+    "wait_for_idle_timeout_seconds": 15,
+    "livy_session_startup_timeout_seconds": 60,
+    "fatal_error_suggestion": "The code failed because of a fatal error:\n\t{}.\n\nSome things to try:\na) Make sure Spark has enough available resources for Jupyter to create a Spark context.\nb) Contact your Jupyter administrator to make sure the Spark magics library is configured correctly.\nc) Restart the kernel.",
+    "ignore_ssl_errors": false,
+    "session_configs": {
+        "driverMemory": "1000M",
+        "executorCores": 2
+    },
+    "use_auto_viz": true,
+    "coerce_dataframe": true,
+    "max_results_sql": 2500,
+    "pyspark_dataframe_encoding": "utf-8",
+    "heartbeat_refresh_seconds": 30,
+    "livy_server_heartbeat_timeout_seconds": 0,
+    "heartbeat_retry_seconds": 10,
+    "server_extension_default_kernel_name": "pysparkkernel",
+    "custom_headers": {},
+    "retry_policy": "configurable",
+    "retry_seconds_to_sleep_list": [
+        0.2,
+        0.5,
+        1,
+        3,
+        5
+    ],
+    "configurable_retry_policy_max_retries": 8
+}

+ 4 - 1
packages/filebrowser/src/api/config.ts

@@ -1,6 +1,9 @@
 const config = {
-  endpoint: 'http://aihub-dag-test.digitalyili.com'
+  // 腾讯云测试环境
+  // endpoint: 'http://aihub-dag-test.digitalyili.com'
   // endpoint: 'http://192.168.199.107:18082'
+  // 电信云测试环境
+  endpoint: 'http://aihub-dag-idctest.digitalyili.com'
 };
 
 export default config;

+ 4 - 1
packages/jldbq-extenison/src/api/config.ts

@@ -1,6 +1,9 @@
 const config = {
-  endpoint: 'http://aihub-dag-test.digitalyili.com'
+  // 腾讯云测试环境
+  // endpoint: 'http://aihub-dag-test.digitalyili.com'
   // endpoint: 'http://192.168.199.107:18082'
+  // 电信云测试环境
+  endpoint: 'http://aihub-dag-idctest.digitalyili.com'
 };
 
 export default config;

+ 5 - 1
packages/yili-dag/src/request.ts

@@ -3,8 +3,12 @@ import axios from 'axios';
 
 
 const request = axios.create({
-  baseURL: 'http://aihub-dag-test.digitalyili.com',
+  // 腾讯云测试环境
+  // baseURL: 'http://aihub-dag-test.digitalyili.com',
+  // 本地开发
   // baseURL: 'http://192.168.199.107:18082',
+  // 电信云测试环境
+  baseURL: 'http://aihub-dag-idctest.digitalyili.com',
   timeout: 1200000,
   headers: {
     'Content-Type': 'application/json;charset=UTF-8',