小编Moo*_*rse的帖子

Kibana 服务器还没有准备好

我刚刚在 RHEL 8 上安装了 Kibana 7.3。Kibana 服务处于活动状态(正在运行)。当我 curl 到http://localhost:5601
收到Kibana server is not ready yet消息。我的 Elasticsearch 实例在另一台服务器上,它成功响应我的请求。我已经用那个更新了 kibana.yml

elasticsearch.hosts:[" http://EXTERNAL-IP-ADDRESS-OF-ES:9200 "]

我可以从互联网上访问elasticsearch并回复:

{
  "name" : "ip-172-31-21-240.ec2.internal",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "y4UjlddiQimGRh29TVZoeA",
  "version" : {
    "number" : "7.3.1",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "4749ba6",
    "build_date" : "2019-08-19T20:19:25.651794Z",
    "build_snapshot" : false,
    "lucene_version" : "8.1.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
Run Code Online (Sandbox Code Playgroud)

的结果sudo systemctl status kibana: …

rhel elasticsearch kibana

22
推荐指数
5
解决办法
5万
查看次数

什么是 Azure 私有 DNS 区域组?

Azure Private DNS Zone我正在使用和自动化一些流程Private Endpoint。我遇到过 私有 DNS 区域组资源。该资源有一个 Rest API,位于此处。但我在互联网上找不到任何解释其功能的文档。也没有,我在门户网站上找不到它。

对它的功能有什么了解吗?

documentation azure azure-dns azure-private-dns-zone

17
推荐指数
2
解决办法
1万
查看次数

Azure Functions 内存不足异常

我有一个 Azure Functions Powershell 核心,如下所示:

# Input bindings are passed in via param block.
param([byte[]] $InputBlob, $TriggerMetadata)

# Write out the blob name and size to the information log.
Write-Host "PowerShell Blob trigger function Processed blob! Name: $($TriggerMetadata.Name) Size: $($InputBlob.Length) bytes  Uri: $($TriggerMetadata.Uri)"
Run Code Online (Sandbox Code Playgroud)

通过使用 Blob 触发器,我想使用 Powershell 从 Azure Blob 读取 VDH 操作系统映像并将其转换为托管磁盘。图像大小为30GB。当函数被触发时,我得到下面的System.OutOfMemoryException

2020-09-07T09:52:44.704 [Error] Executed 'Functions.BlobTrigger1' (Failed, Id=93b00718-9941-4379-abd0-348137cdcff2, Duration=56449ms)Exception of type 'System.OutOfMemoryException' was thrown.
2020-09-07T09:52:45.061 [Information] Stopping JobHost
Run Code Online (Sandbox Code Playgroud)

我增加了应用程序计划以获得 14GB 内存,但我遇到了相同的内存异常。

当我直接从Cloud Shell执行此操作时,我取得了成功,但我的主要目标是使用 …

powershell out-of-memory azure azure-blob-storage azure-functions

6
推荐指数
1
解决办法
7720
查看次数

如何在使用 dockerfile 运行容器时运行 .sh 文件

我正在制作一个 dockerfile 来安装 elasticsearch:6.5.4 并向所需位置添加几个文件,并运行名为 test.sh 的脚本以在运行 elasticsearch 时在 elasticsearch 中创建一个新索引。

我不确定我是否应该使用 RUN、CMD 或 ENTRYPOINT 来做到这一点。

我通过注释我的最后一行(包含 RUN/CMD/ENTRYPOINT test.sh)成功构建了一个映像并运行了一个容器。我能够从容器的 bash 运行 test.sh 并获得所需的结果。

但是当我尝试为相同的过程构建图像时,出现以下错误:

$ docker build -t es .
Sending build context to Docker daemon  7.499MB
Step 1/8 : FROM elasticsearch:6.5.4
 ---> 93109ce1d590
Step 2/8 : WORKDIR /app
 ---> Running in 6b6412093d53
Removing intermediate container 6b6412093d53
 ---> a374ab69eb1a
Step 3/8 : ADD . /app
 ---> 6ed98ee7ad49
Step 4/8 : COPY test.sh .
 ---> 42184ec64c09
Step 5/8 : ADD analysis …
Run Code Online (Sandbox Code Playgroud)

bash elasticsearch docker dockerfile

4
推荐指数
1
解决办法
1万
查看次数

在 Azure Devops 中,如何在运行 shell 脚本的“Azure CLI 任务 v.2”中使用管道变量?

我正在尝试在 Azure Devops 中使用 Azure CLI 和bash执行任务。我正在使用Azure CLI 任务 v.2并选择shell作为脚本类型,如下所示。 在此处输入图片说明 我想在 bash 脚本中使用管道变量。我在脚本中运行以下命令:

#!/bin/bash
az role assignment create --role "Lab Admin" --assignee $(ownerEmail) -g $(rgName)
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

 line 2: ownerEmail: command not found
 line 2: rgName: command not found
Run Code Online (Sandbox Code Playgroud)

我不明白。通常,我应该能够在 bash 脚本中使用 azure cli。有人有想法吗?

bash azure azure-cli azure-devops azure-pipelines

4
推荐指数
2
解决办法
6778
查看次数

Terraform 条件参数块

我创建了一个模块来部署以下azurerm_automation_schedule资源:

resource "azurerm_automation_schedule" "example" {
  name                    = var.aaname
  resource_group_name     = azurerm_resource_group.example.name
  automation_account_name = azurerm_automation_account.example.name
  frequency               = var.frequency              
  interval                = var.interval
  timezone                = "Australia/Perth"
  start_time              = "2014-04-15T18:00:15+02:00"
  description             = "This is an example schedule"

  monthly_occurrence {
                      day = monthly_occurrence.value.day
                      occurrence = monthly_occurrence.value.occurrence
                  }
 }
Run Code Online (Sandbox Code Playgroud)

Monthly_occurrence块参数的存在必须是有条件的,因为仅当频率为“月”时才需要它,否则会引发错误。

有没有办法有条件地创建这个monthly_occurrence块参数?我正在使用 terraform 0.13.5 和 azurerm 2.38.0

我尝试过for_each但找不到解决方案。有什么办法可以做到吗?

azure conditional-statements terraform terraform-provider-azure

4
推荐指数
1
解决办法
1922
查看次数

azure 策略:仅允许 azure 资源组标签中的某些标签值

我的资源组有一个environment标签,其中只允许特定值"dev,test,prod"。我想使用 Azure 策略强制执行此操作,该策略将拒绝所有标记中没有此"dev,test,prod"值之一的资源组创建environment。我的策略代码如下:

{
    "properties": {
        "displayName": "Allowed  tag values for Resource Groups",
        "description": "This policy enables you to restrict the tag values for Resource Groups.",
        "policyType": "Custom",
        "mode": "Indexed",
        "metadata": {
            "version": "1.0.0",
            "category": "Tags"
        },
        "parameters": {
            "allowedTagValues": {
                "type": "array",
                "metadata": {
                    "description": "The list of tag values that can be specified when deploying resource groups",
                    "displayName": "Allowed tag values"
                },
                "defaultValue": [
                    "dev","test","prod"
                ] …
Run Code Online (Sandbox Code Playgroud)

azure azure-resource-manager azure-policy

1
推荐指数
1
解决办法
5414
查看次数

Azure Bicep:如果属性不存在,则设置空值

我正在通过 bicep 部署 azure 更新管理服务的计划。我的代码如下:

param parSchedules array = [
  {
    name: 'mysched1'
    monthlyOccurrencesDay: null
    monthlyOccurrencesOccurence: null
    DaysOfWeek: 'Wednesday'
    StartTime: '${parBaseTimeForUpdateSchedules}T19:00:00'
    tag: {
      Update: [
        'tag1'
      ]
    }
  }
  {
    name: 'mysched2'
    monthlyOccurrencesDay: 'Wednesday'
    monthlyOccurrencesOccurence: 1
    DaysOfWeek: 'Wednesday'
    StartTime: '${parBaseTimeForUpdateSchedules}T07:00:00'
    tag: {
      Update: [
        'tag2'
      ]
    }
  }
]


resource resUpdateschedule 'Microsoft.Automation/automationAccounts/softwareUpdateConfigurations@2019-06-01' = [for schedule in parSchedules: {
  name: schedule.name
  parent: resAutomationAccount
  properties: {
    scheduleInfo: {
      advancedSchedule: {
        monthlyOccurrences: [
          {
            day: schedule.monthlyOccurrencesDay
            occurrence: schedule.monthlyOccurrencesOccurence
          }
        ]
        weekDays: [
          schedule.DaysOfWeek …
Run Code Online (Sandbox Code Playgroud)

azure azure-resource-manager azure-bicep

1
推荐指数
1
解决办法
4185
查看次数