HiveBrain v1.2.0
Get Started
← Back to all entries
patterndockerMinor

Large number of host emulation

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
numberlargehostemulation

Problem

What would be the best way to emulate (or really to instantiate) a large number of hosts / virtual machines / docker containers in the cloud?

Assume I want to run a scenario where 10,000 hosts are running the same application. Is there a cloud service which provides the ability to "clone" a single host to 10K instances? Is there a way to configure slight changes in those hosts (in terms of Geo location / IP / hostname / MAC address)?

Solution

you create a Docker Swarm stack file:

---
version: '3.1'

services:   
  ubuntu:
    image: ubuntu # or your custom Docker image
      deploy:
        replicas: 10000


Then, with docker stack you can run your 10000 Ubuntu's on one or - probably better in this case - a set of Swarm hosts. This could be bare metal or AWS. Enjoy!

For MAC address is very interesting question which I hope other colleagues here can answer. Geolocation should be no problem as this is AFAIK a system setting - virtual OS does not implement a physical GPS sensor.

Docs give an example how to set a fixed MAC address on docker run - possibly this can be translated to the stack YML file as well.

docker run --mac-address=".." ...

Code Snippets

---
version: '3.1'

services:   
  ubuntu:
    image: ubuntu # or your custom Docker image
      deploy:
        replicas: 10000
docker run --mac-address=".." ...

Context

StackExchange DevOps Q#2550, answer score: 6

Revisions (0)

No revisions yet.