Skip to content

Commit

Permalink
Reorganizing repository to adapt it for Terraform Module Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
jnonino committed Jan 28, 2019
1 parent add3314 commit bb1183a
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 21 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Jenkins Terraform Module #
# Jenkins Terraform Module for AWS#

This Terraform module deploys a Jenkins Master Server providing high availability and scalability.

## Amazon Web Services

### Usage
## Usage

module "jenkins" {
source = "github.com/jnonino/jenkins-terraform-module//aws?ref=1.0.0"
source = "jnonino/jenkins/aws"

name_preffix = "${var.name_preffix}"
profile = "${var.profile}"
region = "${var.region}"
Expand All @@ -16,6 +15,10 @@ This Terraform module deploys a Jenkins Master Server providing high availabilit
private_subnets_ids = [ "${module.networking.private_subnets_ids}" ]
}

### Output values
## Output values

* variable: description.
* jenkins_master_alb_id: Jenkins Master Application Load Balancer ID.
* jenkins_master_alb_arn: Jenkins Master Application Load Balancer ARN.
* jenkins_master_alb_arn_suffix: Jenkins Master Application Load Balancer ARN Suffix.
* jenkins_master_alb_dns_name: Jenkins Master Application Load Balancer DNS Name.
* jenkins_master_alb_zone_id: Jenkins Master Application Load Balancer Zone ID.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 0 additions & 12 deletions aws/jenkins-master.tf → jenkins-master.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
# ---------------------------------------------------------------------------------------------------------------------
# Variables
# ---------------------------------------------------------------------------------------------------------------------
locals {
jenkins_master_container_name = "jenkins_master"
jenkins_master_cloudwatch_log_path = "/ecs/service/${var.name_preffix}-jenkins-master"
jenkins_container_web_port = 8080
jenkins_container_slave_port = 50000
jenkins_fargate_cpu_value = 2048 # 2 vCPU - https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html#fargate-task-defs
jenkins_fargate_memory_value = 4096 # 4 GB - https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html#fargate-task-defs
}

# ---------------------------------------------------------------------------------------------------------------------
# AWS Cloudwatch
# ---------------------------------------------------------------------------------------------------------------------
Expand Down
11 changes: 11 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ---------------------------------------------------------------------------------------------------------------------
# Variables
# ---------------------------------------------------------------------------------------------------------------------
locals {
jenkins_master_container_name = "jenkins_master"
jenkins_master_cloudwatch_log_path = "/ecs/service/${var.name_preffix}-jenkins-master"
jenkins_container_web_port = 8080
jenkins_container_slave_port = 50000
jenkins_fargate_cpu_value = 2048 # 2 vCPU - https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html#fargate-task-defs
jenkins_fargate_memory_value = 4096 # 4 GB - https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html#fargate-task-defs
}
5 changes: 5 additions & 0 deletions aws/outputs.tf → outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
# Jenkins Master ALB DNS
# ---------------------------------------------------------------------------------------------------------------------
output "jenkins_master_alb_id" {
description = "Jenkins Master Application Load Balancer ID"
value = "${aws_alb.jenkins_master_alb.id}"
}
output "jenkins_master_alb_arn" {
description = "Jenkins Master Application Load Balancer ARN"
value = "${aws_alb.jenkins_master_alb.arn}"
}
output "jenkins_master_alb_arn_suffix" {
description = "Jenkins Master Application Load Balancer ARN Suffix"
value = "${aws_alb.jenkins_master_alb.arn_suffix}"
}
output "jenkins_master_alb_dns_name" {
description = "Jenkins Master Application Load Balancer DNS Name"
value = "${aws_alb.jenkins_master_alb.dns_name}"
}
output "jenkins_master_alb_zone_id" {
description = "Jenkins Master Application Load Balancer Zone ID"
value = "${aws_alb.jenkins_master_alb.zone_id}"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions aws/variables.tf → variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ variable "vpc_id" {
description = "ID of the VPC"
}
variable "public_subnets_ids" {
type = "list"
description = "List of Public Subnets IDs"
type = "list"
}
variable "private_subnets_ids" {
type = "list"
description = "List of Private Subnets IDs"
type = "list"
}

0 comments on commit bb1183a

Please sign in to comment.