`rvm upgrade 2.2.1 2.2.3`
Run Code Online (Sandbox Code Playgroud)
在这里失败
+ gem wrappers regenerate
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /Users/snowcrash/.rvm/gems/ruby-2.2.3@global/wrappers/cert
+ return 1
Making gemset ruby-2.2.3@global pristine........................................................................................
Error running '__rvm_with ruby-2.2.3@global gemset_pristine',
showing last 15 lines of /Users/snowcrash/.rvm/log/1449848326/gemset.pristine-ruby-2.2.3@global.log
+ _failed+=("${_gem} --version ${_version}")
+ read _gem _version _platforms
+ (( 29 > 0 ))
+ rvm_error '\n'\''command gem pristine --extensions cert --version 1.2.7 coderay --version 1.1.0 commander --version 4.3.5 deliver --version 1.6.4 dotenv --version 2.0.2 fastlane --version 1.47.0 frameit --version …Run Code Online (Sandbox Code Playgroud) 任何人都知道null这一行是什么:
React.DOM.p(null, message);
Run Code Online (Sandbox Code Playgroud)
我知道这是一个方便的包装createElement,即
ReactElement createElement(
string/ReactClass type,
[object props],
[children ...]
)
Run Code Online (Sandbox Code Playgroud)
但我在努力理解为什么type是null.
这条线也是如此:
React.DOM.div(null, 'Hello World!')
Run Code Online (Sandbox Code Playgroud) 要测试ssh,我读到您需要使用类似以下内容的代码ssh -T user@domain.com:
根据man ssh:
-T Disable pseudo-terminal allocation.
-t Force pseudo-terminal allocation. This can be used to execute arbitrary screen-based programs on a remote
machine, which can be very useful, e.g. when implementing menu services. Multiple -t options force tty alloca-
tion, even if ssh has no local tty.
Run Code Online (Sandbox Code Playgroud)
但是我仍然不清楚,即使在阅读本文之后,-T在测试SSH时使用的目的是什么。
我在伪终端(https://linux.die.net/man/7/pty)上阅读,但这似乎无济于事。
只是想知道terraform init在每个之前是否是强制性的terraform plan?
即,如果我已经完成了terraform init但即将terraform plan基于一些更改的 Terraform 代码进行第二次操作,您是否需要进行第二次操作terraform init?
我创建了一个 S3 存储桶并将其设为静态网站。
如果我尝试重定向(例如到 Google),它对于 HTTP 来说效果很好。例如
curl -I http://test-s3-redirect.s3-website-eu-west-1.amazonaws.com
但对于 HTTPS 它只是挂起最终返回curl: (7) Failed to connect to test-s3-redirect.s3-website-eu-west-1.amazonaws.com port 443: Operation timed out
。例如
curl -I https://test-s3-redirect.s3-website-eu-west-1.amazonaws.com
我选择的选项AWS > S3 > Static website hosting是:
知道为什么吗?
是否可以列出Ansible角色中的任务?
即不只是grepping - name,有没有现成的方式做到这一点?
我有一个子模块,当我这样做时,git status我得到:
modified: <name of submodule> (modified content)
Run Code Online (Sandbox Code Playgroud)
我跑:
git submodule update <name of submodule>
Run Code Online (Sandbox Code Playgroud)
但仍然得到:
modified: <name of submodule> (modified content)
Run Code Online (Sandbox Code Playgroud)
知道为什么吗?
我有一个清单,出于测试目的,它对所有组使用相同的主机:
[webserver]
127.0.0.1 ansible_user=root ansible_ssh_pass=somepassword
[dbserver]
127.0.0.1 ansible_user=root ansible_ssh_pass=somepassword
[storageserver]
127.0.0.1 ansible_user=root ansible_ssh_pass=somepassword
Run Code Online (Sandbox Code Playgroud)
是否可以为该主机设置别名?
如果我使用这个:
[localvm]
127.0.0.1 ansible_user=root ansible_ssh_pass=somepassword
[webserver]
localvm
[dbserver]
localvm
[storageserver]
localvm
Run Code Online (Sandbox Code Playgroud)
我明白了fatal: [localvm]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname localvm: Name or service not known\r\n", "unreachable": true}。
这有效:
[localvm]
127.0.0.1 ansible_user=root ansible_ssh_pass=somepassword
[webserver:children]
localvm
[dbserver:children]
localvm
[storageserver:children]
localvm
Run Code Online (Sandbox Code Playgroud)
即我指定localvm为一个组 ( http://docs.ansible.com/ansible/latest/intro_inventory.html ) 但这不是我想要做的。我想为127.0.0.1called创建一个别名localvm。
我怎么做?
为什么我得到:
kube-system 1m 1h 245 kube-dns-fcd468cb-8fhg2.156899dbda62d287 Pod Warning FailedScheduling default-scheduler no nodes available to schedule pods
更新 - 我现在已经将整个集群迁移到us-west-2而不是eu-west-1这样我可以开箱即用地运行代码以防止引入任何错误。该tfstate文件显示正在引用正确的 EKS AMI。
例如
720: "image_id": "ami-00c3b2d35bddd4f5c",
FWIW,我正在关注https://www.terraform.io/docs/providers/aws/guides/eks-getting-started.html 并使用它在 Github 中链接的代码 - 即https://github。 com/terraform-providers/terraform-provider-aws/tree/master/examples/eks-getting-started
注意:查看 EC2 实例,我可以看到 2 个 EKS 节点使用正确的 AMI ID 运行。
==== 更新
检查节点:
kubectl get nodes
No resources found.
Run Code Online (Sandbox Code Playgroud)
ssh 进入其中一个节点并运行journalctl显示:
Nov 21 12:28:25 ip-10-0-0-247.us-west-2.compute.internal kubelet[4417]: E1121 12:28:25.419465 4417 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:461: Failed to list *v1.Node: Unauthorized
Nov 21 …Run Code Online (Sandbox Code Playgroud) 任何人都想解释为什么我在这里收到错误:
[~]$ irb
>> h = Hash
=> Hash
>> h["a"] = 100
NoMethodError: undefined method `[]=' for Hash:Class
from (irb):2
Run Code Online (Sandbox Code Playgroud)
但不是这里:
>> h = {'dog' => 'canine'}
=> {"dog"=>"canine"}
>> h["a"] = 100
=> 100
Run Code Online (Sandbox Code Playgroud) ansible ×2
ruby ×2
amazon-eks ×1
amazon-s3 ×1
ansible-role ×1
curl ×1
git ×1
inventory ×1
javascript ×1
kubernetes ×1
macos ×1
openssl ×1
reactjs ×1
redirect ×1
rvm ×1
ssh ×1
terraform ×1