Skip to content

Repository files navigation

🔗 Ligoj Provisioning plugin Maven Central

CoverageQuality GateCodacy BadgeCodeFactorMaintainabilityLicense

Ligoj Provisioning plugin Provides the following features :

  • Find the best instance from the given requirement : CPU, RAM, OS and price type
  • Compute the total cost of storage and compute for a set of VM

Supported requirements

NameNote
TermA contract, defining the constraints: reservation, conversion options and sometimes a location
LocationA geographical place (variable GPS coordinates precision). May be a country, or sometimes a city
ProcessorThe underlying physical processor. The vendor can be used instead of the full product code.
ArchitectureThe underlying physical processor architecture, such as x86 or ARM.
PhysicalA boolean constraint to expect a physical (bar metal) instance instead of a virtual one
TenancyShared or dedicated, to handle the noisy neighborhood issue
OSOperating system. Currently, only the type name is supported: Windows, Linux, RHEL,...
SoftwareThe pre-installed software
EngineDatabase engine name. Can be MySQL, Oracle, .. or even custom one like Aurora. Depends on the availability in the catalog.
EditionDatabase edition valid for a specific engine. For sample: Oracle Standard Edition 1
LicenseBYOL or included mode. Depends on the availability in the catalog.
OptimizedStorage expected optimization: durability, IOPS, throughput
CPU/RAMExpected vCPU/RAM(MiB) to match. Note that some providers support custom (elastic) settings for these values. Ligoj handles this.
EphemeralA boolean to accept a shutdown of a instance. Would be plugged to Spot/Batch like services
UsageUtilization profile including up-time, commitment, conversion, reservation and forecasted start.
SizeStorage size in GiB. The required value is checked against provider limits.
LatencyIO latency access rating from WORST to BEST
OptimizedOptimization profile: durability, throughput and IOPS
Generation(p1TypeOnly) Instead of searching a cheapest instance, find the cheapest instances among the last generations SKUs

Covered requirements per resource

ResourceCriteria
InstanceTenancy, processor, physical (metal), architecture, ephemeral, %usage, location, term, cpu, ram, OS, software, p1TypeOnly
DatabaseTenancy, processor, physical (metal), architecture, ephemeral, %usage, location, term, cpu, ram, engine, edition, p1TypeOnly
StorageLocation, size, latency, location, optimization
SupportPhone, mail, chat, API, seats

Covered service per provider

ProviderPluginCovered services
AWSplugin-prov-awsEC2 (Savings Plan, RI, Spot), RDS, S3 (Glacier, IA,...), EFS, Support, EBS,
Azureplugin-prov-azureVM, Database, Disk (object, file, block),
Digital Oceanplugin-prov-digitaloceanVM, Database, Disk
OVHplugin-prov-ovhVM, Database, Disk
OutScaleplugin-prov-outscaleVM, Database, Disk

Related plugins:

Custom configuration: service:prov:use-parallel = 0/1

Catalog import and the database

Provider catalog imports that opt in (currently plugin-prov-azure) run inside a single database transaction: prices are accumulated in the JPA persistence context, flushed and cleared by chunks of 1000 prices, and written with a session-scoped JDBC batch size of 100 (AbstractImportCatalogResource: initJdbcBatch(), flushChunk(), flushAndClear()). No global Hibernate configuration is required. On failure, the whole import rolls back and the previous catalog is preserved.

Database recommendations for large imports (millions of prices):

  • idle_in_transaction_session_timeout (PostgreSQL) must be 0 (no limit, the default) or comfortably above a few minutes: the import transaction sits idle while the provider catalog files (tens of MB) are downloaded and parsed. The ligoj-cli managed ligoj-db pod pins -c idle_in_transaction_session_timeout=0 explicitly since 2026-07, so a base-image or ALTER SYSTEM change cannot silently kill a running import.
  • Add reWriteBatchedInserts=true to the PostgreSQL JDBC URL (jdbc.url) so the JDBC batches are rewritten as multi-row INSERT statements.

About

Ligoj plugin for provisioning : design and execution with Terraform

Topics

Resources

Stars

9 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages