Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.23 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 = "30 - Demo Hahsiconf Step 3 - Retrieve User secret for MongoDB"
  15. command = "kubectl get secret/mongodb -o jsonpath=\"{.data.database-user}\" | base64 -D"
  16. tag = ["hashiconf-step3"]
  17. output = ""
  18.  
  19. [[snippets]]
  20. description = "31 - Demo Hahsiconf Step 3 - Retrieve Password secret for MongoDB"
  21. command = "kubectl get secret/mongodb -o jsonpath=\"{.data.database-password}\" | base64 -D"
  22. tag = ["hashiconf-step3"]
  23. output = ""
  24.  
  25. [[snippets]]
  26. description = "32 - Demo Hahsiconf Step 3 - Add User secret to KV Store"
  27. command = "vault kv put kv/fruit-catatlog-mongodb user=${MONGODB_USER}"
  28. tag = ["hashiconf-step3"]
  29. output = ""
  30.  
  31. [[snippets]]
  32. description = "33 - Demo Hahsiconf Step 3 - Add Password secret to KV Store"
  33. command = "vault kv put kv/fruit-catatlog-mongodb password=${MONGODB_PWD}"
  34. tag = ["hashiconf-step3"]
  35. output = ""
  36.  
  37. [[snippets]]
  38. description = "34 - Demo Hahsiconf Step 3 - Enable K8s auth method on Vault"
  39. command = "vault enable auth kubernetes"
  40. tag = ["hashiconf-step3"]
  41. output = ""
  42.  
  43. [[snippets]]
  44. description = "35 - Demo Hahsiconf Step 3 - Configure K8s auth method"
  45. command = "vault wrtie auth/kubertes/config token_reviewer_jwt=token kubernetes_host=host kubernetes_ca_cert=ca"
  46. tag = ["hashiconf-step3"]
  47. output = "\n"
  48.  
  49. [[snippets]]
  50. description = "Consul - List all known members of a Consul Cluster"
  51. command = "consul members"
  52. tag = ["consul"]
  53. 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"
  54.  
  55. [[snippets]]
  56. description = "30 - Demo Hashiconf Step 3 - Create vault Service Account on K8s"
  57. command = "kubectl create sa fruits-catalog-vault"
  58. tag = ["hashiconf-step3"]
  59. output = ""
  60.  
  61. [[snippets]]
  62. description = "31 - Demo Hashiconf Step 3 - Create Cluster Role Binding for vault Service Account on K8s"
  63. command = "kubectl create -f fruits-catalog-vault-service-account.yaml -n fruits-catalog"
  64. tag = ["hashiconf-step3"]
  65. output = ""
  66.  
  67. [[snippets]]
  68. description = "32 - Demo Hashiconf Step 3 - Retrieve User secret for MongoDB"
  69. command = "kubectl get secret/mongodb -o jsonpath=\"{.data.database-user}\" | base64 -D"
  70. tag = ["hashiconf-step3"]
  71. output = ""
  72.  
  73. [[snippets]]
  74. description = "33 - Demo Hashiconf Step 3 - Retrieve User secret for MongoDB"
  75. command = "kubectl get secret/mongodb -o jsonpath=\"{.data.database-user}\" | base64 -D"
  76. tag = ["hashiconf-step3"]
  77. output = ""
  78.  
  79. [[snippets]]
  80. description = "34 - Demo Hashiconf Step 3 - Retrieve Password secret for MongoDB"
  81. command = "kubectl get secret/mongodb -o jsonpath=\"{.data.database-password}\" | base64 -D"
  82. tag = ["hashiconf-step3"]
  83. output = ""
  84.  
  85. [[snippets]]
  86. description = "35 - Demo Hashiconf Step 3 - Add User secret to KV Store"
  87. command = "vault kv put kv/fruit-catatlog-mongodb user=${MONGODB_USER}"
  88. tag = ["hashiconf-step3"]
  89. output = ""
  90.  
  91. [[snippets]]
  92. description = "36 - Demo Hashiconf Step 3 - Add Password secret to KV Store"
  93. command = "vault kv put kv/fruit-catatlog-mongodb password=${MONGODB_PWD}"
  94. tag = ["hashiconf-step3"]
  95. output = ""
  96.  
  97. [[snippets]]
  98. description = "3è - Demo Hashiconf Step 3 - Enable K8s auth method on Vault"
  99. command = "vault enable auth kubernetes"
  100. tag = ["hashiconf-step3"]
  101. output = ""
  102.  
  103. [[snippets]]
  104. description = "38 - Demo Hashiconf Step 3 - Configure K8s auth method"
  105. command = "vault wrtie auth/kubertes/config token_reviewer_jwt=token "
  106. tag = ["hashiconf-step3"]
  107. output = ""
  108.  
  109. [[snippets]]
  110. description = "39 - Demo Hashiconf Step 3 - Configure K8s Roles"
  111. command = "vault wrtie auth/kubertes/roles/fruits-catalog bound_service_account_names=vault_auth bound_service_account_namespaces=fruits-catalog policies=fruits-catalog-static ttl=24h"
  112. tag = ["hashiconf-step3"]
  113. output = ""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement