Eya*_*vin 7 python google-compute-engine google-cloud-platform
我正在尝试根据本手册在Ubuntu中安装Google Cloud Managed VM:[1],[2]
我按照Docker安装指南安装了Docker.
运行Docker: sudo docker -H tcp://127.0.0.1:2376 -d
我已根据HTTPS Docker指南创建了证书密钥.
我的环境变量:
我跑的时候 gcloud preview app setup-managed-vms
我收到一个错误:
https://gist.github.com/eyalev/aab86463bc63f4319d5c
Traceback (most recent call last):
File "/home/eyalev/Software/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py",
line 153, in <module> main() File "/home/eyalev/Software/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py",
line 149, in main _cli.Execute() File "/home/eyalev/Software/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py",
line 381, in Execute post_run_hooks=self.__post_run_hooks, kwargs=kwargs) File "/home/eyalev/Software/google-cloud-sdk/./lib/googlecloudsdk/calliope/frontend.py",
line 274, in _Execute pre_run_hooks=pre_run_hooks, post_run_hooks=post_run_hooks) File "/home/eyalev/Software/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py",
line 887, in Run result = command_instance.Run(args) File "/home/eyalev/Software/google-cloud-sdk/lib/googlecloudsdk/appengine/app_commands/setup_managed_vms.py",
line 37, in Run setup_registry.SetupRegistry() File "/home/eyalev/Software/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/setup_registry.py",
line 32, in SetupRegistry timeout=config.DOCKER_D_REQUEST_TIMEOUT) File "/home/eyalev/Software/google-cloud-sdk/platform/google_appengine/google/appengine/tools/docker/containers.py",
line 663, in NewDockerClient 'Couldn\'t connect to the docker daemon using the specified ' google.appengine.tools.docker.containers.DockerDaemonConnectionError:
Couldn't connect to the docker daemon using the specified environment
variables. Please check the environment variables DOCKER_HOST,
DOCKER_CERT_PATH and DOCKER_TLS_VERIFY are set correctly. If you are
using boot2docker, make sure you have run "$(boot2docker shellinit)"
Run Code Online (Sandbox Code Playgroud)
有什么我想念的吗?
我终于开始gcloud preview app setup-managed-vms研究ubuntu了.这就是我必须做的事情:
得到docker 1.3.0,而不是1.3.1.sudo apt-get install docker.io在我的机器上安装了旧版本的docker,所以我不得不首先删除它.但curl -sSL https://get.docker.com/ubuntu/ | sudo sh安装版本1.3.1,这也无法正常工作.我重播在脚本中的每一行https://get.docker.com/ubuntu/,但我不得不改变的最后一行apt-get install -y lxc-docker,以apt-get install -y lxc-docker-1.3.0官方的文档提到,App Engine不与boot2docker 1.3.1工作,但我认为他们的意思,它不与泊坞窗1.3.1工作.
我无法让127.0.0.1作为我的主机名.我必须localhost在创建ca和服务器证书时使用.
我不得不导出DOCKER_HOST=tcp://localhost:2376(注意使用localhost)DOCKER_TLS_VERIFY=1和DOCKER_CERT_PATH=<path>
我在/ etc/default/docker中设置了DOCKER_OPTS "--tlsverify --tlscacert=<path>/ca.pem --tlscert=<path>/server-cert.pem --tlskey=<path>/server-key.pem -H=0.0.0.0:2376"
gcloud preview app setup-managed-vms现在有效,但我还没有gcloud preview app run让我的应用程序工作.