Skip to content

Terraform plans for deploying Charmed HPC on your favorite clouds ๐Ÿ—บ๏ธ๐ŸŒ‹โ˜๏ธ

License

Notifications You must be signed in to change notification settings

dsloanm/charmed-hpc-terraform

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Charmed HPC Terraform

Terraform modules for deploying components of a Charmed HPC cluster.

The modules directory contains modules that make use of the Juju Terraform Provider to interact with a previously bootstrapped Juju controller.

Furthermore, the examples directory offers example deployments that can be copy-pasted to kickstart your own deployments.

โœจ Getting started

A Juju 3.x controller bootstrapped on your choice of cloud is required. Steps for deploying:

# Prerequisites
juju bootstrap <cloud name> <controller name>
sudo snap install --classic opentofu

Then, create a Terraform plan to deploy the core components:

terraform {
  required_providers {
    juju = {
      source  = "juju/juju"
      version = ">= 0.16.0"
    }
  }
}

provider "juju" {}

resource "juju_model" "charmed-hpc" {
  name = "charmed-hpc"
}

## MySQL - provides backing database for the accounting node.
module "mysql" {
  source = "git::https://github.com/canonical/mysql-operator//terraform"

  juju_model_name = juju_model.charmed-hpc.name
  app_name        = "mysql"
  channel         = "8.0/stable"
  units           = 1
}

module "slurm" {
  source = "git::https://github.com/charmed-hpc/charmed-hpc-terraform//modules/slurm"

  model_name = juju_model.charmed-hpc.name
  database_backend = {
    name     = module.mysql.application_name,
    endpoint = module.mysql.provides.database
  }

  # Optional settings for the controller node.
  controller = {
    app_name = "slurmctld"
  }

  # Optional settings for the database node.
  database = {
    app_name = "slurmdbd"
  }

  # Optional settings for the REST API node.
  rest_api = {
    app_name = "slurmrestd"
  }

  # Optional settings for the kiosk node.
  kiosk = {
    app_name = "sackd",
    units    = 1,
  }

  # Compute partitions to be deployed.
  compute_partitions = {
    "default" : {
      units = 1,
    },
    "gpu" : {
      units = 1,
    }
  }
  depends_on = [
    juju_model.charmed-hpc
  ]
}

Finally, plan and deploy!

tofu init
tofu plan
tofu apply -auto-approve

๐Ÿค” What's next?

To learn more about the deployment and use of a Charmed HPC cluster, the following resources are available:

๐Ÿ› ๏ธ Development

A useful command to help while hacking on the plans is:

just check  # Checks file formatting and syntax are valid.

If you're interested in contributing, take a look at our contributing guidelines.

๐Ÿค Project and community

The Charmed HPC Terraform plans are a project of the Ubuntu High-Performance Computing community. Interested in contributing bug fixes, patches, documentation, or feedback? Want to join the Ubuntu HPC community? Youโ€™ve come to the right place!

Hereโ€™s some links to help you get started with joining the community:

๐Ÿ“‹ License

The Charmed HPC Terraform plans are free software, distributed under the Apache Software License, version 2.0. See the Apache-2.0 LICENSE file for further details.

About

Terraform plans for deploying Charmed HPC on your favorite clouds ๐Ÿ—บ๏ธ๐ŸŒ‹โ˜๏ธ

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 90.2%
  • Just 9.8%