Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. [[snippets]]
  2. description = "Consul - List all known datacenters from the catalog"
  3. command = "consul catalog datacenters"
  4. tag = ["consul"]
  5. output = "dc1\n"
  6.  
  7. [[snippets]]
  8. description = "Consul - List all known members of a Consul Cluster"
  9. command = "consul members"
  10. tag = ["consul"]
  11. output = "Node Address Status Type Build Protocol DC Segment\nraspnomad01 192.168.1.60:8301 alive server 1.4.2+ent 2 dc1 <all>\n"
  12.  
  13. [[snippets]]
  14. description = "300 - Demo Hashiconf Step 3 - Create vault Service Account on K8s"
  15. command = "kubectl create sa fruits-catalog-vault"
  16. tag = ["hashiconf-step3"]
  17. output = ""
  18.  
  19. [[snippets]]
  20. description = "301 - Demo Hashiconf Step 3 - Create Cluster Role Binding for vault Service Account on K8s"
  21. command = "kubectl create -f fruits-catalog-vault-service-account.yaml -n fruits-catalog"
  22. tag = ["hashiconf-step3"]
  23. output = ""
  24.  
  25. [[snippets]]
  26. description = "302 - Demo Hashiconf Step 3 - Retrieve User secret for MongoDB"
  27. command = "kubectl get secret/mongodb -o jsonpath=\"{.data.database-user}\" | base64 -D"
  28. tag = ["hashiconf-step3"]
  29. output = ""
  30.  
  31. [[snippets]]
  32. description = "303 - Demo Hashiconf Step 3 - Retrieve User secret for MongoDB"
  33. command = "kubectl get secret/mongodb -o jsonpath=\"{.data.database-user}\" | base64 -D"
  34. tag = ["hashiconf-step3"]
  35. output = ""
  36.  
  37. [[snippets]]
  38. description = "304 - Demo Hashiconf Step 3 - Retrieve Password secret for MongoDB"
  39. command = "kubectl get secret/mongodb -o jsonpath=\"{.data.database-password}\" | base64 -D"
  40. tag = ["hashiconf-step3"]
  41. output = ""
  42.  
  43. [[snippets]]
  44. description = "305 - Demo Hashiconf Step 3 - Add User secret to KV Store"
  45. command = "vault kv put kv/fruit-catatlog-mongodb user=${MONGODB_USER}"
  46. tag = ["hashiconf-step3"]
  47. output = ""
  48.  
  49. [[snippets]]
  50. description = "306 - Demo Hashiconf Step 3 - Add Password secret to KV Store"
  51. command = "vault kv put kv/fruit-catatlog-mongodb password=${MONGODB_PWD}"
  52. tag = ["hashiconf-step3"]
  53. output = ""
  54.  
  55. [[snippets]]
  56. description = "307 - Demo Hashiconf Step 3 - Enable K8s auth method on Vault"
  57. command = "vault enable auth kubernetes"
  58. tag = ["hashiconf-step3"]
  59. output = ""
  60.  
  61. [[snippets]]
  62. description = "308 - Demo Hashiconf Step 3 - Configure K8s auth method"
  63. command = "vault write auth/kubertes/config token_reviewer_jwt=token "
  64. tag = ["hashiconf-step3"]
  65. output = ""
  66.  
  67. [[snippets]]
  68. description = "309 - Demo Hashiconf Step 3 - Configure K8s Roles"
  69. command = "vault write auth/kubertes/roles/fruits-catalog bound_service_account_names=vault_auth bound_service_account_namespaces=fruits-catalog policies=fruits-catalog-static ttl=24h"
  70. tag = ["hashiconf-step3"]
  71. output = ""
  72.  
  73. [[snippets]]
  74. description = "310 - Demo Hashiconf Step 3 - Create policy for fruits-catalog-mongodb"
  75. command = "vault policy write fruits-catalog-static fruits-catalog-static.hcl"
  76. tag = ["hashiconf-step3"]
  77. output = ""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement