Last active
August 16, 2017 22:50
-
-
Save mitechie/5afb59cb29acf14465b94ede77edfe2e to your computer and use it in GitHub Desktop.
Cross model relations with K8 across regions and monitored on AWS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get the latest juju edge snap | |
sudo snap refresh --edge juju | |
juju (edge) 2.3-alpha1+develop-c8d3e6c from 'canonical' refreshed | |
PATH=/snap/bin:$PATH | |
# turn on the Cross Model Relation feature flag | |
export JUJU_DEV_FEATURE_FLAGS=cross-model | |
juju bootstrap aws/us-west-2 west-noc | |
juju bootstrap google/europe-west1 eu-west-workloads | |
juju bootstrap google east-workloads | |
juju add-model eu-k8 -c eu-west-workloads | |
juju add-model us-k8 -c east-workloads | |
juju add-model big-brother -c west-noc | |
juju deploy kubernetes-core -m eu-west-workloads:eu-k8 | |
juju deploy kubernetes-core -m east-workloads:us-k8 | |
juju deploy prometheus -m west-noc:big-brother | |
juju deploy cs:~prometheus-charmers/grafana-3 -m west-noc:big-brother | |
juju relate prometheus grafana:grafana-source -m west-noc:big-brother | |
juju offer prometheus:target | |
Application "prometheus" endpoints [target] available at "admin/big-brother.prometheus" | |
juju deploy telegraf -m east-workloads:us-k8 | |
juju relate kubernetes-master:juju-info telegraf -m east-workloads:us-k8 | |
juju relate kubernetes-worker:juju-info telegraf -m east-workloads:us-k8 | |
juju deploy telegraf -m eu-west-workloads:eu-k8 | |
juju relate kubernetes-master:juju-info telegraf -m eu-west-workloads:eu-k8 | |
juju relate kubernetes-worker:juju-info telegraf -m eu-west-workloads:eu-k8 | |
juju switch east-workloads:us-k8 | |
juju consume west-noc:/big-brother.prometheus bb-prometheus | |
Added west-noc:admin/big-brother.prometheus as bb-prometheus | |
juju relate telegraf bb-prometheus:target | |
juju switch eu-west-workloads:eu-k8 | |
juju consume west-noc:/big-brother.prometheus bb-prometheus | |
Added west-noc:admin/big-brother.prometheus as bb-prometheus | |
juju relate telegraf bb-prometheus:target | |
juju switch west-noc:big-brother | |
juju expose grafana | |
# I admit here the IPs grabbed by Juju for the telegraf instances | |
# were the 10.X private addresses and I had to ssh to prometheus | |
# and edit those addresses in the config. The team is working to | |
# improve that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment