Juju
Commandes
https://asciinema.org/a/267811 https://jaas.ai/docs/client-usage-tutorial Sur 18.04. J'ai installé Juju à l'install de la bécane. La machine ne doit pas avoir un réseau en /8
<source lang="bash"> snap install juju snap install lxd lxd init --auto set lxdbr0 ipv6.address none # disable ipv6
- On vérifie que Juju a detecté lxd
justine@juju:~$ juju clouds Only clouds with registered credentials are shown. There are more clouds, use --all to see them. You can bootstrap a new controller using one of these clouds...
Clouds available on the client: Cloud Regions Default Type Credentials Source Description localhost 1 localhost lxd 0 built-in LXD Container Hypervisor
- Notre controleur s'appellera Overlord
justine@juju:~$ juju bootstrap localhost overlord
- Il fait pas mal de choses
- On déploie notre première app
justine@juju:~$ juju deploy hello-juju Located charm "cs:hello-juju-4". Deploying charm "cs:hello-juju-4".
- On la regarde se déployer
- Voir la partie "Message" pour attendre que ça ait fini
justine@juju:~$ juju status --color Model Controller Cloud/Region Version SLA Timestamp default overlord localhost/localhost 2.7.4 unsupported 14:52:04Z
App Version Status Scale Charm Store Rev OS Notes hello-juju maintenance 1 hello-juju jujucharms 4 ubuntu
Unit Workload Agent Machine Public address Ports Message hello-juju/1* maintenance executing 1 10.4.29.231 (install) installing charm software
Machine State DNS Inst id Series AZ Message 1 started 10.4.29.231 juju-78eb20-1 bionic Running
- Une fois que l'application sert du http, on peut tester
justine@juju:~$ curl 10.4.29.231 Hello Juju!
- Ajout d'une bdd, on voit que les applications sont facile à relier entre elles
justine@juju:~$ juju deploy postgresql Located charm "cs:postgresql-203". Deploying charm "cs:postgresql-203". justine@juju:~$ juju relate postgresql:db hello-juju justine@juju:~$ curl 10.4.29.231 Hello Juju! justine@juju:~$ curl 10.4.29.231/greetings {"greetings":3} </source>