Ansible playbooks and roles to create a KubeEdge testbed in GCP.
-
Create a
.google-cred.json
file in the playbook dir following this guide. -
Place the private SSH key used in your GCP project as
gcp-key
in the playbook dir, or adjust the path in the following config files. -
Adjust the
remote_user
variable inansible.cfg
. -
Adjust
gcp_project
inscenario.yml
andinventory.gcp.yml
.
# create virtualenv
virtualenv -p python3.8 .venv
source .venv/bin/activate
# install pip dependencies
pip install -r requirements.txt
# install ansible-galaxy dependencies
ansible-galaxy install -r requirements.yaml
-
Adjust
scenario.yml
and specify the kubernetes worker and edge node instances. -
Run the playbook
ansible-playbook -i inventory.gcp.yml bootstrap-kubeedge-gcp.yml