« Le portail self-service » : différence entre les versions

De Le Labo de Yorzian
Aller à la navigation Aller à la recherche
Ligne 24 : Ligne 24 :
   api:
   api:
     address: "[::]:8080"
     address: "[::]:8080"
   blocklist:
   blocklist:
     - 1.2.3.4
     - 1.2.3.4
   feedback:
   feedback:
     enabled: false
     enabled: false
Ligne 36 : Ligne 34 :
       to: ADDRESS
       to: ADDRESS
       subject: User feedback from try-it
       subject: User feedback from try-it
   limits: # 64 machines au total, chaque IP peut en demander 10
   limits:
     total: 64
     total: 64
     ip: 10
     ip: 10
   maintenance:
   maintenance:
     enabled: false
     enabled: false
     message: Custom downtime message
     message: Custom downtime message
   proxy:
   proxy:
     address: ""
     address: ""
     certificate: |-
     certificate: |-
     key: |-
     key: |-
       PEM
       PEM
   statistics:
   statistics:
     keys:
     keys:
       - 69280011-c8a5-4ef9-ae3d-e7caf4d06e06
       - 69280011-c8a5-4ef9-ae3d-e7caf4d06e06
   terms: |-
   terms: |-
     By using the GameShell experiment server, you agree that:<nowiki><br /></nowiki>
     ToS<nowiki><br /></nowiki>
     <nowiki><ul></nowiki>
     <nowiki><ul></nowiki>
       <nowiki><li>Access to this service may be revoked at any time for any reason</li></nowiki>
       <nowiki><li>Access to this service may be revoked at any time for any reason</li></nowiki>
Ligne 64 : Ligne 56 :
       <nowiki><li>Any abuse of this service may lead to a ban or other applicable actions</li></nowiki>
       <nowiki><li>Any abuse of this service may lead to a ban or other applicable actions</li></nowiki>
     <nowiki></ul></nowiki>
     <nowiki></ul></nowiki>
  incus:
  incus:
   client:
   client:
Ligne 81 : Ligne 72 :


   source:
   source:
     instance: "self1"
     instance: "self1" #nom de l'image créée
     type: "container"
     type: "container" #ou "virtual-machine"


   profiles:
   profiles:
     - default
     - default #Profil Incus à utiliser


   limits:
   limits:

Version du 6 février 2025 à 14:37

L'idée derrière le portail self-service, est d'avoir une plateforme pour accéder à des machines préconfigurées pour des cours ou des expérimentations:

  • La machine a une durée de vie définie à l'avance
  • Il y a un contrôle de limite par adresse IP
  • Basé sur des images créées localement

Projet d'origine

https://github.com/lxc/incus-demo-server

Le fork

https://github.com/yrougy/incus-demo

Usage

Pour le moment, sur la même machine que le serveur Incus.

Dépendances
go install github.com/lxc/incus-demo-server/cmd/incus-demo-server@latest
Construction
make
Configuration
server:
  api:
    address: "[::]:8080"
  blocklist:
    - 1.2.3.4
  feedback:
    enabled: false
    timeout: 20
    email:
      smtp: SERVER:PORT
      from: ADDRESS
      to: ADDRESS
      subject: User feedback from try-it
  limits: # 64 machines au total, chaque IP peut en demander 10
    total: 64
    ip: 10
  maintenance:
    enabled: false
    message: Custom downtime message
  proxy:
    address: ""
    certificate: |-
    key: |-
      PEM
  statistics:
    keys:
      - 69280011-c8a5-4ef9-ae3d-e7caf4d06e06
  terms: |-
    ToS<br />
    <ul>
      <li>Access to this service may be revoked at any time for any reason</li>
      <li>Access to this service is solely provided to test</li>
      <li>Your IP address, access time and activity on the test server may be recorded</li>
      <li>Any abuse of this service may lead to a ban or other applicable actions</li>
    </ul>
incus:
  client:
    certificate: |-
    key: |-
  project: default
  server:
    url: ""
    certificate: |-
  target: incus

instance:
 allocate:
   count: 4
   expiry: 21600
 source:
   instance: "self1" #nom de l'image créée
   type: "container" #ou "virtual-machine"
 profiles:
   - default #Profil Incus à utiliser
 limits:
   cpu: 1
   disk: 10GiB
   processes: 200
   memory: 512MiB
session:
 command: ["bash"]
 expiry: 900
 console_only: false
 network: ipv6
Appel
~/go/bin/incus-demo-server