鉴于这种:
resource "aws_instance" "example" {
ami = "ami-2757f631"
instance_type = "t2.micro"
}
resource "aws_eip" "ip" {
instance = "${aws_instance.example.id}"
}
Run Code Online (Sandbox Code Playgroud)
来自https://www.terraform.io/intro/getting-started/dependencies.html
我收到一个错误:
* aws_eip.ip: Failure associating EIP: InvalidParameterCombination: You must specify an allocation id when mapping an address to a VPC instance
Run Code Online (Sandbox Code Playgroud)
知道为什么吗?
为什么要执行此任务(来自使用 ansible 启动 aws ec2 实例的最佳方法):
- name: Add the newly created EC2 instance(s) to the local host group (located inside the directory)
local_action: lineinfile
dest="./hosts"
regexp={{ item.public_ip }}
insertafter="[webserver]" line={{ item.public_ip }}
with_items: ec2.instances
Run Code Online (Sandbox Code Playgroud)
创建这个错误?
TASK [Add the newly created EC2 instance(s) to the local host group (located inside the directory)] ********************************************************************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error …Run Code Online (Sandbox Code Playgroud) Lambda有100个功能限制.
当100已经运行时提交101功能会发生什么?
它会:
我有一段非常简单的Terraform代码:
provider "aws" {
region = "eu-west-1"
}
module ec2 {
source = "./ec2_instance"
name = "EC2 Instance 1"
}
Run Code Online (Sandbox Code Playgroud)
模块在哪里:
variable "name" {
default = "Default Name from ec2_instance.tf"
}
resource "aws_instance" "example" {
ami = "ami-e5083683"
instance_type = "t2.nano"
subnet_id = "subnet-3e976259"
associate_public_ip_address = true
security_groups = [ "sg-7310e10b" ]
tags {
Name = "${var.name}"
}
}
Run Code Online (Sandbox Code Playgroud)
当我第一次运行它时,我得到以下输出:
security_groups.#: "" => "1"
security_groups.1642973399: "" => "sg-7310e10b"
Run Code Online (Sandbox Code Playgroud)
但是,下一次我尝试plan得到:
security_groups.#: "0" => "1" (forces new resource)
security_groups.1642973399: "" …Run Code Online (Sandbox Code Playgroud) 我有 2 个虚拟机。
我第一次运行时:
docker swarm join-token manager
Run Code Online (Sandbox Code Playgroud)
第二次我运行此命令的结果。
IE
docker swarm join --token SWMTKN-1-0wyjx6pp0go18oz9c62cda7d3v5fvrwwb444o33x56kxhzjda8-9uxcepj9pbhggtecds324a06u 192.168.65.3:2377
Run Code Online (Sandbox Code Playgroud)
然而,这输出:
Error response from daemon: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 192.168.65.3:2377: connect: connection refused"
Run Code Online (Sandbox Code Playgroud)
知道出了什么问题吗?
如果有帮助的话,我会使用 Vagrant 来启动这些虚拟机。
pod.yml
apiVersion: v1
kind: Pod
metadata:
name: hello-pod
labels:
zone: prod
version: v1
spec:
containers:
- name: hello-ctr
image: hello-world:latest
ports:
- containerPort: 8080
Run Code Online (Sandbox Code Playgroud)
kubectl create -f pod.yml
kubectl get pods
NAME READY STATUS RESTARTS AGE
hello-pod 0/1 CrashLoopBackOff 5 5m
Run Code Online (Sandbox Code Playgroud)
为什么CrashLoopBackOff?
根据文档:
https://kubernetes.io/docs/reference/ generated/kubectl/kubectl-commands#run
kubectl run NAME --image=image
将运行图像。
一些问题:
我认为这是一个 Pod,而不是一个容器?
我假设 NAME 与 pod 相关联?
我不是在谈论 GUI 或网络应用程序。
我说的是 REPL。例如,在 Python 中,我会简单地运行python以获取 REPL。
groovy 只是输出一些帮助文本。
Kubernetes 仪表板输出一堆错误消息。
你应该忽略他们吗?如果没有,你如何解决它们?
warning
configmaps is forbidden: User "system:serviceaccount:kube-system:deployment-controller" cannot list resource "configmaps" in API group "" in the namespace "default"
warning
persistentvolumeclaims is forbidden: User "system:serviceaccount:kube-system:deployment-controller" cannot list resource "persistentvolumeclaims" in API group "" in the namespace "default"
warning
secrets is forbidden: User "system:serviceaccount:kube-system:deployment-controller" cannot list resource "secrets" in API group "" in the namespace "default"
warning
services is forbidden: User "system:serviceaccount:kube-system:deployment-controller" cannot list resource "services" in API group "" in the namespace "default"
warning
ingresses.extensions is forbidden: User …Run Code Online (Sandbox Code Playgroud) 我已将Box2D添加到我正在研究的Cocos2D项目中.
我已经按照几个指南来说明如何做到这一点(所有这些似乎都不同!).但是,似乎都没有效果.
我遇到了这些类型的错误:
错误:Box2D/Collision/b2BroadPhase.h:没有这样的文件或目录
我以为我的标题搜索路径错了,但尝试了各种各样的变种而没有运气.
有什么建议?
kubernetes ×3
terraform ×2
amazon-ec2 ×1
ansible ×1
aws-lambda ×1
box2d ×1
docker ×1
elastic-ip ×1
groovy ×1
ios ×1
kubectl ×1
objective-c ×1