jagrosh / jagrosh/MusicBot

[Wiki] Add Terraform setup in docs

Open
#976 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

wiki
Dominant language
Java
Stars
5.8k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.

It would be nice if there was a example to use the terraform in the documentation.

What is your ideal solution to the problem?

This is an example of the aws provider.

Please put appropriate values in the 'region' , 'profile.' and 'ami'

# main.tf
provider "aws" {
  region  = "ap-northeast-2"
  profile = "jmusic-bot"
}

resource "aws_instance" "JMusicBot" {
  ami                    = "ami-0ba5cd124d7a79612"
  instance_type          = "t2.micro"
  vpc_security_group_ids = [aws_security_group.public.id]
  user_data              = <<-EOF
	#!/bin/bash
  sudo apt-get -y update
  sudo apt-get -y install openjdk-8-jdk
  wget https://github.com/jagrosh/MusicBot/releases/download/0.3.6/JMusicBot-0.3.6.jar
  { echo "${var.token}"; echo "${var.owner}"; } | java -Dnogui=true -jar JMusicBot-0.3.6.jar
	EOF
  tags = {
    Name = "JMusicBot"
  }
}

resource "aws_security_group" "public" {
  name = "public"

  egress {
    from_port   = 0
    to_port     = 0
    protocol    = "-1"
    cidr_blocks = ["0.0.0.0/0"]
  }
}

# vars.tf
variable "token" {
  description = "The token for the bot to log in with"
}

variable "owner" {
  description = "The owner of the bot"
}

How would this feature be used?
  1. It is useful for people who want to use JMusicBot using the cloud.
  2. You can use JMusicBot with a single command.
Additional Info

content is also here.

Checklist

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing documentation at jmusicbot.com and review the referenced JMusicBot-Terraform content, especially the main.tf and vars.tf examples. Add an AWS Terraform setup showing the required region, profile, AMI, token, and owner values, then verify that the example is published and usable by someone deploying JMusicBot in the cloud.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, terraform
Domain
cloud, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.