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

De Le Labo de Yorzian
Aller à la navigation Aller à la recherche
Aucun résumé des modifications
Ligne 75 : Ligne 75 :
   target: incus
   target: incus
   
   
instance:
instance:
   allocate:
   allocate:
     count: 4
     count: 4
Ligne 81 : Ligne 81 :


   source:
   source:
#    instance: "try-it"
#    image: "gameshell/dev"
#    image: "debtest"
#
     instance: "self1"
     instance: "self1"
#    type: "virtual-machine"
     type: "container"
     type: "container"


Ligne 98 : Ligne 93 :
     memory: 512MiB
     memory: 512MiB


session:
session:
#  command: ["su","-","gs"]
   command: ["bash"]
   command: ["bash"]
   expiry: 900
   expiry: 900

Version du 6 février 2025 à 14:27

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:
    total: 64
    ip: 10

  maintenance:
    enabled: false
    message: Custom downtime message

  proxy:
    address: ""
    certificate: |-

    key: |-
      PEM

  statistics:
    keys:
      - 69280011-c8a5-4ef9-ae3d-e7caf4d06e06

  terms: |-
    By using the GameShell experiment server, you agree that:<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"
   type: "container"
 profiles:
   - default
 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