小编mda*_*y77的帖子

minkube 仪表板命令挂在“验证代理运行状况”上

我正在学习 Kubernetes 课程,课程的一部分是尝试 minikube。我在 Windows 11 上的 Ubuntu 20.04 WSL 上安装了 minikube 和 kubectl。当我minikube dashboard在 Ubuntu 终端中运行时,进程挂起Verifying proxy health...。我尝试kubectl proxy在另一个终端窗口中运行然后运行minikube dashboard​​. 我转到仪表板 URL 并使用 kubectl proxy 命令指示的代理端口号,但我只得到以下信息:

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "no endpoints available for service \"kubernetes-dashboard\"",
  "reason": "ServiceUnavailable",
  "code": 503
}
Run Code Online (Sandbox Code Playgroud)

我还尝试使用minikube start --vm-driver=dockerGitHub 问题中提到的方式运行 minikube ,但它仍然挂起。如何让仪表板运行?总的来说,我对 Kubernetes 完全陌生。

kubernetes minikube

19
推荐指数
2
解决办法
9729
查看次数

使用 docker compose 3.8 时出现“版本不受支持”错误

我正在尝试使用最新的 docker compose 3.8 版,但我不断收到“不支持“.\docker-compose.yml”中的版本。” 错误。

我使用的是最新版本的 Docker 引擎 19.03.8 和 Docker 桌面 2.2.0.5。

编辑:这是我的 docker compose 版本:docker-compose version 1.25.4,build 8d51620a

这是我的 docker compose 文件:

version: "3.8"
services:
  portal:
    image: portal-dev
    ports:
      - "5000:80"
      - "4200:4200"
    container_name: portal
    build:
      context: .
      dockerfile: Dockerfile.dev
    environment:
      ASPNETCORE_ENVIRONMENT: Development
      DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER: 0
Run Code Online (Sandbox Code Playgroud)

我的 docker compose 文件使用 3.7 版。我不明白为什么它不能使用 3.8 版。任何人都可以帮忙吗?

docker docker-compose

10
推荐指数
2
解决办法
5251
查看次数

在 Azure 管道中的另一个作业中使用从上一个作业检出的文件

我在 Azure DevOps 中创建了一个管道,用于构建 Angular 应用程序并对其运行一些测试。我将管道分为两个工作:构建和测试。构建作业成功完成。即使构建作业已经完成,测试作业仍会再次从 Git 中检查代码。测试作业需要在构建作业中创建的文件才能像 npm 包一样成功运行。

这是我的 YAML 文件:

trigger:
  - develop
variables:
    npm_config_cache: $(Pipeline.Workspace)/.npm
    system.debug: false
stages:
  - stage: Client
    pool:
        name: Windows
    jobs:
      - job: Build
        displayName: Build Angular
        steps:
          - template: templates/angularprodbuild.yml
      - job: Test
        displayName: Run Unit and Cypress Tests
        dependsOn: Build
        steps:
          - template: templates/angularlinttest.yml          
          - template: templates/angularunittest.yml
          - template: templates/cypresstest.yml
Run Code Online (Sandbox Code Playgroud)

我的代理池是在阶段级别声明的,因此两个作业将使用相同的代理。此外,我还向测试作业添加了 dependentOn,以确保使用相同的代理。检查日志后发现,实际上使用的是同一个代理。

如何让测试作业使用在构建作业中创建的文件而不再次检出代码?如果有帮助的话,我正在使用 Angular 11 和 Azure DevOps Server 2020。

azure-devops azure-pipelines

9
推荐指数
2
解决办法
8208
查看次数

dotnet run 命令挂在 azure 管道中

我正在尝试在天蓝色管道中运行 cypress 测试。为此,我需要在运行测试之前运行“dotnet run”。我有一个管道任务成功运行“dotnet run”命令,但因为它永远不会退出,所以管道永远不会进入下一个任务。有没有办法使用 YAML 使管道作业进入下一步,同时保持“dotnet run”命令运行?

如果这不可能,是否有办法在 Azure 管道中运行 cypress 测试时在后台运行“dotnet run”?

这是我的 YAML 代码的一部分:

- task: DotNetCoreCLI@2
  displayName: 'dotnet run'
  inputs:
        command: run
        projects: Api/Api.csproj
        arguments: '--configuration Release --verbosity normal'

- script: 'npx cypress verify' // pipeline job never gets to this step
    displayName: 'Verify Cypress Can Run'
    failOnStderr: true
Run Code Online (Sandbox Code Playgroud)

yaml azure-devops azure-pipelines

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

Azure 管道缓存任务出现“API 资源位置未注册”错误

我正在尝试使用 Azure Pipelines 中的缓存任务来缓存我的 npm 依赖项。我正在使用 Azure DevOps Server 2020。当管道运行时,我收到以下错误消息:

Resolving key:
 - npm                          [string]
 - "Windows_NT"                 [string]
 - Web/package-lock.json [file] --> 118CDFE1CFD866ABF2489C955D015ED5D2962A76602B6B544D996C46B84
Resolved to: npm|"Windows_NT"|1C9oHznmI3rlvpEvjwhi+Ssx/V05b9WttZRq
Resolving restore key:
 - npm          [string]
 - "Windows_NT" [string]
Resolved to: npm|"Windows_NT"|**
Information, Getting a pipeline cache artifact with the following fingerprint: `npm|"Windows_NT"|1C9oHznmI3rlvpEvjwhi+Ssx/V05b9WttZRqxHYD+2w=`.
##[error]API resource location a7c78d38-31a8-417e-ba6b-7e58b352f304 is not registered on https://[azure_devops_url]/DefaultCollection/.
Run Code Online (Sandbox Code Playgroud)

这是我的管道 YAML 的一部分:

variables:
    npm_config_cache: $(Pipeline.Workspace)/Web/.npm
steps:
  - task: NodeTool@0
    displayName: 'Use Node 14.15.0'
    inputs:
      versionSpec: 14.15.0
      checkLatest: false
  - task: Cache@2 …
Run Code Online (Sandbox Code Playgroud)

npm azure-devops azure-pipelines

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

如何将 Laravel 5.5 应用部署到 Godaddy cPanel 共享主机

我对 Laravel 比较陌生。我对将 Laravel 5.5 应用程序部署到 Godaddy cPanel 共享主机的正确方法感到困惑。我已经阅读了多篇关于这个主题的帖子,他们给出了相互矛盾的建议。

我不清楚的部分是我是否将所有文件复制到服务器,然后运行以下 composer 命令?:

composer install --optimize-autoloaderphp artisan config:cache

我得到了应该在 public_html 文件夹之外的服务器上创建一个文件夹的部分,将所有应用程序文件放在那里,除了应用程序的公共子文件夹中的内容。

如果我想从子文件夹运行应用程序,我该怎么做?例如,www.mysite.com/laravelapp

我找到的示例仅从 public_html 文件夹本身运行它。它是否只涉及更改 www/index.php 中的文件路径?

php cpanel laravel laravel-5

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

无法解决与 git submodule 文件夹的合并冲突

我有两个 git 分支,开发和重新设计需要合并。我有一个名为 library 的子模块,其更新正在由开发跟踪。当我运行 ' git merge' 时,它说库已被两者修改,即使我没有触及库子模块。当我单击 VS Code 中的库以查看冲突的更改时,我看到了以下内容:

diff --cc library
index 749618f9,589a7ae5..00000000
--- a/library
+++ b/library
Run Code Online (Sandbox Code Playgroud)

我尝试删除库文件夹并git submodule update在重新设计分支中运行“ ”,然后再合并没有成功。我在重新设计中将 ignore = all 添加到 .gitmodules 文件中,但没有用。如何摆脱与此子模块的合并冲突?

git git-merge git-submodules git-merge-conflict

4
推荐指数
3
解决办法
3349
查看次数

在 Azure Pipeline 中出现“在默认池中找不到满足指定需求的代理”错误

我对 Azure DevOps 还比较陌生。我在 Windows 2016 服务器上安装了 Azure DevOps Server 2019。我使用经典编辑器创建了一个 Azure 管道。我的代理作业有四个步骤:安装节点、“npm install”、“dotnet Restore”和“ng test”。当我运行构建时,出现以下错误:

 No agent found in pool Default which satisfies the specified demands:
     Agent.Version -gtVersion 2.115.0 
Run Code Online (Sandbox Code Playgroud)

我查看了其他 StackOverflow 帖子并在服务器上安装了 Visual Studio 2019 来尝试解决该问题。仍然遇到同样的错误。我需要在管道中添加一些东西吗?

azure azure-devops azure-pipelines

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

在 Azure 管道中使用 Docker 映像作为构建代理时出现错误

我正在尝试使用 Docker 映像作为 Azure 管道中的构建代理。我正在使用 Azure DevOps Server 2019 和 Docker 企业版。

管道运行时出现此错误:

##[section]Starting: Initialize containers
##[command]C:\Program Files\Docker\docker.EXE version --format '{{.Server.APIVersion}}'
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/version: open //./pipe/docker_engine: Access is denied. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
'
##[error]Exit code 1 returned from process: file name 'C:\Program Files\Docker\docker.EXE', arguments 'version --format '{{.Server.APIVersion}}''.
##[section]Finishing: Initialize containers
Run Code Online (Sandbox Code Playgroud)

我已经验证服务器上安装了 Docker。我运行了以下命令来确保 Docker …

docker azure-devops azure-pipelines

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

克隆子模块时,GitLab 管道中出现“无法读取用户名”错误

我正在尝试在 GitLab 中为项目存储库中包含 Git 子模块的项目创建构建管道。当管道构建作业运行时,它会尝试克隆子模块,但失败并出现以下错误:could not read Username for 'https://gitlab.com': No such device or address

Git 子模块位于同一实例上的同一 GitLab 组中。我已经将这些环境变量添加到 .gitlab-ci.yml 中,如下所示:

---
stages:
  - lint
  - build
  - deploy

variables:
  GIT_SUBMODULE_STRATEGY: recursive
  GIT_SUBMODULE_FORCE_HTTPS: "true"
Run Code Online (Sandbox Code Playgroud)

这是我运行管道的项目中的 .gitmodules 文件:

[submodule "build-tools"]
        path = build-tools
        url = https://gitlab.com/core/frontend-dev/build-tools.git
Run Code Online (Sandbox Code Playgroud)

这是该项目的网址:https://gitlab.com/core/frontend-dev/api-service.git

我是否需要将子模块 url 转换为相对 url,因为它们都位于同一个 GitLab 实例中?

gitlab gitlab-ci-runner

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