Skip to content

AmpereComputing/terraform-oci-ampere-a1-DeathStarBench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ampere Computing

terraform-oci-ampere-a1-DeathStarBench

Source Code documentation workflow release workflow pages-build-deployment nightly-build Latest version GitHub issues Github stars Github last-commit GitHub forks Github forks GitHub License License GitHub deployments Website License

Description

Terraform code to launch Ampere A1 Shapes on Oracle Cloud Infrastructure (OCI) which automatically deploy and runs DeathStarBench

Deploy to Oracle Cloud

What is 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:

Up to 44% Lower Latency on Ampere than x86 on DeathStarBench

Up to 73% Higher Performance and Better Consistency than x86 on DeathStarBench

Requirements

Automation Walkthrough

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.

  1. Setup all the scaffolding and deploy two virtual machines passing different metadata into each host.
    1. The first host will be deployed as the DeathStarBench social media application.
      1. The deployment includes a single node Kubernetes cluster with Calico for Kubernetes network.
      2. Once the Kubernetes infrastructure is running, Helm charts are used to deploy aarch64 container images from a public container repository.
    2. 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.
      1. An Ngnix container is also deployed to allow the results of the load generation to be viewed via a simple HTML page.
  2. 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.
    1. The rendering is done in order to faciliate connectivity to the DeathStarBench backend.
      1. 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.
      2. 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.

Configuration with terraform.tfvars

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"

Inputs

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

Modules

No modules.

Outputs

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

Providers

Name Version
local n/a
null n/a
oci n/a
random n/a
tls n/a

Resources

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

Requirements

No requirements.

References

About

Terraform to build and deploy deathstar bench on ampere a1

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •