Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/logicalclocks/terraform-provider-hopsworksai
Hopsworks.ai Terraform provider
https://github.com/logicalclocks/terraform-provider-hopsworksai
aws azure hopsworks terraform terraform-provider
Last synced: 3 months ago
JSON representation
Hopsworks.ai Terraform provider
- Host: GitHub
- URL: https://github.com/logicalclocks/terraform-provider-hopsworksai
- Owner: logicalclocks
- License: mpl-2.0
- Created: 2021-03-02T08:49:07.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-05T05:41:29.000Z (8 months ago)
- Last Synced: 2024-06-19T05:53:06.558Z (8 months ago)
- Topics: aws, azure, hopsworks, terraform, terraform-provider
- Language: Go
- Homepage: https://registry.terraform.io/providers/logicalclocks/hopsworksai/latest
- Size: 890 KB
- Stars: 4
- Watchers: 7
- Forks: 9
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Terraform Provider for Hopsworks.ai
![Build and Unit Tests](https://github.com/logicalclocks/terraform-provider-hopsworksai/actions/workflows/unit-test.yml/badge.svg) [![Code Coverage](https://codecov.io/gh/logicalclocks/terraform-provider-hopsworksai/branch/main/graph/badge.svg)](https://codecov.io/gh/logicalclocks/terraform-provider-hopsworksai)
- Website: [managed.hopsworks.ai](https://managed.hopsworks.ai/)
- Community: [community.hopsworks.ai](https://community.hopsworks.ai/)The Terraform Hopsworks.ai provider is a plugin for Terraform that allows for creating and managing Hopsworks clusters on [Hopsworks.ai](http://managed.hopsworks.ai/)
## Example Usage
```hcl
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "4.16.0"
}
hopsworksai = {
source = "logicalclocks/hopsworksai"
}
}
}variable "region" {
type = string
default = "us-east-2"
}provider "aws" {
region = var.region
}provider "hopsworksai" {
# Highly recommended to use the HOPSWORKSAI_API_KEY environment variable instead
api_key = "YOUR HOPSWORKS API KEY"
}# Step 1: create the required aws resources, an ssh key, an s3 bucket, and an instance profile with the required hopsworks permissions
module "aws" {
source = "logicalclocks/helpers/hopsworksai//modules/aws"
region = var.region
version = "2.3.0"
}# Step 2: create a cluster with 1 worker
data "hopsworksai_instance_type" "head" {
cloud_provider = "AWS"
node_type = "head"
region = var.region
}data "hopsworksai_instance_type" "rondb_data" {
cloud_provider = "AWS"
node_type = "rondb_data"
region = var.region
}data "hopsworksai_instance_type" "smallest_worker" {
cloud_provider = "AWS"
node_type = "worker"
region = var.region
}resource "hopsworksai_cluster" "cluster" {
name = "tf-hopsworks-cluster"
ssh_key = module.aws.ssh_key_pair_namehead {
instance_type = data.hopsworksai_instance_type.head.id
}workers {
instance_type = data.hopsworksai_instance_type.smallest_worker.id
count = 1
}aws_attributes {
region = var.region
bucket {
name = module.aws.bucket_name
}
instance_profile_arn = module.aws.instance_profile_arn
}rondb {
single_node {
instance_type = data.hopsworksai_instance_type.rondb_data.id
}
}
open_ports {
ssh = true
}
}# Outputs the url of the newly created cluster
output "hopsworks_cluster_url" {
value = hopsworksai_cluster.cluster.url
}
```## Requirements
- [Terraform](https://www.terraform.io/downloads.html) >= 0.13.x
- [Go](https://golang.org/doc/install) >= 1.20
- [golangci-lint](https://golangci-lint.run/usage/install/) = 1.55.2## Quick Starts
- [Using the provider](https://registry.terraform.io/providers/logicalclocks/hopsworksai/latest/docs)
- [Provider development](DEVELOPMENT.md)