CLI for deploying CTF Attack-Defense competition in the Yandex Cloud with ForcAD
To work with the cloud, you will need cli tool yc - link
What you need to create in Yandex Cloud:
- Service account and profile for terraform - link
Install Terraform and the provider for Yandex Cloud - link
Install Ansible
pip install --upgrade pip
pip install ansible passlib
The CLI tool ad.py should be used to manage the entire infrastructure of the competition
Starting AD:
- Configure the
config.ymlfor the entire infrastructure - Run
pip install -r requirements.txt - Run
./ad.py createfor create all infrastructure - Run
./ad.py generate-ansiblefor generate Ansible inventory file - Run
./ad.py pinguntil you get a successful ping (everything must be green) - Run
./ad.py provisionfor provision all infrastructure - Run
./ad.py start-servicesfor start services on the vulnboxes - Run
./ad.py generate-resultfor generate readme.txt for teams inresultfolder
For destroying all infrastructure:
- Run
./ad.py destroyfor delete all resources in Yandex Cloud
ForcAD configuration part see here
There is a config.yml file to configure the infrastructure
cloudcontains cloud settingsubnet_id- subnet id from Yandex Clouddns_zone_id- dns zone id from Yandex Cloudcpu- count of cpu coresmem- memory sizedisk- disk size
teamshere you need to specify only the names of the teams, the rest will be generated