我正在关注 Safari 上的 Cloud Foundry BOSH Fundamentals LiveLessons。我已将 BOSH via 部署bbl
到 GCP 中。我正在使用一个免费试用帐户,它为我提供了 8 个 vCPU。到目前为止,我使用了两种:一种用于 Director,一种用于 jumpbox。
我正在尝试使用以下命令部署 nginx:
bosh deploy -d nginx nginx.yml
nginx.yml 在哪里
---
name: nginx
releases:
- name: nginx
version: latest
stemcells:
- alias: ubuntu
os: ubuntu-trusty
version: latest
instance_groups:
- name: nginx
azs: [z2]
instances: 1
vm_type: sharedcpu
stemcell: ubuntu
networks:
- name: default
jobs:
- name: nginx
release: nginx
properties:
nginx_conf: |
worker_processes 1;
er ror_log /var/vcap/sys/log/nginx/error.log info;
#pid logs/nginx.pid; # PIDFILE is configured via monit's ctl
events {
worker_connections 1024;
}
http {
include /var/vcap/packages/nginx/conf/mime.types;
default_type application/octet-stream;
sendfile on;
ssi on;
keepalive_timeout 65;
server_names_hash_bucket_size 64;
server {
server_name _; # invalid value which will never trigger on a real hostname.
listen 0.0.0.0:80;
access_log /var/vcap/sys/log/nginx/toto-access.log;
error_log /var/vcap/sys/log/nginx/toto-error.log;
}
root /var/vcap/store/nginx;
index index.shtml index.html index.htm;
}
pre_start: |
#!/bin/bash -ex
NGINX_DIR=/var/vcap/store/nginx
if [ ! -d $NGINX_DIR ]; then
mkdir -p $NGINX_DIR
cd $NGINX_DIR
echo '<html><title>hello</title><body><h1>Hello <!--#echo var="REMOTE_ADDR" --></h1></body></html>' > index.shtml
fi
update:
canaries: 1
max_in_flight: 1
serial: false
canary_watch_time: 1000-60000
update_watch_time: 1000-60000
这给了我以下错误:
Task 8
Task 8 | 15:47:32 | Preparing deployment: Preparing deployment (00:00:01)
Task 8 | 15:47:33 | Preparing package compilation: Finding packages to compile (00:00:00)
Task 8 | 15:47:33 | Compiling packages: nginx/d6ddf5c4782669341b260a27c53208d32a17b3a5 (00:00:10)
L Error: CPI error 'Bosh::Clouds::VMCreationFailed' with message 'VM failed to create: googleapi: Error 403: Quota 'CPUS' exceeded. Limit: 8.0 in region europe-west3., quotaExceeded' in 'create_vm' CPI method
Task 8 | 15:47:43 | Error: CPI error 'Bosh::Clouds::VMCreationFailed' with message 'VM failed to create: googleapi: Error 403: Quota 'CPUS' exceeded. Limit: 8.0 in region europe-west3., quotaExceeded' in 'create_vm' CPI method
鉴于我应该剩下 6 个 vCPU,我尝试通过 Web 控制台手动创建实例,看看是否会收到类似的错误。我没有,我能够使用剩余的 6 个 vCPU 创建实例。知道发生了什么吗?