ATTENTION: THIS REPOSITORY IS HERE FOR HISTORICAL PURPOSES ONLY. THE MECHANICAL PHISH WAS AN AWESOME PIECE OF SOFTWARE, DEPLOYED DURING THE CGC AND OTHER COOL COMPETITIONS, BUT IT HAS NOT BEEN MAINTAINED SINCE 2016, AND HAS BITROTTED AND BEEN OBSOLETED BY OTHER INTERNAL AND PUBLIC PROTOTYPES. PLEASE DO NOT CONTACT ANYONE, ANYWHERE, ABOUT ANYTHING RELATED TO THIS REPOSITORY. THE INDIVIDUAL COMPONENTS OF THE MECHANICAL PHISH, SUCH AS REX, PATCHEREX, AND angr ITSELF, CONTINUE TO BE MAINTAINED IN THEIR OWN REPOSITORIES.
This repository contains scripts and data used in managing the configuration of the CGC cloud servers.
-
Get Ansible (
pip install -r requirements.txt
) -
Clone this repository.
-
Build or download the VM image in
roles/crs/vm/files/cgc-vm.qcow2
(see tester-qemu-docker). -
Run
ansible-playbook
-
Setup
Install and run Kubernetes on CGC nodes:
ansible-playbook -i inventory/mechaphish/hosts setup.yml -b
This will setup users, install dependencies and spawn a new Kubernetes instance.
-
Teardown
Use
teardown.yml
playbook to stop Kubernetes and reset nodes to their original state:ansible-playbook -i inventory/mechaphish/hosts teardown.yml -b
-
Virtual Competition
ansible-playbook -i inventory/mechaphish/hosts setup-virtualcompetition.yml -b
-
Registry
ansible-playbook -i inventory/mechaphish/hosts setup-registry.yml -b
You can also use the ansible
command directly to run tasks on remote hosts:
ansible all -i inventory/mechaphish/hosts -a "uptime"
Adding -vvvv (or --verbose) will get you lots of useful debug info.
Top-level ansible playbooks.
Application-specific configuration.
Host or host-group specific configuration.
CGC nodes are grouped in different sets. The main inventory lives at
inventory/NAME/hosts
and host and group variables files live in
inventory/NAME/{host,group}_vars
.
Dockerfile and replication controller settings for Kubernetes images.
crs
: handy script to start/stop crspowercontrol.py
: poorman IPMIvirtualcompetition
: start/stop virtual-competitionupdate-vm-image
: install latest components into DECREE VM image. Requires:pip install paramiko stopit apt-get --no-install-recommends install qemu-kvm adduser gitlab-runner kvm
List of hosts to use with sshp
(requires sshp).
sshp -f sshp/ips.txt uptime