This repository was archived by the owner on Jan 21, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
22# Create a single instance
33provision-instance : provision-instance.ikt
4+
5+ # Manage a scale group
6+ scale-group : provision-group.yml
Original file line number Diff line number Diff line change 1+ {{/* Input to create a group using the AWS instance plugin and manager */}}
2+ {{/* =% managerCommit true false %= */}}
3+
4+ {{ $size := flag "size" "int" "Size of the group" | prompt "How many nodes?" "int" 2 }}
5+ {{ $groupName := flag "group-name" "string" "Name of group" | prompt "Name of the group?" "string" "mygroup" }}
6+ {{ $az := flag "availability-zone" "string" "Availability zone" | prompt "AvailabilityZone?" "string" "us-west-1a" }}
7+ {{ $image := flag "image-id" "string" "Image ID" | prompt "Image to boot?" "string" "ami-4926fd29" }}
8+ {{ $instanceType := flag "instance-type" "string" "Instance type" | prompt "Instance type?" "string" "t2.micro"}}
9+ {{ $sshKey := flag "ssh-key" "string" "SSH key name" | prompt "SSH key?" "string" "" }}
10+ {{ $SecurityGroupId := flag "security-group-id" "string" "Security group ID" | prompt "Names of security group ID?" "string" "" }}
11+ {{ $project := var "/project" | flag "project" "string" "Project name" | prompt "Project?" "string" "myproject" }}
12+
13+ - Plugin : group
14+ Properties :
15+ ID : {{ $groupName }}
16+ Properties :
17+ Allocation :
18+ Size : {{ $size }}
19+ Flavor :
20+ Plugin : flavor-vanilla
21+ Properties :
22+ Init :
23+ - apt-get update -y
24+ - apt-get install wget curl
25+ - wget -qO- https://get.docker.com | sh
26+ Tags :
27+ project : {{ $project }}
28+
29+ Instance :
30+ Plugin : instance-aws/ec2-instance
31+ Properties :
32+ RunInstancesInput :
33+ Placement :
34+ AvailabilityZone : {{ $az }}
35+ ImageId : {{ $image }}
36+ InstanceType : {{ $instanceType }}
37+ KeyName : {{ $sshKey }}
38+ SecurityGroupIds :
39+ - {{ $SecurityGroupId }}
40+ Tags :
41+ Name : {{ $groupName }}
You can’t perform that action at this time.
0 commit comments