ajoute la liaison Laravel-OpenStack et le modèle Heat du lab 08
Un gabarit Heat généré depuis chaque lab.yaml, une stack par session de lab (création à l'admission, suppression à l'expiration via des jobs Redis et un worker systemd dédié). Passage du compte de service à une authentification par mot de passe : Heat refuse de créer un trust à partir d'un jeton d'application credential (voir ADR 0002). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
8742bde807
commit
67a754f733
34 changed files with 1095 additions and 91 deletions
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('lab_sessions', function (Blueprint $table) {
|
||||
$table->renameColumn('stack_id', 'heat_stack_id');
|
||||
$table->string('heat_stack_name')->nullable()->after('heat_stack_id');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('lab_sessions', function (Blueprint $table) {
|
||||
$table->dropColumn('heat_stack_name');
|
||||
$table->renameColumn('heat_stack_id', 'stack_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('lab_session_machines', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('lab_session_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('nom')->comment('ex: pc-a, routeur, pc-b — voir lab.yaml');
|
||||
$table->string('instance_id')->comment('id de la VM Nova, sortie de la stack Heat');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('lab_session_machines');
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue