在我为我的 repo 从 HTTPS 切换到 SSH 之后,我在推送到 origin master 时收到了这个错误:
ssh: Could not resolve hostname git: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
我还在 gitlab 中添加了我的 ssh。我该怎么办?
如何确定在主机上安装gitlab-runner 的最低硬件要求是什么?我想要一个特定的运行程序来运行测试、构建 Docker 映像并部署应用程序。
我建立了一个模型:
class Channel(models.Model):
title = models.CharField(max_length=255, unique=True)
slug = models.SlugField(allow_unicode=True, unique=True)
description = models.TextField(blank=True, default='')
description_html = models.TextField(editable=False, default='',
blank=True)
subscribers = models.ManyToManyField(User,
through="ChannelMembers", on_delete=models.CASCADE,)
Run Code Online (Sandbox Code Playgroud)
当我做 makemigration 它说:
TypeError: __init__() got an unexpected keyword argument 'on_delete'
Run Code Online (Sandbox Code Playgroud)
当删除on_delete 时,它说:
TypeError: __init__() missing 1 required positional argument: 'on_delete'
Run Code Online (Sandbox Code Playgroud)
穿什么?
我们使用 kubeadm 部署集群(1 个主节点 4 个工作节点)。
$ kubectl describe node worker1
Name: worker1
Roles: <none>
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/hostname=worker1
role=slave1
Annotations: kubeadm.alpha.kubernetes.io/cri-socket: /var/run/dockershim.sock
node.alpha.kubernetes.io/ttl: 0
volumes.kubernetes.io/controller-managed-attach-detach: true
CreationTimestamp: Tue, 24 Sep 2019 14:15:42 +0330
Taints: node.kubernetes.io/disk-pressure:NoSchedule
Unschedulable: false
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
NetworkUnavailable False Tue, 24 Sep 2019 14:16:19 +0330 Tue, 24 Sep 2019 14:16:19 +0330 WeaveIsUp Weave pod has set this
OutOfDisk False Mon, 07 Oct 2019 15:35:53 +0330 Sun, …Run Code Online (Sandbox Code Playgroud) 我根据本指南使用 kubeadm 部署了一个集群 (neo4j) 。现在我有这些豆荚:
NAME READY STATUS RESTARTS AGE
neo4j-core-0 1/1 Running 0 20h
neo4j-core-1 1/1 Running 0 20h
neo4j-core-2 1/1 Running 0 20h
Run Code Online (Sandbox Code Playgroud)
和这些服务:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 60d
neo4j ClusterIP None <none> 7474/TCP,6362/TCP 20h
nginx ClusterIP None <none> 80/TCP 25h
Run Code Online (Sandbox Code Playgroud)
然后我安装 kubernetes 仪表板:
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
Run Code Online (Sandbox Code Playgroud)
因此,当我kubectl proxy使用以下链接访问仪表板时,显示127.0.0.1 拒绝连接。
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/.
我应该怎么做才能访问仪表板?
我还按照本指南创建了示例用户。
我查看了任何其他问题,但找不到自己的解决方案!我在 gitlab 中设置了一个 CI 并使用了 gitlab 的共享运行程序。在构建阶段,我使用 docker 镜像作为基础镜像,但是当我使用docker命令时,它说:
无法连接到 unix:///var/run/docker.sock 上的 Docker 守护进程。docker 守护进程是否正在运行?
我看了这个话题,但还是不明白我该怎么办?
.gitlab-ci.yml :
stages:
- test
- build
- deploy
job_1:
image: python:3.6
stage: test
script:
- sh ./sh_script/install.sh
- python manage.py test -k
job_2:
image: docker:stable
stage: build
before_script:
- docker info
script:
- docker build -t my-docker-image .
Run Code Online (Sandbox Code Playgroud)
我知道 gitlab runner 必须注册才能使用docker和分享/var/run/docker.sock!但是在使用 gitlab 自带的 runner 时怎么做呢?