Guest User

Untitled

a guest
Jan 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. (defn configure
  2. ""
  3. [session & {:keys [config max-heap heap-new jmx-port
  4. jvm-base-opts jvm-opts role nodes wrappers
  5. max-seeds]
  6. :or {max-heap "4G"
  7. heap-new "1G"
  8. jmx-port 7199
  9. jvm-base-opts default-jvm-opts
  10. max-seeds 2
  11. role :cassandra}
  12. :as options}]
  13. (let [config (merge default-config config)
  14. jvm-opts (concat jvm-base-opts jvm-opts)]
  15. (-> session
  16. (remote-file/remote-file "/etc/cassandra/cassandra-env.sh"
  17. :content (environment
  18. max-heap heap-new jmx-port jvm-opts))
  19. (remote-file/remote-file "/etc/cassandra/cassandra.yaml"
  20. :content (yaml/generate-string
  21. (-> config
  22. (wrap-address session)
  23. (wrap-seeds session role))))
  24. ((fn [s] (log/warn "Calling PROXIED-BY") s))
  25. (haproxy/proxied-by :director :cassandra :ip (compute/private-ip
  26. (session/target-node session))))))
Add Comment
Please, Sign In to add comment