如何解决使用 Ansible 将 Quantum Mobile 部署到 AWS EC2 实例时遇到问题我不确定如何配置名为“vagrant”或“vagrant-ssh”的设置
这是shell中的反馈。我不确定如何配置或安装这个流浪的东西。我在网上找不到任何明确的说明。任何帮助将不胜感激。
(quantum_env) user@localComputer quantum-mobile % tox -e ansible -- --extra-vars "build_hosts_aws"
...
ansible run-test: commands[0] | ansible-playbook playbook-build.yml --extra-vars build_hosts_aws
[WARNING]: Invalid characters were found in group names but not replaced,use
-vvvv to see details
PLAY [Install ansible prerequisites] *******************************************
TASK [test configuration] ******************************************************
Sunday 14 February 2021 14:00:22 -0500 (0:00:00.040) 0:00:00.040 *******
ok: [vagrant-ssh] =>
msg: RUNNING PLAYBOOK FOR 'Quantum Mobile' VERSION '20.11.2a'
TASK [testing ansible environment] *********************************************
Sunday 14 February 2021 14:00:22 -0500 (0:00:00.029) 0:00:00.070 *******
ok: [vagrant-ssh] =>
msg: Connecting to host 'vagrant-ssh' as user 'vagrant'
TASK [Make local dist folder] **************************************************
Sunday 14 February 2021 14:00:22 -0500 (0:00:00.034) 0:00:00.105 *******
ok: [vagrant-ssh]
TASK [marvel-nccr.ansible_prerequisites : update cache] ************************
Sunday 14 February 2021 14:00:23 -0500 (0:00:00.369) 0:00:00.475 *******
fatal: [vagrant-ssh]: UNREACHABLE! => changed=false
msg: 'Failed to connect to the host via ssh: Can''t open user config file vagrant-ssh: No such file or directory'
unreachable: true
PLAY RECAP *********************************************************************
vagrant-ssh : ok=3 changed=0 unreachable=1 Failed=0 skipped=0 rescued=0 ignored=0
Sunday 14 February 2021 14:00:23 -0500 (0:00:00.026) 0:00:00.501 *******
===============================================================================
Make local dist folder -------------------------------------------------- 0.37s
testing ansible environment --------------------------------------------- 0.03s
test configuration ------------------------------------------------------ 0.03s
marvel-nccr.ansible_prerequisites : update cache ------------------------ 0.03s
ERROR: InvocationError for command /Users/user/quantum-mobile/.tox/ansible/bin/ansible-playbook playbook-build.yml --extra-vars build_hosts_aws (exited with code 4)
___________________________________ summary ____________________________________
ERROR: ansible: commands Failed
更新:我可以从链接安装 Vagrant,但无法正确安装 VirtualBox。当我尝试执行 vagrant up
时,我收到以下错误消息
(quantum_env) localhost:quantum-mobile user$ vagrant up
使用“virtualBox”提供程序启动机器“默认”...
==> 默认值:检查框 'bento/ubuntu-18.04' 版本 '202012.21.0' 是否是最新的...
==> 默认值:清除任何先前设置的网络接口...
执行 VBoxManage
时出错,这是 Vagrant 使用的 CLI
用于控制 VirtualBox。命令和标准错误如下所示。
命令:["hostonlyif","create"]
标准:0%... 进度状态:NS_ERROR_FAILURE VBoxManage:错误:无法创建仅主机适配器 VBoxManage:错误:VBoxNetAdpCtl:添加新界面时出错:无法打开/dev/vBoxnetctl:没有那个文件或目录 VBoxManage:错误:详细信息:代码 NS_ERROR_FAILURE (0x80004005),组件 HostNetworkInterfaceWrap,接口 IHostNetworkInterface VBoxManage:错误:上下文:“RTEXITCODE handleCreate(HandlerArg *)”在文件 VBoxManageHostonly.cpp 的第 95 行
解决方法
来自文档
const { data } = useQuery(["city",value],async () => {
const controller = new AbortController();
const signal = controller.signal;
// save the promise itself,not the resolved value
const promise = fetch(`http://localhost:8000/cities?name=${value}`,{
signal
}) as Promise<Response> & Cancelable;
promise.cancel = () => controller.abort();
// here we resolve the promise
const res = await promise;
const data: cityInterface[] = await res.json();
return data;
},{
enabled: value !== undefined
}
);
您可以从 Installing Vagrant 和 Vagrant >= 2.0.1
VirtualBox >= 6.1.6
Python >= 3.6
从 here
安装 VirtualBox
和 vagrant
后,您就可以启动机器了
VirtualBox
vagrant up
的主存储库中有一个 Vagrantfile
。
之后,您可以简单地按照 documentation
中的说明配置ansible-playbooks
vagrant-ssh
根据您希望如何运行 vagrant ssh-config > vagrant-ssh
tox -e ansible
,您需要修改 inventory 中的几个参数
您看到的错误源于 ansible-playbook
inventory
如果您想使用 vagrant-provision:
# this private network IP will be created by `vagrant up`
cloud_platform: virtualbox
ansible_host: 192.168.111.222
ansible_user: vagrant
vagrant-ssh:
# requires first running `vagrant ssh-config > vagrant-ssh`
cloud_platform: virtualbox
ansible_host: default
ansible_ssh_common_args: "-F vagrant-ssh"
ansible_user: vagrant
机器,您需要在此处更新 IP 地址。
aws
要启动实例,您可以参考 here
好像启动实例的链接坏了。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。