Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaodizi committed May 11, 2023
1 parent e9dc890 commit 063b13b
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 5 deletions.
82 changes: 82 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 5 additions & 4 deletions config/opensearch_dashboards.yml
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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"
# opensearchDashboards.survey.url: "https://survey.opensearch.org"
2 changes: 1 addition & 1 deletion src/dev/build/tasks/nodejs/node_download_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 063b13b

Please sign in to comment.