From 063b13bf67c262ddab4ca91f98dfc6f2f9c484b5 Mon Sep 17 00:00:00 2001 From: "we.njing666@163.com" Date: Thu, 11 May 2023 13:48:15 +0800 Subject: [PATCH] update --- README.md | 82 +++++++++++++++++++ config/opensearch_dashboards.yml | 9 +- .../build/tasks/nodejs/node_download_info.ts | 2 +- 3 files changed, 88 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d1b8fc9ed9dd..11aafd31fba9 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,88 @@ - [License](#license) - [Copyright](#copyright) + +## 我都干了啥? + +其实,这个项目的文档已经很完善了,我也没改啥.就是在编译过程中遇到一些坑。记录一下吧! + +其他的,建议还是看官网的资料。 + +这个分支完全是基于3.0.0的官网版本。使用请注意版本号。 + +### 1、无法下载geckodriver + +这是碰到第一个比较坑的问题,不知道为什么,一直在下载 geckodriver 的时候失败。尝试过修改镜像源为中国的,但是都不行。 +最后是设置了一个环境变量才解决的这个问题。 +``` +npm config set geckodriver_cdnurl https://repo.huaweicloud.com/geckodriver/ +npm install geckodriver +``` + +### 2、npm包安装失败 + +我在编译的过程中,碰到了很多次npm包安装失败的问题,除了上边的那个包,其他都是手工安装成功的。执行: +```shell +npm install 包名 +``` + +### 3、编译打包的时候无法下载node +这应该是整个项目,我唯一修改了源码的地方。 + +忘了之前是啥域名了,反正一直下载不下来。 + +后来我给修改为`https://nodejs.org/dist/v14.21.3/node-v14.21.3-win-x64.zip ` + +就很顺利了 + +### 4、运行源码 + +先拉取依赖 +```shell +yarn osd bootstrap +``` + +再运行,当然前提是配置文件要配置好 +```shell +yarn start +``` + +配置文件 就是 `config/opensearch_dashboards.yml` + +### 5、关于配置 + +官网给出了,如下配置项: +```shell +opensearch.hosts: ["https://localhost:9200"] +opensearch.username: "admin" # Default username on the docker image +opensearch.password: "admin" # Default password on the docker image +opensearch.ssl.verificationMode: none +``` + +也许是习惯了kibana的配置,我也就配置了 +```shell +opensearch.hosts: ["http://127.0.0.1:9200"] +server.name: "Opensearch" +server.port: 5601 +``` + +### 6、关于打包编译 + +用官网的就好 +mac 平台使用 +```shell +yarn build-platform --darwin +``` + +其他平台根据情况修改参数: +```shell +darwin (builds Darwin x64) +linux (builds Linux x64) +linux-arm (builds Linux ARM64). +windows (builds Windows x64) +``` + + ## Welcome OpenSearch Dashboards is an open source search and analytics visualization. We aim to be the best community-driven platform and provide all the contributors a great open source experience. diff --git a/config/opensearch_dashboards.yml b/config/opensearch_dashboards.yml index 38377296bd20..162b9de69105 100644 --- a/config/opensearch_dashboards.yml +++ b/config/opensearch_dashboards.yml @@ -1,5 +1,5 @@ # OpenSearch Dashboards is served by a back end server. This setting specifies the port to use. -#server.port: 5601 +server.port: 5601 # Specifies the address to which the OpenSearch Dashboards server will bind. IP addresses and host names are both valid values. # The default is 'localhost', which usually means remote machines will not be able to connect. @@ -20,10 +20,11 @@ #server.maxPayloadBytes: 1048576 # The OpenSearch Dashboards server's name. This is used for display purposes. -#server.name: "your-hostname" +server.name: "Opensearch" # The URLs of the OpenSearch instances to use for all your queries. -#opensearch.hosts: ["http://localhost:9200"] +# opensearch.hosts: ["http://192.168.184.31:9200","http://192.168.184.32:9200","http://192.168.184.33:9200"] +opensearch.hosts: ["http://127.0.0.1:9200"] # OpenSearch Dashboards uses an index in OpenSearch to store saved searches, visualizations and # dashboards. OpenSearch Dashboards creates a new index if the index doesn't already exist. @@ -239,4 +240,4 @@ #data_source.encryption.wrappingKey: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # Set the value of this setting to false to hide the help menu link to the OpenSearch Dashboards user survey -# opensearchDashboards.survey.url: "https://survey.opensearch.org" \ No newline at end of file +# opensearchDashboards.survey.url: "https://survey.opensearch.org" diff --git a/src/dev/build/tasks/nodejs/node_download_info.ts b/src/dev/build/tasks/nodejs/node_download_info.ts index 73163bc3c30a..e2101d3453be 100644 --- a/src/dev/build/tasks/nodejs/node_download_info.ts +++ b/src/dev/build/tasks/nodejs/node_download_info.ts @@ -44,7 +44,7 @@ export async function getNodeDownloadInfo(config: Config, platform: Platform) { ? `node-v${version}-win-x64.zip` : `node-v${version}-${arch}.tar.gz`; - const url = `https://mirrors.nodejs.org/dist/v${version}/${downloadName}`; + const url = `https://nodejs.org/dist/v${version}/${downloadName}`; const downloadPath = config.resolveFromRepo('.node_binaries', version, basename(downloadName)); const extractDir = config.resolveFromRepo('.node_binaries', version, arch);