You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.6 KiB

  1. Getting started
  2. ===============
  3. The easiest way to run the deployement is to use the **kargo-cli** tool.
  4. A complete documentation can be found in its [github repository](https://github.com/kubespray/kargo-cli).
  5. Here is a simple example on AWS:
  6. * Create instances and generate the inventory
  7. ```
  8. kargo aws --instances 3
  9. ```
  10. * Run the deployment
  11. ```
  12. kargo deploy --aws -u centos -n calico
  13. ```
  14. Building your own inventory
  15. ---------------------------
  16. Ansible inventory can be stored in 3 formats: YAML, JSON, or inifile. There is
  17. an example inventory located
  18. [here](https://github.com/kubernetes-incubator/kargo/blob/master/inventory/inventory.example):
  19. ```
  20. cp -r inventory my_inventory
  21. cp my_inventory/inventory.example my_inventory/inventory.cfg
  22. # edit the inventory file as needed
  23. ```
  24. Or you can use an
  25. [inventory generator](https://github.com/kubernetes-incubator/kargo/blob/master/contrib/inventory_builder/inventory.py)
  26. to create or modify an Ansible inventory. Currently, it is limited in
  27. functionality and is only use for making a basic Kargo cluster, but it does
  28. support creating large clusters. For example:
  29. ```
  30. cp -r inventory my_inventory
  31. declare -a IPS=(10.10.1.3 10.10.1.4 10.10.1.5)
  32. CONFIG_FILE=my_inventory/inventory.cfg python3 contrib/inventory_builder/inventory.py ${IPS}
  33. ```
  34. Starting custom deployment
  35. --------------------------
  36. Once you have an inventory, you may want to customize deployment data vars
  37. and start the deployment:
  38. ```
  39. # Edit my_inventory/groups_vars/*.yaml to override data vars
  40. ansible-playbook -i my_inventory/inventory.cfg cluster.yaml -b -v \
  41. --private-key=~/.ssh/private_key
  42. ```
  43. See more details in the [ansible guide](ansible.md).