Terraform code to launch Ampere A1 Shapes on Oracle Cloud Infrastructure (OCI) which automatically deploy and runs DeathStarBench
DeathStarBench is an open-source benchmark suite for cloud microservices. DeathStarBench includes five end-to-end services, four for cloud systems, and one for cloud-edge systems running on drone swarms. For the purposes of this automation we will be using the DeathStarBench "Social Media" application, which deploys a "Twitter" like social media web service utilizting containers. For more information regarding Ampere platforms and DeathStarBench results please take a look at the following:
- Ampere DeathStarBench workload Brief
- YouTube Videos:
This automation is essentially a spealized fork of the terraform-oci-ampere-a1 module adding additional configuration steps. Thus this will configure all the networking and security settings for instances being deployed. The instances being deployed have four cores and thirty two gigs of RAM. Essentially the remaining automation falls into two phases.
- Setup all the scaffolding and deploy two virtual machines passing different metadata into each host.
- The first host will be deployed as the DeathStarBench social media application.
- The deployment includes a single node Kubernetes cluster with Calico for Kubernetes network.
- Once the Kubernetes infrastructure is running, Helm charts are used to deploy aarch64 container images from a public container repository.
- The second virtal machine instance will pull the DeathStarBench source and build the client worker to generate load against the deployed DeathStarBench social media application.
- An Ngnix container is also deployed to allow the results of the load generation to be viewed via a simple HTML page.
- The first host will be deployed as the DeathStarBench social media application.
- While the systems are executing thier metadata, two scripts are being rendered with the dynamic external IP information and copied via SCP to the running instances.
- The rendering is done in order to faciliate connectivity to the DeathStarBench backend.
- Script ont he first node is used to load a default dataset into the DeathStarBench Social Media applicaiton after waiting for the application to be up and running.
- Build the Wrk2 client on the Second virtual machine instance from source, waiting until the DeathStarBench application is up and populated with data before executing the benchmark run.
- The rendering is done in order to faciliate connectivity to the DeathStarBench backend.
The easiest way to configure is to use a terraform.tfvars in the project directory.
Please that Compartment OCID is NOT the same as Tenancy OCID for Root Compartment.
You will need to supply the appropriate compartment ID.
The following is an example of what terraform.tfvars should look like:
tenancy_ocid = "ocid1.tenancy.oc1..aaaaaaaabcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopq"
user_ocid = "ocid1.user.oc1..aaaaaaaabcdefghijklmnopqrstuvwxyz0987654321zyxwvustqrponmlkj"
fingerprint = "a1:01:b2:02:c3:03:e4:04:10:11:12:13:14:15:16:17"
private_key_path = "/home/bwayne/.oci/oracleidentitycloudservice_bwayne-08-09-14-59.pem"
compartment_ocid = "ocid.compartment.oc1.aaaaaabbbbbbbcccccccddddddddd111111222222333333544444455"
# For development purposes if needed
# deathstarbench_repository_url = "-b <YOUR_BRANCH> https://oauth2:<YOURTOKEN>@gitlab.com/<YOUR_FORK>/DeathStarBench.git"
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| ampere_a1_cpu_core_count | Default core count for Ampere A1 instances in OCI Free Tier | string |
"4" |
no |
| ampere_a1_vm_memory | Default RAM in GB for Ampere A1 instances in OCI Free Tier | string |
"32" |
no |
| compartment_ocid | OCI Compartment ID | any |
n/a | yes |
| deathstarbench_repository_url | DeathStarBench repository url | string |
"-b arm64-port https://github.com/AmpereComputing/DeathStarBench.git" |
no |
| fingerprint | OCI Fingerprint ID for Free-Tier Account | any |
n/a | yes |
| instance_prefix | Name prefix for vm instances | string |
"dsb" |
no |
| oci_vcn_cidr_block | CIDR Address Block for OCI Networks | string |
"10.1.0.0/16" |
no |
| oci_vcn_cidr_subnet | CIDR Subnet Address for OCI Networks | string |
"10.1.1.0/24" |
no |
| oci_vm_count | OCI Free Tier Ampere A1 is four instances | number |
2 |
no |
| private_key_path | Local path to the OCI private key file | any |
n/a | yes |
| tenancy_ocid | OCI Tenancy ID for Free-Tier Account | any |
n/a | yes |
| user_ocid | OCI User ID for Free-Tier Account | any |
n/a | yes |
| wrk_duration | duration to use when running wrk | string |
"30s" |
no |
| wrk_number_of_conns | Number of connections to use when running wrk | string |
"1000" |
no |
| wrk_number_of_threads | Number of Threads to use when running wrk | string |
"10" |
no |
| wrk_requests_per_second | Number of requests per second to use when running wrk | string |
"5000" |
no |
No modules.
| Name | Description |
|---|---|
| AmpereA1_DeathStarBench_BootVolumeIDs | Output the boot volume IDs of the instance |
| AmpereA1_DeathStarBench_PrivateIPs | Output the private IP(s) of the instance(s) |
| AmpereA1_DeathStarBench_PublicIPs | Output the public IP(s) of the instance(s) |
| AmpereA1_DeathStarBench_RESULTS_URL | Output the URL of the WRK2 Output/Results |
| AmpereA1_DeathStarBench_URL | Output the url of the DeathStarBench application |
| OCI_Availability_Domains | Output Availability Domain Results |
| Ubuntu-20_04-aarch64-latest_name | Output the Ubuntu 20.04 image name |
| Ubuntu-20_04-aarch64-latest_ocid | Output the Ubuntu 20.04 image OCID |
| oci_home_region | Output the OCI Home Region |
| oci_ssh_private_key | Output OCI SSH Private Key |
| oci_ssh_public_key | Output OCI SSH Public Key |
| Name | Version |
|---|---|
| local | n/a |
| null | n/a |
| oci | n/a |
| random | n/a |
| tls | n/a |
| Name | Type |
|---|---|
| local_file.oci-ssh-privkey | resource |
| local_file.oci-ssh-pubkey | resource |
| null_resource.execute_wrk | resource |
| null_resource.populate_dsb_backend | resource |
| oci_core_instance.ampere_a1 | resource |
| oci_core_internet_gateway.ampere_internet_gateway | resource |
| oci_core_route_table.ampere_route_table | resource |
| oci_core_security_list.ampere_security_list | resource |
| oci_core_subnet.ampere_subnet | resource |
| oci_core_virtual_network.ampere_vcn | resource |
| random_uuid.random_id | resource |
| tls_private_key.oci | resource |
| oci_core_images.ubuntu-20_04-aarch64 | data source |
| oci_identity_availability_domains.ads | data source |
| oci_identity_regions.regions | data source |
| oci_identity_tenancy.tenancy | data source |
No requirements.
- https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformproviderconfiguration.htm
- Where to Get the Tenancy's OCID and User's OCID
- API Key Authentication
- Instance Principal Authorization
- Security Token Authentication
- How to Generate an API Signing Key
- Bootstrapping a VM image in Oracle Cloud Infrastructure using Cloud-Init
- Oracle makes building applications on Ampere A1 Compute instances easy
- scross01/oci-linux-instance-cloud-init.tf
- scross01/autonomous_linux_7.7.tf
- Oracle Cloud Always Free
- OCI Terraform Level 200
- OCI Stacks
- An Open-Source Benchmark Suite for Microservices and Thier Hardware-Software Implications for Cloud & Edge Systems
- The Morning Paper: An open-source benchmark suite for microservices and their hardware-software implications for cloud & edge systems
- Ampere DeathStarBench workload Brief
- Up to 44% Lower Latency on Ampere than x86 on DeathStarBench
- Up to 73% Higher Performance and Better Consistency than x86 on DeathStarBench

