GithubHelp home page GithubHelp logo

hashicorp / c2m Goto Github PK

View Code? Open in Web Editor NEW
32.0 15.0 7.0 72 KB

Nomad, Terraform, and Packer configurations for the 2 Million Container Challenge (C2M)

Home Page: https://www.hashicorp.com/c2m

License: Mozilla Public License 2.0

Go 29.52% HCL 60.99% Shell 9.22% Makefile 0.11% JavaScript 0.16%

c2m's Introduction

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 challenge:

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=<REDACTED>' -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 for reference.

Building Images

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:

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:

./nomad.sh status

ssh

Add your ssh key to terraform/variables.tf and login as the admin user:

ssh admin@...

c2m's People

Contributors

hashicorp-copywrite[bot] avatar schmichael avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.