All Projects → tolitius → hubble

tolitius / hubble

Licence: other
hubbling the universe nebula by nebula

Programming Languages

CSS
56736 projects
clojure
4091 projects

Projects that are alternatives of or similar to hubble

Docker Vault
Docker Container for Hashicorp's Vault
Stars: ✭ 60 (+233.33%)
Mutual labels:  consul, vault
vault-consul-kubernetes
vault + consul on kubernetes
Stars: ✭ 60 (+233.33%)
Mutual labels:  consul, vault
Terraform Modules
Reusable Terraform modules
Stars: ✭ 63 (+250%)
Mutual labels:  consul, vault
Consul
Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
Stars: ✭ 23,723 (+131694.44%)
Mutual labels:  consul, vault
hashicorp-labs
Deploy locally on VM an Hashicorp cluster formed by Vault, Consul and Nomad. Ready for deploying and testing your apps.
Stars: ✭ 32 (+77.78%)
Mutual labels:  consul, vault
Consul Template
Template rendering, notifier, and supervisor for @hashicorp Consul and Vault data.
Stars: ✭ 4,371 (+24183.33%)
Mutual labels:  consul, vault
Vaultron
🤖 Vault clusters Terraformed onto Docker for great fun and learning!
Stars: ✭ 96 (+433.33%)
Mutual labels:  consul, vault
docker vault
Docker + Consul + Vault
Stars: ✭ 34 (+88.89%)
Mutual labels:  consul, vault
Docker Compose Ha Consul Vault Ui
A docker-compose example of HA Consul + Vault + Vault UI
Stars: ✭ 136 (+655.56%)
Mutual labels:  consul, vault
Envconsul
Launch a subprocess with environment variables using data from @hashicorp Consul and Vault.
Stars: ✭ 1,761 (+9683.33%)
Mutual labels:  consul, vault
course-spring-microservices
Code examples built for the purpose of video course: Microservices With Spring Boot And Spring Cloud
Stars: ✭ 74 (+311.11%)
Mutual labels:  consul, vault
Cault
docker compose for consul and vault official images
Stars: ✭ 157 (+772.22%)
Mutual labels:  consul, vault
vim-hcl
Syntax highlighting for HashiCorp Configuration Language (HCL)
Stars: ✭ 83 (+361.11%)
Mutual labels:  consul, vault
Fabio
Consul Load-Balancing made simple
Stars: ✭ 6,834 (+37866.67%)
Mutual labels:  consul, vault
super-duper-vault-train
🚄▼▼▼▼▼▼
Stars: ✭ 19 (+5.56%)
Mutual labels:  consul, vault
Gomplate
A flexible commandline tool for template rendering. Supports lots of local and remote datasources.
Stars: ✭ 1,270 (+6955.56%)
Mutual labels:  consul, vault
100 Days Of Go
100 days of Go learning
Stars: ✭ 24 (+33.33%)
Mutual labels:  consul, vault
go-fsimpl
Go io/fs.FS filesystem implementations for various URL schemes
Stars: ✭ 225 (+1150%)
Mutual labels:  consul, vault
Hashi Up
bootstrap HashiCorp Consul, Nomad, or Vault over SSH < 1 minute
Stars: ✭ 113 (+527.78%)
Mutual labels:  consul, vault
Hashi Helper
Disaster Recovery and Configuration Management for Consul and Vault
Stars: ✭ 155 (+761.11%)
Mutual labels:  consul, vault

Hubble

Let me take you to April 24, 1990

The Hubble Telescope has been launched into orbit.

Earth awaits for one of the Hubble's Clojure/Script engines to boot up to communicate with humanity.

We are inside the Hubble, let's help booting it up...

Hubble, can you hear me?

Not only can Hubble hear you, but it can also listen to you and help humanity navigate through the space:

steps taken:

  • upgrading Hubble store from spacecraft://tape to spacecraft://ssd
  • mission change from Eagle Nebula to Horsehead Nebula
  • swapping the old monochrome camera for a new color one
  • mission change form Horsehead Nebula to Pismis 24-1

Hubble is configured, serviced and controlled from Earth via Consul. Every event Hubble receives is audited into its space log (a.k.a the "mission log").

What's inside

Backend

Hubble listens to Consul events via envoy:

(defn watch-consul [path]
  (let [listener (add-watchers)]
    (info "watching on" path)
    (envoy/watch-path path #(on-change listener (keys %)))))

(defstate consul-watcher :start (watch-consul (config :consul))
                         :stop (envoy/stop consul-watcher))

mount listens to envoy, and restarts only those Hubble components that need to be restarted given the change in Consul:

(defn add-watchers []
  (let [watchers {:hubble/mission/target  [#'hubble.consul/config #'hubble.core/mission]
                  :hubble/camera/mode     [#'hubble.consul/config #'hubble.core/camera]
                  :hubble/store/url       [#'hubble.consul/config #'hubble.core/store]}]
    (mount/restart-listener watchers)))

Would not be great to shut down the whole Hubble "system" in case we need to swap a camera, right? I agree, hence only the camera component is restarted in case it needs to be swapped / changed at runtime.

Frontend

On every Hubble component restart, Hubble sends out changes to Earth via a websocket channel using almighty httpkit.

In order for people of Earth to visualize Hubble component states, space log, and what Hubble is currently doing, an excellent, mission critical rum reacts to all the changes sent by Hubble and rerenders components. Again, only components that need to rerender will, because incremental changes rule.

Can I control Hubble?

You sure can, just point it to your Consul and boot up.

In case you do not have a Consul instance running, you can just install it (i.e. brew instal consul or similar) and start it in dev mode:

$ consul agent -dev

Does Hubble really use LISP?

In fact it does for many years now. Meet SPIKE: Intelligent Scheduling of Hubble Space Telescope Observations:

The development of started in early 1987 using Texas Instruments Explorer Lisp machines

Since 1987 there has been a great deal of evolution in Lisp hardware and software. We have continued to modify to keep pace with these changes

Updating for new Lisp language features has not been difficult, and there are currently no plans to convert any of the system to C or C++

How do I set all this up?

Here are the detailed instructions on how to connect to and control the Hubble Telescope.

deps.edn

since this gem is from 2016, lots of things have changed, boot got replaced with deps.edn, etc.

in order to play with hubble via deps.edn:

  • make sure you have Consul running (can be started with cault)
  • the rest will be done by Makefile
$ make repl

clojure -M:with-ui   ;; compiles cljs => js before starting REPL

nREPL server started on port 54960 on host localhost - nrepl://localhost:54960
[Rebel readline] Type :repl/help for online help info
=>
=> (require '[hubble.env :as env] '[hubble.app :as app])

=> (env/init-consul)

;; read config from resource: "config.edn"
;; 00:32:09.457 [main] INFO  hubble.env - initializing Consul at http://localhost:8500/v1/kv

=> (app/-main)

;; 00:41:29.331 [main] INFO  mount-up.core - >> starting.. #'hubble.env/config
;; read config from resource: "config.edn"
;; 00:41:29.362 [main] INFO  mount-up.core - >> starting.. #'hubble.core/camera
;; 00:41:29.362 [main] INFO  mount-up.core - >> starting.. #'hubble.core/store
;; 00:41:29.362 [main] INFO  mount-up.core - >> starting.. #'hubble.core/mission
;; 00:41:29.362 [main] INFO  mount-up.core - >> starting.. #'hubble.watch/consul-watcher
;; 00:41:29.362 [main] INFO  hubble.watch - watching on http://localhost:8500/v1/kv/hubble
;; 00:41:29.365 [main] INFO  mount-up.core - >> starting.. #'hubble.server/http-server

go to http://localhost:4242/

great success.

License

Copyright © 2016 tolitius

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].