Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hashicorp/c2m
Nomad, Terraform, and Packer configurations for the 2 Million Container Challenge (C2M)
https://github.com/hashicorp/c2m
Last synced: about 1 month ago
JSON representation
Nomad, Terraform, and Packer configurations for the 2 Million Container Challenge (C2M)
- Host: GitHub
- URL: https://github.com/hashicorp/c2m
- Owner: hashicorp
- License: mpl-2.0
- Archived: true
- Created: 2020-12-01T20:55:14.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-09T02:51:32.000Z (about 2 years ago)
- Last Synced: 2024-09-23T06:30:56.625Z (about 2 months ago)
- Language: HCL
- Homepage: https://www.hashicorp.com/c2m
- Size: 70.3 KB
- Stars: 32
- Watchers: 13
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# C2M: HashiCorp Nomad 2 Million Container Challenge
This repository contains all of the code to run scalability tests on Nomad for
the second iteration of the [C1M](https://hashicorp.com/c1m) challenge:**[C2M](https://hashicorp.com/c2m)**
## Overview
1. Use Packer to build images
2. Use Terraform to provision images
3. Use command and control instance to run `journey`### C2M Parameters
The following commands were used to provision and run C2M:
```
# From an operators local machine
terraform apply -var cluster_capacity=18000 -var 'nomad_num_schedulers=6' -var 'dd_key=' -parallelism=20# From the command and control instance output by terraform
# scp nomad/bench.nomad to command and control instance
# compile journey/ and scp to command and control instance
WORKERS=75 JOBS=2000 JOBSPEC=./bench.nomad PREFIX=c2m- ./journey start
```## Packer
Required: Packer 1.6+
Packer's HCL2 support is being used, so refer to the [Packer 1.5
docs](https://www.packer.io/docs/from-1.5) for reference.### Building Images
```sh
cd packer# Run once per region
packer build -var-file regions/us-west-2.pkrvars.hcl .
```Run once per region file to build an image per region.
## Terraform
Required: Terraform v0.12+
### Provisioning Infrastructure
To create or update infrastructure:
```sh
cd terraform
terraform init # On first run only# The retry_join_tag allows everyone to have their own cluster.
terraform plan -var retry_join_tag="$USER"
terraform apply -var retry_join_tag="$USER"# When you're done
terraform destroy -var retry_join_tag="$USER"
```## Accessing Cluster
After provisioning infrastructure with Terraform above it may be accessed via a
helper script:```sh
./nomad.sh status
```### ssh
Add your ssh key to `terraform/variables.tf` and login as the `admin` user:
```sh
ssh admin@...
```