在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):kubernetes-simulator/simulator开源软件地址(OpenSource Url):https://github.com/kubernetes-simulator/simulator开源编程语言(OpenSource Language):Go 38.3%开源软件介绍(OpenSource Introduction):SimulatorA distributed systems and infrastructure simulator for attacking and debugging
Kubernetes: For details on why we created this project and our ultimate goals take a look at the vision statement. Before you startUsageEnsure the AWS requirements are met and configured. Clone this repository and run: make run This will drop you into a bash shell in a launch container. You will have a
program on the Simulator CLI UsageCreating Environment And Lauching ScenarioBefore you launch your environment, please see the How It All Works section to ensure you have the necessary credentials and permissions in place and know what you are standing up. Create a remote state bucket for terraform simulator init You will be asked for the name for a S3 bucket for the Terraform remote state, which must be globally unique as per AWS standards. If this does not exist it will be created, otherwise the existing bucket will be used. Create the infra if it isn't there simulator infra create This will standup the infrastructure, including an initial Kubernetes Cluster List available scenarios simulator scenario list This will list all currently available scenarios. You can filter the list by difficulty or category using the appropriate arguments To get a better idea of what is involved in each scenario, e.g. node-shock-tactics simulator scenario describe node-shock-tactics Launch a scenario (sets up your cluster) simulator scenario launch node-shock-tactics This will launch your selected scenario. Login to the environment simulator ssh attack Running From within the ssh attack container you have access to a range of helper commands such as Start task start_task 1 The Accessing hints next_hint The Viewing all hints that have been requested show_hints The Ending a task end_task or start_task 2 The Cleaning Up EnvironmentDestroy your cluster when you are done simulator infra destroy Once you have finished you should destroy the environment to ensure that no additional costs are incurred. You run this command in the launch container. ScenariosThe following scenarios are currently shipped with the simulator: container-ambush container-defeat-in-detail container-phalanx-formation etcd-inverted-wedge master-shell-scrape master-encirclement network-feint network-hammer-and-anvil network-hedgehog-defence network-swarming node-amphibious-operations node-raiding node-shock-tactics policy-echelon-formation policy-fire-support policy-force-dispersal policy-vertical-envelopment rbac-contact-drill rbac-sangar rbac-flanking-maneuver rbac-shoot-and-scoot secret-high-ground secret-tank-desant But you can write your own and we really welcome any contributions of new scenarios :) How It All WorksInfrastructure DesignAWS ConfigurationSimulator uses terraform to provision its infrastructure. Terraform in turn honours all the rules for configuring the AWS CLI. Please follow these. You can provide your credentials via the https://www.terraform.io/docs/backends/types/s3.html All the Troubleshooting AWS
TerraformRefer to the simulator terraform documentation SSHSimulator, whether run in the launch container or on the host machine, will generate its own SSH RSA key pair. It will configure the cluster to allow access only with this keypair and automates writing SSH config and keyscanning the bastion on your behalf using custom SSH config and known_hosts files. This keeps all simulator-related SSH config separate from any other SSH configs you may have. All simulator-related SSH files are written to If you delete any of the files then simulator will recreate them and reconfigure the infrastructure as necessary on the next run Scenario Launching (perturb)Refer to the scenario launch documentation Launch Flow SequenceRefer to the Launch scenario flow documentation Scenario Task DefinitionRefer to the Tasks YAML file Format documentation Create a new scenarioRefer to the Create Scenario documentation The kubesim script
# cURL the script from GitHub curl -Lo kubesim https://github.com/kubernetes-simulator/simulator/releases/latest/download/kubesim # Make it executeable chmod a+x kubesim # Place the script on your path cp kubesim /usr/local/bin Development WorkflowGit hooksTo ensure all Git hooks are in place run the following: make setup-dev Development targets are specified in the Makefile. You can see all the available targets with descriptions by running Git commitsWe follow the conventional commit specification. Please ensure your commit messages adhere to this spec. ArchitectureLaunching a scenarioValidating a scenarioTODOEvaluating scenario progressTODOComponents
Specifications
Simulator API DocumentationThe simulator API docs are available on godoc.org: ContributingGuidelines for contributors, and instructions on working with specific parts of Simulator are in the Contributor Guide. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论