Compare commits
4 Commits
v2023.4.26
...
v2023.5.26
Author | SHA1 | Date | |
---|---|---|---|
d73e027ee3 | |||
054744e3e9 | |||
0e664bce44 | |||
58ef3b0077 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -9,4 +9,5 @@ dist/
|
||||
/agent-key.json
|
||||
/apps
|
||||
/server-key.json
|
||||
/.emissary-token
|
||||
/.emissary-token
|
||||
/out
|
@ -1,20 +1,22 @@
|
||||
# Documentation
|
||||
|
||||
- (FR) - [Introduction](./fr/introduction.md)
|
||||
|
||||
## Tutorials
|
||||
|
||||
- (FR) - [Premiers pas](./tutorials/fr/first-steps.md)
|
||||
- (FR) - [Déployer un serveur mandataire inverse sur un agent](./tutorials/fr/deploy-reverse-proxy.md)
|
||||
- (FR) - [Déployer une configuration UCI personnalisée sur un agent](./tutorials/fr/deploy-uci-configuration.md)
|
||||
|
||||
## References
|
||||
|
||||
### API
|
||||
### Specifications
|
||||
|
||||
[See `misc/rest/server.rest`](../misc/rest/server.rest)
|
||||
|
||||
### Spécifications
|
||||
|
||||
- [Schéma `app.emissary.cadoles.com`](../internal/spec/app/schema.json)
|
||||
- [Schéma `app.emissary.cadoles.com`](../internal/agent/controller/app/spec/schema.json)
|
||||
- [Schéma `proxy.emissary.cadoles.com`](../internal/spec/proxy/schema.json)
|
||||
- [Schéma `mdns.emissary.cadoles.com`](../internal/agent/controller/mdns/spec/schema.json)
|
||||
- [Schéma `uci.emissary.cadoles.com`](../internal/spec/uci/schema.json)
|
||||
- [Schéma `gateway.emissary.cadoles.com`](../internal/spec/gateway/schema.json)
|
||||
- [Schéma `sysupgrade.openwrt.emissary.cadoles.com`](../internal/agent/controller/openwrt/spec/sysupgrade/schema.json)
|
||||
|
||||
### Configuration
|
||||
|
||||
|
30
doc/fr/introduction.md
Normal file
30
doc/fr/introduction.md
Normal file
@ -0,0 +1,30 @@
|
||||
# Introduction
|
||||
|
||||
"Emissary" est un programme entrant dans la catégorie des outils de gestion et déploiement de configuration.
|
||||
|
||||
En utilisant un agent déployé sur chaque système cible, il permet aux administrateurs système de centraliser le contrôle et la supervision de la configuration. Grâce à ses fonctionnalités avancées, il est capable de faire converger la configuration d'une machine vers un modèle précis défini par une ou plusieurs spécifications centralisées sur un serveur de pilotage dédié.
|
||||
|
||||
Le principal atout d'"Emissary" réside dans sa capacité à activer des "contrôleurs" spécifiques pour chaque aspect de la configuration système. Ces contrôleurs sont des modules intelligents qui agissent comme des agents spécialisés, veillant à ce que les paramètres de configuration soient correctement appliqués et respectent les spécifications définies.
|
||||
|
||||
Grâce à cette approche modulaire, "Emissary" peut gérer diverses facettes de la configuration, telles que les paramètres réseau, les règles de sécurité, les options de performance et bien plus encore. Chaque contrôleur est conçu pour répondre à des besoins spécifiques, offrant ainsi une flexibilité et une granularité optimales dans la gestion de la configuration.
|
||||
|
||||
Certains contrôleurs permettent également l'exécution de services spécialisés comme des serveurs mandataires inverses ou des applications web autonomes.
|
||||
|
||||
L'utilisation d'un serveur de pilotage centralisé permet à "Emissary" de stocker et de mettre à jour les spécifications de configuration de manière cohérente. Les administrateurs peuvent définir des modèles de configuration précis, les affiner au fil du temps et les appliquer en un seul clic sur l'ensemble du parc de machines gérées. Cela garantit une uniformité et une conformité accrues, tout en facilitant la maintenance et les mises à jour à grande échelle.
|
||||
|
||||
À l'heure actuelle, Emissary est conçu pour cibler spécifiquement le système d'exploitation OpenWRT. L'activation des "contrôleurs" spécifiques à cet OS permet de converger la configuration de la machine OpenWRT vers un modèle correspondant aux spécifications centralisées sur le serveur de pilotage. Ces spécifications peuvent inclure des paramètres réseau, des configurations de sécurité, des règles de pare-feu, des options de routage, des services système, et bien d'autres éléments spécifiques à OpenWRT.
|
||||
|
||||
## Vue d'ensemble de l'architecture
|
||||
|
||||

|
||||
|
||||
|
||||
## Contrôleurs
|
||||
|
||||
Voici la liste des contrôleurs implémentés à ce jour:
|
||||
|
||||
- **Contrôleur UCI** - Permet de modifier les données [UCI](https://openwrt.org/docs/guide-user/base-system/uci) (**U**nified **C**onfiguration **S**ystem) d'un système OpenWRT et ainsi configurer les services systèmes, les règles pare-feu, la configuration des NICs, etc sur celui-ci.
|
||||
- **Contrôleur SysUpgrade** - Permet de mettre à jour un système OpenWRT via l'outil [`sysupgrade`](https://openwrt.org/docs/guide-user/installation/generic.sysupgrade).
|
||||
- **Contrôleur Proxy** - Permet de déployer des services de type passerelle mandataire inverse ("reverse proxy") sur la machine cible.
|
||||
- **Contrôleur mDNS** - Permet d'annoncer des services via mDNS sur les différents réseaux de la machine cible.
|
||||
- **Contrôleur App** - Permet de déployer des applications web "embarquées" (s'exécutant localement et non dépendantes d'une connectivité internet) sur la machine cible. Voir le projet ["Edge App"](https://forge.cadoles.com/arcad/edge).
|
59
doc/fr/resources/overview.plantuml
Normal file
59
doc/fr/resources/overview.plantuml
Normal file
@ -0,0 +1,59 @@
|
||||
@startuml
|
||||
top to bottom direction
|
||||
skinparam linetype ortho
|
||||
|
||||
node PilotNode as "Pilot Node" {
|
||||
database DataStore as "Data Store"
|
||||
|
||||
component EmissaryServer as "Emissary Server" {
|
||||
|
||||
component SpecificationRegistry as "Specification Registry" {
|
||||
component UCISpecification as "UCI Spec"
|
||||
component MDNSSpecification as "mDNS Spec"
|
||||
component AppSpecification as "App Spec"
|
||||
component ProxySpecification as "Proxy Spec"
|
||||
component SysUpgradeSpecification as "SysUpgrade Spec"
|
||||
}
|
||||
|
||||
component HTTPHandler as "HTTP Handler"
|
||||
|
||||
HTTPHandler .down.> SpecificationRegistry: validates agents data with
|
||||
|
||||
HTTPHandler .right.> DataStore: saves agent data in
|
||||
}
|
||||
}
|
||||
|
||||
node OperatorNode as "Operator Node" {
|
||||
component EmissaryClient as "Emissary Client"
|
||||
|
||||
EmissaryClient -left-> HTTPHandler: administrates
|
||||
}
|
||||
|
||||
node OpenWRTNode as "OpenWRT Node" {
|
||||
component EmissaryAgent as "Emissary Agent" {
|
||||
|
||||
component StateManager as "State Manager"
|
||||
|
||||
StateManager --up-> HTTPHandler: fetches agent ^*specs from
|
||||
|
||||
component UCIController as "UCI Controller"
|
||||
|
||||
UCIController .up.> StateManager: reconciles with
|
||||
|
||||
component SysUpgradeController as "SysUpgrade Controller"
|
||||
|
||||
SysUpgradeController .up.> StateManager: reconciles with
|
||||
|
||||
component ProxyController as "Proxy Controller"
|
||||
|
||||
ProxyController .up.> StateManager: reconciles with
|
||||
|
||||
component MDNSController as "mDNS Controller"
|
||||
|
||||
MDNSController .up.> StateManager: reconciles with
|
||||
|
||||
component AppController as "App Controller"
|
||||
|
||||
AppController .up.> StateManager: reconciles with
|
||||
}
|
||||
}
|
99
doc/fr/resources/overview.svg
Normal file
99
doc/fr/resources/overview.svg
Normal file
@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="643px" preserveAspectRatio="none" style="width:1713px;height:643px;background:#FFFFFF;" version="1.1" viewBox="0 0 1713 643" width="1713px" zoomAndPan="magnify"><defs/><g><!--MD5=[d09f24f3d7c03358bd8c02f81fe1cb3f]
|
||||
cluster PilotNode--><g id="cluster_PilotNode"><polygon fill="none" points="16,16,26,6,685,6,685,511,675,521,16,521,16,16" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="675" x2="685" y1="16" y2="6"/><line style="stroke:#181818;stroke-width:1.0;" x1="16" x2="675" y1="16" y2="16"/><line style="stroke:#181818;stroke-width:1.0;" x1="675" x2="675" y1="16" y2="521"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="73" x="310" y="33.9659">Pilot Node</text></g><!--MD5=[9c6b5fd9fe3a3a3c784efc27685ccdf9]
|
||||
cluster EmissaryServer--><g id="cluster_EmissaryServer"><rect fill="none" height="440" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:1.0;" width="523" x="138" y="57"/><rect fill="none" height="10" style="stroke:#181818;stroke-width:1.0;" width="15" x="641" y="62"/><rect fill="none" height="2" style="stroke:#181818;stroke-width:1.0;" width="4" x="639" y="64"/><rect fill="none" height="2" style="stroke:#181818;stroke-width:1.0;" width="4" x="639" y="68"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="110" x="344.5" y="84.9659">Emissary Server</text></g><!--MD5=[5f6297313bdca82dad0981382bb4d88a]
|
||||
cluster SpecificationRegistry--><g id="cluster_SpecificationRegistry"><rect fill="none" height="273" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:1.0;" width="459" x="170" y="192"/><rect fill="none" height="10" style="stroke:#181818;stroke-width:1.0;" width="15" x="609" y="197"/><rect fill="none" height="2" style="stroke:#181818;stroke-width:1.0;" width="4" x="607" y="199"/><rect fill="none" height="2" style="stroke:#181818;stroke-width:1.0;" width="4" x="607" y="203"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="149" x="325" y="219.9659">Specification Registry</text></g><!--MD5=[b562d696a455f482404b155c6a8fbfca]
|
||||
cluster OperatorNode--><g id="cluster_OperatorNode"><polygon fill="none" points="709,62,719,52,889,52,889,150,879,160,709,160,709,62" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="879" x2="889" y1="62" y2="52"/><line style="stroke:#181818;stroke-width:1.0;" x1="709" x2="879" y1="62" y2="62"/><line style="stroke:#181818;stroke-width:1.0;" x1="879" x2="879" y1="62" y2="160"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="104" x="743" y="79.9659">Operator Node</text></g><!--MD5=[68861f6d3d90d2f41bc4d4a2796fc73e]
|
||||
cluster OpenWRTNode--><g id="cluster_OpenWRTNode"><polygon fill="none" points="709,313,719,303,1696,303,1696,616,1686,626,709,626,709,313" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="1686" x2="1696" y1="313" y2="303"/><line style="stroke:#181818;stroke-width:1.0;" x1="709" x2="1686" y1="313" y2="313"/><line style="stroke:#181818;stroke-width:1.0;" x1="1686" x2="1686" y1="313" y2="626"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="109" x="1144" y="330.9659">OpenWRT Node</text></g><!--MD5=[6e6320f5227e3e26302b14a131b17aa5]
|
||||
cluster EmissaryAgent--><g id="cluster_EmissaryAgent"><rect fill="none" height="248" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:1.0;" width="939" x="733" y="354"/><rect fill="none" height="10" style="stroke:#181818;stroke-width:1.0;" width="15" x="1652" y="359"/><rect fill="none" height="2" style="stroke:#181818;stroke-width:1.0;" width="4" x="1650" y="361"/><rect fill="none" height="2" style="stroke:#181818;stroke-width:1.0;" width="4" x="1650" y="365"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="108" x="1148.5" y="381.9659">Emissary Agent</text></g><!--MD5=[45eee4c5a57edb1e2ac175c76a239d17]
|
||||
entity DataStore--><g id="elem_DataStore"><path d="M32,105.5 C32,95.5 77,95.5 77,95.5 C77,95.5 122,95.5 122,105.5 L122,133.5679 C122,143.5679 77,143.5679 77,143.5679 C77,143.5679 32,143.5679 32,133.5679 L32,105.5 " fill="#F1F1F1" style="stroke:#181818;stroke-width:0.5;"/><path d="M32,105.5 C32,115.5 77,115.5 77,115.5 C77,115.5 122,115.5 122,105.5 " fill="none" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="70" x="42" y="134.4659">Data Store</text></g><!--MD5=[7d2b259075cd0e421afb7965bd22532b]
|
||||
entity HTTPHandler--><g id="elem_HTTPHandler"><rect fill="#F1F1F1" height="49.0679" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="132" x="335" y="95"/><rect fill="#F1F1F1" height="10" style="stroke:#181818;stroke-width:0.5;" width="15" x="447" y="100"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="445" y="102"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="445" y="106"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="92" x="350" y="129.9659">HTTP Handler</text></g><!--MD5=[d74c349cfc963885f78088443cb132a3]
|
||||
entity UCISpecification--><g id="elem_UCISpecification"><rect fill="#F1F1F1" height="49.0679" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="100" x="213" y="238"/><rect fill="#F1F1F1" height="10" style="stroke:#181818;stroke-width:0.5;" width="15" x="293" y="243"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="291" y="245"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="291" y="249"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="60" x="228" y="272.9659">UCI Spec</text></g><!--MD5=[631d6ad5bad1f198f42ccf56fafe0582]
|
||||
entity MDNSSpecification--><g id="elem_MDNSSpecification"><rect fill="#F1F1F1" height="49.0679" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="118" x="348" y="238"/><rect fill="#F1F1F1" height="10" style="stroke:#181818;stroke-width:0.5;" width="15" x="446" y="243"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="444" y="245"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="444" y="249"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="78" x="363" y="272.9659">mDNS Spec</text></g><!--MD5=[f8753067470155b04e2f3a693924c320]
|
||||
entity AppSpecification--><g id="elem_AppSpecification"><rect fill="#F1F1F1" height="49.0679" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="103" x="501.5" y="238"/><rect fill="#F1F1F1" height="10" style="stroke:#181818;stroke-width:0.5;" width="15" x="584.5" y="243"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="582.5" y="245"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="582.5" y="249"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="63" x="516.5" y="272.9659">App Spec</text></g><!--MD5=[fd240f711946cd5d0dcadb1ea2ed786c]
|
||||
entity ProxySpecification--><g id="elem_ProxySpecification"><rect fill="#F1F1F1" height="49.0679" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="112" x="213" y="392"/><rect fill="#F1F1F1" height="10" style="stroke:#181818;stroke-width:0.5;" width="15" x="305" y="397"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="303" y="399"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="303" y="403"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="72" x="228" y="426.9659">Proxy Spec</text></g><!--MD5=[74aafaf76d366e174271de99960a7b8d]
|
||||
entity SysUpgradeSpecification--><g id="elem_SysUpgradeSpecification"><rect fill="#F1F1F1" height="49.0679" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="157" x="360.5" y="392"/><rect fill="#F1F1F1" height="10" style="stroke:#181818;stroke-width:0.5;" width="15" x="497.5" y="397"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="495.5" y="399"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="495.5" y="403"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="117" x="375.5" y="426.9659">SysUpgrade Spec</text></g><!--MD5=[584b4e495bc4cb9e5d46ff66335fc219]
|
||||
entity EmissaryClient--><g id="elem_EmissaryClient"><rect fill="#F1F1F1" height="49.0679" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="143" x="725.5" y="95"/><rect fill="#F1F1F1" height="10" style="stroke:#181818;stroke-width:0.5;" width="15" x="848.5" y="100"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="846.5" y="102"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="846.5" y="106"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="103" x="740.5" y="129.9659">Emissary Client</text></g><!--MD5=[cbe48146c9698f81ea53c2c6f51c8eda]
|
||||
entity StateManager--><g id="elem_StateManager"><rect fill="#F1F1F1" height="49.0679" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="139" x="1048.5" y="392"/><rect fill="#F1F1F1" height="10" style="stroke:#181818;stroke-width:0.5;" width="15" x="1167.5" y="397"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="1165.5" y="399"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="1165.5" y="403"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="99" x="1063.5" y="426.9659">State Manager</text></g><!--MD5=[27f8877b35bcf78d2c9b0e363caea569]
|
||||
entity UCIController--><g id="elem_UCIController"><rect fill="#F1F1F1" height="49.0679" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="135" x="749.5" y="537"/><rect fill="#F1F1F1" height="10" style="stroke:#181818;stroke-width:0.5;" width="15" x="864.5" y="542"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="862.5" y="544"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="862.5" y="548"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="95" x="764.5" y="571.9659">UCI Controller</text></g><!--MD5=[f5a45e51cb66ff1d3b5626d0df038fee]
|
||||
entity SysUpgradeController--><g id="elem_SysUpgradeController"><rect fill="#F1F1F1" height="49.0679" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="192" x="920" y="537"/><rect fill="#F1F1F1" height="10" style="stroke:#181818;stroke-width:0.5;" width="15" x="1092" y="542"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="1090" y="544"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="1090" y="548"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="152" x="935" y="571.9659">SysUpgrade Controller</text></g><!--MD5=[ed1f476319cb2bbabd1b988180210f61]
|
||||
entity ProxyController--><g id="elem_ProxyController"><rect fill="#F1F1F1" height="49.0679" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="147" x="1147.5" y="537"/><rect fill="#F1F1F1" height="10" style="stroke:#181818;stroke-width:0.5;" width="15" x="1274.5" y="542"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="1272.5" y="544"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="1272.5" y="548"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="107" x="1162.5" y="571.9659">Proxy Controller</text></g><!--MD5=[dcaaaabc13b59746f8f74cc6285a228b]
|
||||
entity MDNSController--><g id="elem_MDNSController"><rect fill="#F1F1F1" height="49.0679" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="153" x="1329.5" y="537"/><rect fill="#F1F1F1" height="10" style="stroke:#181818;stroke-width:0.5;" width="15" x="1462.5" y="542"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="1460.5" y="544"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="1460.5" y="548"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="113" x="1344.5" y="571.9659">mDNS Controller</text></g><!--MD5=[f7cab0dbd7f354492deaa54be612571f]
|
||||
entity AppController--><g id="elem_AppController"><rect fill="#F1F1F1" height="49.0679" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="138" x="1518" y="537"/><rect fill="#F1F1F1" height="10" style="stroke:#181818;stroke-width:0.5;" width="15" x="1636" y="542"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="1634" y="544"/><rect fill="#F1F1F1" height="2" style="stroke:#181818;stroke-width:0.5;" width="4" x="1634" y="548"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="98" x="1533" y="571.9659">App Controller</text></g><!--MD5=[8c3501b26c9c3ea39952224ab3fba557]
|
||||
link HTTPHandler to SpecificationRegistry--><g id="link_HTTPHandler_SpecificationRegistry"><path d="M334.7,128 C268.96,128 178,128 178,128 C178,128 178,158.5475 178,190.5263 C178,190.7761 178,191.026 178,191.276 " fill="none" id="HTTPHandler-to-SpecificationRegistry" style="stroke:#181818;stroke-width:1.0;stroke-dasharray:7.0,7.0;"/><polygon fill="#181818" points="178,191.276,182,182.276,178,186.276,174,182.276,178,191.276" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="156" x="151.03" y="142.897">validates agents data with</text></g><!--MD5=[1442fca2dc2f53bf9ae23d9e844c6c8b]
|
||||
link HTTPHandler to DataStore--><g id="link_HTTPHandler_DataStore"><path d="M334.65,112 C334.65,112 128.41,112 128.41,112 " fill="none" id="HTTPHandler-to-DataStore" style="stroke:#181818;stroke-width:1.0;stroke-dasharray:7.0,7.0;"/><polygon fill="#181818" points="123.41,112,132.41,116,128.41,112,132.41,108,123.41,112" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="115" x="203.28" y="126.897">saves agent data in</text></g><!--MD5=[04b946759b53ef2d0699bda61eed296c]
|
||||
reverse link HTTPHandler to EmissaryClient--><g id="link_HTTPHandler_EmissaryClient"><path d="M473.28,112 C473.28,112 725.14,112 725.14,112 " fill="none" id="HTTPHandler-backto-EmissaryClient" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="468.28,112,477.28,116,473.28,112,477.28,108,468.28,112" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="82" x="516.21" y="107.897">administrates</text></g><!--MD5=[0dd7156c6052ea784bc88dfca61e007b]
|
||||
reverse link HTTPHandler to StateManager--><g id="link_HTTPHandler_StateManager"><path d="M473.28,128 C473.28,128 665,128 665,128 C665,128 665,409 665,409 C665,409 921.14,409 1048.21,409 " fill="none" id="HTTPHandler-backto-StateManager" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="468.28,128,477.28,132,473.28,128,477.28,124,468.28,128" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="163" x="501" y="360.137">fetches agent ^*specs from</text></g><!--MD5=[beea302d68a5d9dc6027ab4e0b987cea]
|
||||
reverse link StateManager to UCIController--><g id="link_StateManager_UCIController"><path d="M1042.15,425 C1042.15,425 876.5,425 876.5,425 C876.5,425 876.5,497.45 876.5,536.78 " fill="none" id="StateManager-backto-UCIController" style="stroke:#181818;stroke-width:1.0;stroke-dasharray:7.0,7.0;"/><polygon fill="#181818" points="1047.15,425,1038.15,421,1042.15,425,1038.15,429,1047.15,425" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="88" x="814.43" y="420.897">reconciles with</text></g><!--MD5=[8cf138a1950decb1251fc88353171770]
|
||||
reverse link StateManager to SysUpgradeController--><g id="link_StateManager_SysUpgradeController"><path d="M1080.25,447.43 C1080.25,447.43 1080.25,536.9 1080.25,536.9 " fill="none" id="StateManager-backto-SysUpgradeController" style="stroke:#181818;stroke-width:1.0;stroke-dasharray:7.0,7.0;"/><polygon fill="#181818" points="1080.25,442.43,1076.25,451.43,1080.25,447.43,1084.25,451.43,1080.25,442.43" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="88" x="991.25" y="488.057">reconciles with</text></g><!--MD5=[8dba0e44c0268b5c6a2c1c6565c41b8b]
|
||||
reverse link StateManager to ProxyController--><g id="link_StateManager_ProxyController"><path d="M1167.5,447.43 C1167.5,447.43 1167.5,536.9 1167.5,536.9 " fill="none" id="StateManager-backto-ProxyController" style="stroke:#181818;stroke-width:1.0;stroke-dasharray:7.0,7.0;"/><polygon fill="#181818" points="1167.5,442.43,1163.5,451.43,1167.5,447.43,1171.5,451.43,1167.5,442.43" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="88" x="1078.5" y="507.057">reconciles with</text></g><!--MD5=[94df0ade1dc92be8853ce902c4f83dad]
|
||||
reverse link StateManager to MDNSController--><g id="link_StateManager_MDNSController"><path d="M1193.72,425 C1193.72,425 1406,425 1406,425 C1406,425 1406,497.45 1406,536.78 " fill="none" id="StateManager-backto-MDNSController" style="stroke:#181818;stroke-width:1.0;stroke-dasharray:7.0,7.0;"/><polygon fill="#181818" points="1188.72,425,1197.72,429,1193.72,425,1197.72,421,1188.72,425" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="88" x="1266.75" y="420.897">reconciles with</text></g><!--MD5=[e74434bc519cba41fdddc7c857699717]
|
||||
reverse link StateManager to AppController--><g id="link_StateManager_AppController"><path d="M1193.96,409 C1193.96,409 1587,409 1587,409 C1587,409 1587,493.45 1587,536.66 " fill="none" id="StateManager-backto-AppController" style="stroke:#181818;stroke-width:1.0;stroke-dasharray:7.0,7.0;"/><polygon fill="#181818" points="1188.96,409,1197.96,413,1193.96,409,1197.96,405,1188.96,409" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="88" x="1365.31" y="404.897">reconciles with</text></g><!--MD5=[6fc50b732d8962c26a79ff20e99a40e3]
|
||||
@startuml
|
||||
top to bottom direction
|
||||
skinparam linetype ortho
|
||||
|
||||
node PilotNode as "Pilot Node" {
|
||||
database DataStore as "Data Store"
|
||||
|
||||
component EmissaryServer as "Emissary Server" {
|
||||
|
||||
component SpecificationRegistry as "Specification Registry" {
|
||||
component UCISpecification as "UCI Spec"
|
||||
component MDNSSpecification as "mDNS Spec"
|
||||
component AppSpecification as "App Spec"
|
||||
component ProxySpecification as "Proxy Spec"
|
||||
component SysUpgradeSpecification as "SysUpgrade Spec"
|
||||
}
|
||||
|
||||
component HTTPHandler as "HTTP Handler"
|
||||
|
||||
HTTPHandler .down.> SpecificationRegistry: validates agents data with
|
||||
|
||||
HTTPHandler .right.> DataStore: saves agent data in
|
||||
}
|
||||
}
|
||||
|
||||
node OperatorNode as "Operator Node" {
|
||||
component EmissaryClient as "Emissary Client"
|
||||
|
||||
EmissaryClient -left-> HTTPHandler: administrates
|
||||
}
|
||||
|
||||
node OpenWRTNode as "OpenWRT Node" {
|
||||
component EmissaryAgent as "Emissary Agent" {
|
||||
|
||||
component StateManager as "State Manager"
|
||||
|
||||
StateManager - -up-> HTTPHandler: fetches agent ^*specs from
|
||||
|
||||
component UCIController as "UCI Controller"
|
||||
|
||||
UCIController .up.> StateManager: reconciles with
|
||||
|
||||
component SysUpgradeController as "SysUpgrade Controller"
|
||||
|
||||
SysUpgradeController .up.> StateManager: reconciles with
|
||||
|
||||
component ProxyController as "Proxy Controller"
|
||||
|
||||
ProxyController .up.> StateManager: reconciles with
|
||||
|
||||
component MDNSController as "mDNS Controller"
|
||||
|
||||
MDNSController .up.> StateManager: reconciles with
|
||||
|
||||
component AppController as "App Controller"
|
||||
|
||||
AppController .up.> StateManager: reconciles with
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
PlantUML version 1.2022.7(Mon Aug 22 19:01:30 CEST 2022)
|
||||
(GPL source distribution)
|
||||
Java Runtime: OpenJDK Runtime Environment
|
||||
JVM: OpenJDK 64-Bit Server VM
|
||||
Default Encoding: UTF-8
|
||||
Language: fr
|
||||
Country: FR
|
||||
--></g></svg>
|
After Width: | Height: | Size: 21 KiB |
3
doc/tutorials/fr/deploy-reverse-proxy.md
Normal file
3
doc/tutorials/fr/deploy-reverse-proxy.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Déployer un serveur mandataire inverse sur un agent
|
||||
|
||||
> TODO
|
130
doc/tutorials/fr/deploy-uci-configuration.md
Normal file
130
doc/tutorials/fr/deploy-uci-configuration.md
Normal file
@ -0,0 +1,130 @@
|
||||
# Déployer une configuration UCI personnalisée sur un agent
|
||||
|
||||
Via la spécification [`uci.emissary.cadoles.com`](../../../internal/spec/uci/schema.json) il est possible de configurer un agent avec un système OpenWRT. Dans ce tutoriel nous verrons:
|
||||
|
||||
- Comment exporter une configuration UCI existante au format attendu par Emissary;
|
||||
- Comment modifier la spécification d'un agent Emissary pour mettre à jour sa configuration via le serveur de pilotage.
|
||||
|
||||
## Étapes
|
||||
|
||||
### Identifier l'empreinte de votre agent
|
||||
|
||||
1. Sur la machine agent, utiliser la commande intégrée pour récupérer l'empreinte ("thumbprint") identifiant l'agent:
|
||||
|
||||
```
|
||||
emissary agent show-thumbprint
|
||||
```
|
||||
|
||||
**Noter la valeur retournée. Elle sera utilisée dans les étapes suivantes.**
|
||||
|
||||
### Exporter la configuration UCI de votre agent au format Emissary
|
||||
|
||||
1. Se connecter en SSH sur votre agent Emissary:
|
||||
|
||||
```
|
||||
ssh root@<agent_ip>
|
||||
```
|
||||
|
||||
2. Sur la machine agent, utiliser la commande intégrée pour exporter la configuration UCI de votre agent au format Emissary:
|
||||
|
||||
```
|
||||
uci export | emissary agent openwrt uci transform > my-agent-config.json
|
||||
```
|
||||
|
||||
> **Astuce**
|
||||
>
|
||||
> Par défaut, l'outil [LuCi](https://openwrt.org/fr/doc/howto/luci.essentials) est disponible sur votre agent. Vous pouvez y accéder via l'URL `http://<agent_ip>/`.
|
||||
>
|
||||
> Vous pouvez utiliser LuCi pour modifier la configuration de l'agent (par exemple, configurer le WiFi, créer des règles réseaux, etc) avant d'exporter la configuration.
|
||||
>
|
||||
> De cette manière, il est possible de répliquer celle ci sur plusieurs agents via Emissary !
|
||||
|
||||
3. Transférer le fichier `my-agent-config.json` sur la machine hébergeant votre serveur de pilotage Emissary.
|
||||
|
||||
### Transformer la configuration en spécification
|
||||
|
||||
#### Prérequis
|
||||
|
||||
- [`jq`](https://stedolan.github.io/jq/)
|
||||
- [`sponge`](https://linux.die.net/man/1/sponge) (paquet `moreutils` sur Ubuntu)
|
||||
|
||||
#### Étapes
|
||||
|
||||
1. Sur la machine hébergeant le serveur de pilotage Emissary, utiliser l'outil `jq` pour créer un objet JSON correspondant au schéma attendu par la spécification [`uci.emissary.cadoles.com`](../../../internal/spec/uci/schema.json):
|
||||
|
||||
```bash
|
||||
# Créer la structure de base de la spécification UCI
|
||||
cat >> my-uci-spec.json <<EOF
|
||||
{
|
||||
"config": null,
|
||||
"postImportCommands": [
|
||||
{ "command": "uci", "args": ["commit"] },
|
||||
{ "command": "reload_config", "args": [] }
|
||||
]
|
||||
}
|
||||
EOF
|
||||
|
||||
# Injecter la configuration récupérée de notre agent dans la spécification
|
||||
cat my-uci-spec.json | jq --slurpfile config my-agent-config.json '.config = $config[0]' | sponge my-uci-spec.json
|
||||
```
|
||||
|
||||
Notre spécification est prête à être assignée à notre agent !
|
||||
|
||||
|
||||
### Assigner la spécification à l'agent
|
||||
|
||||
1. Sur la machine hébergeant le serveur de pilotage Emissary, retrouver l'identifiant associé à l'agent:
|
||||
|
||||
```bash
|
||||
# Déclarer une variable contenant l'empreinte de l'agent précédemment trouvée
|
||||
AGENT_THUMBPRINT="<empreinte agent>"
|
||||
|
||||
# Récupérer l'identifiant de l'agent
|
||||
AGENT_ID=$(emissary api agent query -f json | jq -r --arg thumbprint "$AGENT_THUMBPRINT" '.[] | select(.thumbprint == $thumbprint) | .id')
|
||||
```
|
||||
|
||||
2. Assigner la spécification à l'agent UCI:
|
||||
|
||||
```bash
|
||||
cat my-uci-spec.json | emissary api agent spec update -a ${AGENT_ID} --no-patch --spec-data - --spec-name uci.emissary.cadoles.com
|
||||
```
|
||||
|
||||
**Bravo, vous avez déployé des spécifications UCI sur votre agent !**
|
||||
|
||||
### Exemple: modifier le `hostname` de votre agent
|
||||
|
||||
En intervenant directement sur notre spécification, il est possible de modifier la configuration et appliquer ces changements à notre agent.
|
||||
|
||||
1. Sur la machine hébergeant le serveur de pilotage, faire:
|
||||
|
||||
```bash
|
||||
# On créait une variable avec le nouveau hostname de notre agent
|
||||
MY_NEW_AGENT_HOSTNAME="MyEmissaryAgent"
|
||||
|
||||
# On utilise jq afin de modifier la valeur de configuration dans notre spécification UCI
|
||||
cat my-uci-spec.json | jq --arg hostname "$MY_NEW_AGENT_HOSTNAME" '( .config.packages[] | select(.name == "system") | .configs[].options[] | select(.name == "hostname").value ) |= $hostname' | sponge my-uci-spec.json
|
||||
```
|
||||
|
||||
> **Astuce**
|
||||
>
|
||||
> En utilisant la commande `grep -C 10 hostname my-uci-spec.json`, on peut voir que la valeur de configuration `hostname` a bien été mise à jour dans notre spécification.
|
||||
|
||||
2. Mettre à jour la configuration de l'agent:
|
||||
|
||||
```bash
|
||||
cat my-uci-spec.json | emissary api agent spec update -a ${AGENT_ID} --no-patch --spec-data - --spec-name uci.emissary.cadoles.com
|
||||
```
|
||||
|
||||
3. Sur l'agent, après quelques secondes (par défaut, la fréquence de mise à jour est de 1 fois par minute) l'agent devrait avoir son `hostname` mis à jour:
|
||||
|
||||
```
|
||||
uci show system.@system[].hostname
|
||||
```
|
||||
|
||||
Un message de ce type devrait s'afficher:
|
||||
|
||||
```
|
||||
system.cfg01e48a.hostname='MyEmissaryAgent'
|
||||
```
|
||||
|
||||
La modification devrait être également visible dans le prompt du shell de l'agent.
|
@ -1 +1,158 @@
|
||||
# Premiers pas
|
||||
# Premiers pas
|
||||
|
||||
## Prérequis
|
||||
|
||||
- Pour le serveur, une machine [Ubuntu 22.04](https://ubuntu.com/download/server)
|
||||
- Pour l'agent, un [RaspberryPi version 3](https://openwrt.org/toh/raspberry_pi_foundation/raspberry_pi)
|
||||
|
||||
## Étapes
|
||||
|
||||
### Préparer votre RaspberryPi
|
||||
|
||||
1. Sur la page des ["versions"](https://forge.cadoles.com/arcad/emissary-firmware/releases) des firmwares du projet Emissary, télécharger la dernière version disponibles correspondant à votre système cible, dans le cas présent `openwrt-<openwrt_version>-emissary-<emissary_firmware_version>-bcm27xx-bcm2710-rpi-3-ext4-factory.img.gz`
|
||||
|
||||
2. Brancher votre carte SD dans le lecteur, flasher celle ci avec le firmware:
|
||||
|
||||
```bash
|
||||
# Chemin vers le fichier de firmware précédemment téléchargé
|
||||
FIRMWARE_FILE="openwrt-<openwrt_version>-emissary-<emissary_firmware_version>-bcm27xx-bcm2710-rpi-3-ext4-factory.img.gz"
|
||||
|
||||
SDCARD_DEVICE=/dev/sdX # Chemin vers le "device" correspondant à votre carte SD
|
||||
|
||||
# Décompresser le firmware
|
||||
gzip -d "${FIRMWARE_FILE}"
|
||||
|
||||
# Flash la carte SD
|
||||
sudo dd if="${FIRMWARE_FILE%.gz}" of="${SDCARD_DEVICE}" bs=2M conv=fsync
|
||||
|
||||
# Attendre la fin des écritures
|
||||
sudo sync
|
||||
```
|
||||
|
||||
3. Placer votre carte SD dans votre RaspberryPi, le connecter à votre réseau en Ethernet puis l'allumer.
|
||||
|
||||
4. Scanner votre réseau pour trouver l'adresse IP de votre Raspberry Pi. Par exemple, avec l'outil `nmap`:
|
||||
|
||||
```bash
|
||||
sudo nmap -sP 192.168.0.* # À modifier par le préfixe correspondant à votre réseau local
|
||||
```
|
||||
|
||||
Une entrée équivalente à la suivante devrait être affichée:
|
||||
|
||||
```bash
|
||||
Starting Nmap 7.93 ( https://nmap.org ) at 2023-05-25 19:29 CEST
|
||||
Nmap scan report for 192.168.0.24
|
||||
Host is up (0.0034s latency).
|
||||
MAC Address: B8:27:EB:E5:7B:55 (Raspberry Pi Foundation)
|
||||
[...]
|
||||
```
|
||||
|
||||
5. Se connecter en SSH sur votre RaspberryPi et définir un mot de passe pour le compte administrateur:
|
||||
|
||||
```bash
|
||||
ssh root@<ip>
|
||||
|
||||
passwd
|
||||
```
|
||||
|
||||
### Installer le serveur Emissary
|
||||
|
||||
1. Sur la machine Ubuntu 22.04, télécharger les paquets Emissary sur la page ["Versions"](https://forge.cadoles.com/arcad/emissary/releases) du projet. Dans le cas présent, choisir le paquet Debian `emissary-server_<emissary_version>_linux_<arch>.deb` où `<arch>` correspond à l'architecture CPU de votre machine.
|
||||
|
||||
2. Installer le paquet télécharger via `dpkg`:
|
||||
|
||||
```
|
||||
sudo dpkg -i emissary-server_<emissary_version>_linux_<arch>.deb
|
||||
```
|
||||
|
||||
3. Appliquer les migrations sur la base de données:
|
||||
|
||||
```shell
|
||||
sudo emissary --workdir /usr/share/emissary --config /etc/emissary/server.yml server database migrate
|
||||
```
|
||||
|
||||
4. Redémarrer le service:
|
||||
|
||||
```shell
|
||||
sudo systemctl restart emissary-server
|
||||
```
|
||||
|
||||
5. Créer un jeton d'administration:
|
||||
|
||||
```shell
|
||||
sudo emissary --workdir /usr/share/emissary --config /etc/emissary/server.yml server auth create-token --role writer --subject $(whoami) > .emissary-token
|
||||
```
|
||||
|
||||
6. Vérifier l'authentification sur l'API:
|
||||
|
||||
```shell
|
||||
emissary api agent query
|
||||
```
|
||||
|
||||
Une réponse équivalente à la suivante devrait s'afficher:
|
||||
|
||||
```shell
|
||||
+----+-------+------------+--------+-------------+-----------+
|
||||
| ID | LABEL | THUMBPRINT | STATUS | CONTACTEDAT | UPDATEDAT |
|
||||
+----+-------+------------+--------+-------------+-----------+
|
||||
+----+-------+------------+--------+-------------+-----------+
|
||||
```
|
||||
|
||||
### Appairer l'agent avec votre serveur
|
||||
|
||||
1. Sur le RaspberryPi, exécuter la commande suivante:
|
||||
|
||||
```shell
|
||||
uci set emissary.agent.server_url='http://<server_ip>:3000'
|
||||
uci commit emissary
|
||||
reload_config
|
||||
```
|
||||
|
||||
2. Via la commande `logread`, vérifier que l'agent arrive à se connecter avec le serveur:
|
||||
|
||||
```shell
|
||||
logread -f
|
||||
```
|
||||
|
||||
Un message de ce type devrait s'afficher:
|
||||
|
||||
```
|
||||
Thu May 25 18:48:51 2023 daemon.info emissary[2202]: 2023-05-25 18:48:51.611 [INFO] <./internal/agent/controller/persistence/controller.go:58> (*Controller).Reconcile no changes detected, doing nothing {"controller": "persistence-controller"}
|
||||
Thu May 25 18:48:51 2023 daemon.info emissary[2202]: 2023-05-25 18:48:51.675 [ERROR] <./internal/agent/controller/spec/controller.go:43>(*Controller).reconcileAgent unexpected agent status {"controller": "spec-controller", "agentID": 1, "status": 0}
|
||||
Thu May 25 18:48:51 2023 daemon.info emissary[2202]: 2023-05-25 18:48:51.676 [INFO] <./internal/agent/controller/openwrt/uci_controller.go:32> (*UCIController).Reconcile could not find uci spec, doing nothing {"controller": "uci-controller"}
|
||||
Thu May 25 18:48:51 2023 daemon.info emissary[2202]: 2023-05-25 18:48:51.677 [INFO] <./internal/agent/controller/app/controller.go:43> (*Controller).Reconcile could not find app spec {"controller": "app-controller"}
|
||||
Thu May 25 18:48:51 2023 daemon.info emissary[2202]: 2023-05-25 18:48:51.678 [INFO] <./internal/agent/controller/proxy/controller.go:35>(*Controller).Reconcile could not find proxy spec {"controller": "proxy-controller"}
|
||||
Thu May 25 18:48:51 2023 daemon.info emissary[2202]: 2023-05-25 18:48:51.680 [INFO] <./internal/agent/controller/mdns/controller.go:38>(*Controller).Reconcile could not find mdns spec {"controller": "mdns-controller"}
|
||||
Thu May 25 18:48:51 2023 daemon.info emissary[2202]: 2023-05-25 18:48:51.680 [INFO] <./internal/agent/controller/openwrt/sysupgrade_controller.go:36> (*SysUpgradeController).Reconcile could not find sysupgrade spec, doing nothing {"controller": "sysupgrade-controller"}
|
||||
```
|
||||
|
||||
3. Sur le serveur, vérifier que l'agent a pu s'enregistrer:
|
||||
|
||||
```shell
|
||||
emissary api agent query
|
||||
```
|
||||
|
||||
Un message de ce type devrait s'afficher:
|
||||
|
||||
```
|
||||
+----+-------+-----------------------------------+--------+-----------------------------------+-----------------------------------+
|
||||
| ID | LABEL | THUMBPRINT | STATUS | CONTACTEDAT | UPDATEDAT |
|
||||
+----+-------+-----------------------------------+--------+-----------------------------------+-----------------------------------+
|
||||
| 1 | | 21CnUATcboKCaheb2uczWCuoxTZtnp... | 0 | 2023-05-25 18:49:51.652680196 ... | "2023-05-25T18:49:51.589225817... |
|
||||
+----+-------+-----------------------------------+--------+-----------------------------------+-----------------------------------+
|
||||
```
|
||||
|
||||
Noter l'identifiant associé à l'agent.
|
||||
|
||||
4. Mettre à jour le statut de l'agent afin qu'il soit en capacité à récupérer ses spécifications:
|
||||
|
||||
```
|
||||
emissary api agent update --agent-id <agent_id> --status 1
|
||||
```
|
||||
|
||||
**Bravo, vous avez appairé votre premier agent et son serveur Emissary !**
|
||||
|
||||
## Aller plus loin
|
||||
|
||||
- [Déployer une configuration UCI personnalisée sur un agent](./deploy-uci-configuration.md)
|
||||
- [Déployer un serveur mandataire inverse sur votre agent](./deploy-reverse-proxy.md)
|
@ -6,7 +6,7 @@ After=network.target
|
||||
Type=simple
|
||||
Restart=always
|
||||
WorkingDirectory=/usr/share/emissary
|
||||
ExecStart=/usr/bin/emissary --config /etc/emissary/config.yml agent run
|
||||
ExecStart=/usr/bin/emissary --config /etc/emissary/agent.yml agent run
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -4,9 +4,9 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
Restart=on-failure
|
||||
WorkingDirectory=/usr/share/emissary
|
||||
ExecStart=/usr/bin/emissary --config /etc/emissary/config.yml server run
|
||||
ExecStart=/usr/bin/emissary --config /etc/emissary/server.yml server run
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user