Last active
April 5, 2024 18:33
-
-
Save hyperbolic2346/b11c026ec2568bfd0a83d5c88e11cc33 to your computer and use it in GitHub Desktop.
Juju Charm development scripts
This file contains 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
charm build kubernetes-master | |
charm push kubernetes-master | |
charm release cs:~knobby/kubernetes-master-16 --resource cdk-addons-0 --resource kube-apiserver-0 --resource kube-controller-manager-0 --resource kube-scheduler-0 --resource kubectl-0 |
This file contains 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
echo |openssl s_client -showcerts -connect 18.218.183.79:6443 2>/dev/null|openssl x509 -inform pem -noout -text |
This file contains 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
juju run --unit kubernetes-master/0 'charms.reactive get_flags' | |
juju run --unit kubernetes-master/0 'relation-ids cni' | |
juju run --unit kubernetes-master/0 'relation-get -r cni:11 - flannel/0' | |
juju run --unit kubernetes-master/0 'relation-get --help' |
This file contains 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
#!/bin/bash | |
echo kubernetes-worker kubernetes-master kubeapi-load-balancer etcd flannel easyrsa|xargs -n1 juju remove-application |
This file contains 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
#!/bin/bash | |
juju remove-machine {0..12} --force |
This file contains 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
# grep -v to not remove the currently active model | |
juju models|grep conjure|grep -v '*'|awk '{print $1}'|xargs -n1 juju destroy-model -y |
This file contains 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
juju upgrade-charm kubernetes-master --path /home/knobby/code/charms/builds/kubernetes-master --resource kube-scheduler=/home/knobby/tmp/foo.snap --resource kubectl=/home/knobby/tmp/foo.snap --resource kube-controller-manager=/home/knobby/tmp/foo.snap --resource cdk-addons=/home/knobby/tmp/foo.snap --resource kube-apiserver=/home/knobby/tmp/foo.snap |
This file contains 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
juju upgrade-charm kubernetes-worker --path /home/knobby/code/charms/builds/kubernetes-worker --resource cni-amd64=/home/knobby/cni-amd64.tgz --resource cni-s390x=/home/knobby/cni-s390x.tgz --resource kubectl=/home/knobby/tmp/foo.snap --resource kubelet=/home/knobby/tmp/foo.snap --resource kube-proxy=/home/knobby/tmp/foo.snap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment