mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-03-05 10:50:33 +00:00
This allows to manage groups of VMs across multiple infrastructure providers. It also adds support to create groups of VMs on OpenStack. WARNING: the syntax of workshopctl has changed slightly. Check READMEs for details.
20 lines
333 B
Bash
20 lines
333 B
Bash
infra_start() {
|
|
COUNT=$1
|
|
|
|
cp terraform/*.tf tags/$TAG
|
|
(
|
|
cd tags/$TAG
|
|
terraform init
|
|
echo prefix = \"$TAG\" >> terraform.tfvars
|
|
echo count = \"$COUNT\" >> terraform.tfvars
|
|
terraform apply -auto-approve
|
|
terraform output ip_addresses > ips.txt
|
|
)
|
|
}
|
|
|
|
infra_stop() {
|
|
(
|
|
cd tags/$TAG
|
|
terraform destroy -auto-approve
|
|
)
|
|
} |