From 8c4c943c4f8b4a8309a88c2c2fe171077bcc6643 Mon Sep 17 00:00:00 2001 From: Bin Xia Date: Fri, 26 Oct 2018 08:33:04 +0000 Subject: [PATCH] Deploy 2 VMs with different vm_resources --- scenarios/vm-resources/deployment.yml | 60 ++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/scenarios/vm-resources/deployment.yml b/scenarios/vm-resources/deployment.yml index de0d91c..f46b656 100644 --- a/scenarios/vm-resources/deployment.yml +++ b/scenarios/vm-resources/deployment.yml @@ -7,7 +7,7 @@ update: serial: false update_watch_time: 5000-1200000 instance_groups: -- name: nginx +- name: nginx-1 instances: 1 azs: [ z1 ] vm_resources: @@ -53,7 +53,63 @@ instance_groups: mkdir -p $NGINX_DIR cd $NGINX_DIR cat > index.shtml <BOSH on IPv6 + nginx-1 + +

Welcome to BOSH's nginx Release

+

+ My hostname/IP:
+ Your IP: +

+ + EOF + fi +- name: nginx-2 + instances: 1 + azs: [ z1 ] + vm_resources: + cpu: 2 + ram: 2048 + ephemeral_disk_size: 204800 + persistent_disk_type: default + stemcell: default + networks: + - name: ((scenario)) + jobs: + - name: nginx + release: nginx + properties: + nginx_conf: | + user nobody vcap; # group vcap can read most directories + worker_processes 1; + error_log /var/vcap/sys/log/nginx/error.log info; + 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 *:80; + # FIXME: replace all occurrences of 'example.com' with your server's FQDN + access_log /var/vcap/sys/log/nginx/example.com-access.log; + error_log /var/vcap/sys/log/nginx/example.com-error.log; + root /var/vcap/data/nginx/document_root; + index index.shtml; + } + } + pre_start: | + #!/bin/bash -ex + NGINX_DIR=/var/vcap/data/nginx/document_root + if [ ! -d $NGINX_DIR ]; then + mkdir -p $NGINX_DIR + cd $NGINX_DIR + cat > index.shtml <nginx-2

Welcome to BOSH's nginx Release