Skip to content

Terraform provider plugin for OAR jobs submission and Kadeploy bare-metal deployments on Grid'5000

License

Notifications You must be signed in to change notification settings

pmorillon/terraform-provider-grid5000

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform provider for Grid5000

Requirements

Installation

Terraform >= 0.13.x

Add this into your Terraform configuration, then run terraform init :

terraform {
  required_providers {
    grid5000 = {
      source = "pmorillon/grid5000"
      version = "0.0.8"
    }
  }
}

Terraform = 0.12.x

Downloadable packages are available at Grid5000 provider releases.

How to install:

  • Get binary for your platform.
  • Place provider binary (into the archive) on your terraform plugin directory :
Directory Purpose
. In case the provider is only used in a single Terraform project.
~/.terraform.d/plugins The user plugins directory.

Usage

  • Provider configuration for External usage :
provider "grid5000" {
  # Basic Auth
  username = "john"
  password = "xxx"
}

Or :

provider "grid5000" {
  # Uses Restfully credentials
  restfully_file = "/home/user/.restfully/api.grid5000.fr.yml"
}
  • OAR job
resource "grid5000_job" "my_job" {
  name      = "terraform"
  site      = "rennes"
  command   = "sleep 1h"
  resources = "/nodes=2"
  types     = ["deploy"]
}
  • Kadeploy deployment
resource "grid5000_deployment" "my_deployment" {
  site        = "rennes"
  environment = "debian10-x64-base"
  nodes       = grid5000_job.my_job.assigned_nodes
  key         = file("~/.ssh/id_rsa.pub")
}

About

Terraform provider plugin for OAR jobs submission and Kadeploy bare-metal deployments on Grid'5000

Resources

License

Stars

Watchers

Forks