This is a Terraform project to deploy DigitalOcean droplets for my LPI classes
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

il y a 5 ans
il y a 5 ans
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Terraform setup for DigitalOcean
  2. This is a teraform setup for my LPI Labs. The servers are deployed on DigitalOcean. The DNS is automatically updated with the server names.
  3. ## Prerequisites
  4. * Install *Terraform* on your local host:
  5. ```
  6. $ wget https://releases.hashicorp.com/terraform/0.11.7/terraform_0.11.7_linux_amd64.zip
  7. $ unzip terraform_0.11.7_linux_amd64.zip
  8. $ sudo cp terraform /usr/local/bin
  9. ```
  10. ## Instructions
  11. * Get the repo
  12. ```
  13. $ git clone https://git.theo-andreou.org/Personal/lpi-deploy-digitalocean.git
  14. $ cd lpi-deploy-digitalocean
  15. ```
  16. * Copy the *terraform.tfvars.example* to *terraform.tfvars* and setup your settings:
  17. ```
  18. do_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  19. domain = "example.org"
  20. count = 14
  21. server_name = {
  22. "debian" = "lpi-deb"
  23. "centos" = "lpi-centos"
  24. }
  25. images = {
  26. "debian" = "debian-9-x64"
  27. "centos" = "centos-7-x64"
  28. }
  29. ssh_keys = [
  30. "xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx",
  31. ]
  32. dns_server = "ns1.example.org"
  33. dns_key_name = "control.ns1.example.org"
  34. dns_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxx+xxxxxxxxxxxxxxxxxxxxx+xxx=="
  35. ```
  36. * Initialize your *Terraform* environment:
  37. ```
  38. $ terraform init
  39. ```
  40. * Create a *Terraform* plan:
  41. ```
  42. $ terraform plan -out lpi.plan
  43. ```
  44. * Apply the plan:
  45. ```
  46. $ terraform apply "lpi.plan"
  47. ```
  48. ## References
  49. * https://www.terraform.io/docs/providers/scaleway/index.html
  50. * https://scaleway.com