通过make up , make new, make start等快捷方式使用沙箱时,默认只会使用单个元节点meta。而make up4,make new4,make start4则会使用全部的虚拟机。这里N值定义了额外的数据库节点数量(3台)。如果您的机器配置不足,则可以考虑使用更小的N值,减少数据库节点的数量。用户还可以修改每台机器的CPU核数和内存资源等,如配置文件中的注释所述。更详情的定制请参考Vagrant与Virtualbox文档。
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# alicloud_instance.pg-meta-1 will be created + resource "alicloud_instance""pg-meta-1"{ + availability_zone=(known after apply) + credit_specification=(known after apply) + deletion_protection=false + dry_run=false + host_name="pg-meta-1" + id=(known after apply) + image_id="centos_7_8_x64_20G_alibase_20200914.vhd" + instance_charge_type="PostPaid" + instance_name="pg-meta-1" + instance_type="ecs.s6-c1m2.small" + internet_charge_type="PayByTraffic" + internet_max_bandwidth_in=(known after apply) + internet_max_bandwidth_out=40 + key_name=(known after apply) + password=(sensitive value) + private_ip="10.10.10.10" + public_ip=(known after apply) + role_name=(known after apply) + secondary_private_ip_address_count=(known after apply) + secondary_private_ips=(known after apply) + security_groups=(known after apply) + spot_strategy="NoSpot" + status="Running" + subnet_id=(known after apply) + system_disk_category="cloud_efficiency" + system_disk_performance_level=(known after apply) + system_disk_size=40 + volume_tags=(known after apply) + vswitch_id=(known after apply)}# alicloud_instance.pg-test-1 will be created + resource "alicloud_instance""pg-test-1"{ + availability_zone=(known after apply) + credit_specification=(known after apply) + deletion_protection=false + dry_run=false + host_name="pg-test-1" + id=(known after apply) + image_id="centos_7_8_x64_20G_alibase_20200914.vhd" + instance_charge_type="PostPaid" + instance_name="pg-test-1" + instance_type="ecs.s6-c1m1.small" + internet_max_bandwidth_in=(known after apply) + internet_max_bandwidth_out=0 + key_name=(known after apply) + password=(sensitive value) + private_ip="10.10.10.11" + public_ip=(known after apply) + role_name=(known after apply) + secondary_private_ip_address_count=(known after apply) + secondary_private_ips=(known after apply) + security_groups=(known after apply) + spot_strategy="NoSpot" + status="Running" + subnet_id=(known after apply) + system_disk_category="cloud_efficiency" + system_disk_performance_level=(known after apply) + system_disk_size=40 + volume_tags=(known after apply) + vswitch_id=(known after apply)}# alicloud_instance.pg-test-2 will be created + resource "alicloud_instance""pg-test-2"{ + availability_zone=(known after apply) + credit_specification=(known after apply) + deletion_protection=false + dry_run=false + host_name="pg-test-2" + id=(known after apply) + image_id="centos_7_8_x64_20G_alibase_20200914.vhd" + instance_charge_type="PostPaid" + instance_name="pg-test-2" + instance_type="ecs.s6-c1m1.small" + internet_max_bandwidth_in=(known after apply) + internet_max_bandwidth_out=0 + key_name=(known after apply) + password=(sensitive value) + private_ip="10.10.10.12" + public_ip=(known after apply) + role_name=(known after apply) + secondary_private_ip_address_count=(known after apply) + secondary_private_ips=(known after apply) + security_groups=(known after apply) + spot_strategy="NoSpot" + status="Running" + subnet_id=(known after apply) + system_disk_category="cloud_efficiency" + system_disk_performance_level=(known after apply) + system_disk_size=40 + volume_tags=(known after apply) + vswitch_id=(known after apply)}# alicloud_instance.pg-test-3 will be created + resource "alicloud_instance""pg-test-3"{ + availability_zone=(known after apply) + credit_specification=(known after apply) + deletion_protection=false + dry_run=false + host_name="pg-test-3" + id=(known after apply) + image_id="centos_7_8_x64_20G_alibase_20200914.vhd" + instance_charge_type="PostPaid" + instance_name="pg-test-3" + instance_type="ecs.s6-c1m1.small" + internet_max_bandwidth_in=(known after apply) + internet_max_bandwidth_out=0 + key_name=(known after apply) + password=(sensitive value) + private_ip="10.10.10.13" + public_ip=(known after apply) + role_name=(known after apply) + secondary_private_ip_address_count=(known after apply) + secondary_private_ips=(known after apply) + security_groups=(known after apply) + spot_strategy="NoSpot" + status="Running" + subnet_id=(known after apply) + system_disk_category="cloud_efficiency" + system_disk_performance_level=(known after apply) + system_disk_size=40 + volume_tags=(known after apply) + vswitch_id=(known after apply)}# alicloud_security_group.default will be created + resource "alicloud_security_group""default"{ + id=(known after apply) + inner_access=(known after apply) + inner_access_policy=(known after apply) + name="default" + security_group_type="normal" + vpc_id=(known after apply)}# alicloud_security_group_rule.allow_all_tcp will be created + resource "alicloud_security_group_rule""allow_all_tcp"{ + cidr_ip="0.0.0.0/0" + id=(known after apply) + ip_protocol="tcp" + nic_type="intranet" + policy="accept" + port_range="1/65535" + priority=1 + security_group_id=(known after apply) + type="ingress"}# alicloud_vpc.vpc will be created + resource "alicloud_vpc""vpc"{ + cidr_block="10.10.10.0/24" + id=(known after apply) + ipv6_cidr_block=(known after apply) + name=(known after apply) + resource_group_id=(known after apply) + route_table_id=(known after apply) + router_id=(known after apply) + router_table_id=(known after apply) + status=(known after apply) + vpc_name="pigsty-demo-network"}# alicloud_vswitch.vsw will be created + resource "alicloud_vswitch""vsw"{ + availability_zone=(known after apply) + cidr_block="10.10.10.0/24" + id=(known after apply) + name=(known after apply) + status=(known after apply) + vpc_id=(known after apply) + vswitch_name=(known after apply) + zone_id="cn-beijing-k"}Plan: 8 to add, 0 to change, 0 to destroy.
Changes to Outputs:
+ meta_ip=(known after apply)Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
alicloud_vpc.vpc: Creating...
alicloud_vpc.vpc: Creation complete after 6s [id=vpc-2zed78z7n5z06o1dmydhj]alicloud_security_group.default: Creating...
alicloud_vswitch.vsw: Creating...
alicloud_security_group.default: Creation complete after 1s [id=sg-2ze7x7zu8tcdsefroofa]alicloud_security_group_rule.allow_all_tcp: Creating...
alicloud_security_group_rule.allow_all_tcp: Creation complete after 0s [id=sg-2ze7x7zu8tcdsefroofa:ingress:tcp:1/65535:intranet:0.0.0.0/0:accept:1]alicloud_vswitch.vsw: Creation complete after 6s [id=vsw-2zejctjdr16ryz194jxz4]alicloud_instance.pg-test-3: Creating...
alicloud_instance.pg-test-2: Creating...
alicloud_instance.pg-test-1: Creating...
alicloud_instance.pg-meta-1: Creating...
alicloud_instance.pg-test-3: Still creating... [10s elapsed]alicloud_instance.pg-test-2: Still creating... [10s elapsed]alicloud_instance.pg-test-1: Still creating... [10s elapsed]alicloud_instance.pg-meta-1: Still creating... [10s elapsed]alicloud_instance.pg-meta-1: Creation complete after 16s [id=i-2zef4frw6kezb47339wr]alicloud_instance.pg-test-1: Still creating... [20s elapsed]alicloud_instance.pg-test-2: Still creating... [20s elapsed]alicloud_instance.pg-test-3: Still creating... [20s elapsed]alicloud_instance.pg-test-2: Creation complete after 23s [id=i-2zefzvz0fyl7mloc4v30]alicloud_instance.pg-test-1: Still creating... [30s elapsed]alicloud_instance.pg-test-3: Still creating... [30s elapsed]alicloud_instance.pg-test-3: Creation complete after 33s [id=i-2zeeyodo2pc8b1k2d167]alicloud_instance.pg-test-1: Creation complete after 33s [id=i-2zef4frw6kezb47339ws]