Skip to content

mount 100GB volume, update /usr/bin/java link #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ansible/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
- server_name _
- return 301 https://jenkins.stubbornjava.com$request_uri
roles:
- galaxy_roles/geerlingguy.java
- roles/common
- roles/java
- galaxy_roles/geerlingguy.jenkins
- galaxy_roles/jdauphant.nginx
# - galaxy_roles/gantsign.maven
Expand Down
8 changes: 8 additions & 0 deletions ansible/roles/java/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- include_role:
name: galaxy_roles/geerlingguy.java

- name: point to correct java version
alternatives:
name: java
link: /usr/bin/java
path: /usr/lib/jvm/java-1.8.0-openjdk.x86_64/bin/java
1 change: 1 addition & 0 deletions terraform/global.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ region = "us-east-1"

amis = {
amazon-linux-2017-09 = "ami-8c1be5f6"
amazon-linux-2017-09.1 = "ami-1853ac65"
}
35 changes: 32 additions & 3 deletions terraform/stubbornjava.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,31 @@ variable "amis" {

# TODO: import stubbornjava-webapp

resource "aws_volume_attachment" "ebs_jenkins" {
device_name = "/dev/sdh"
volume_id = "${aws_ebs_volume.jenkins.id}"
instance_id = "${aws_instance.ci.id}"

skip_destroy = true
}

resource "aws_ebs_volume" "jenkins" {
availability_zone = "us-east-1a"
size = 100
type = "gp2"

tags {
Name = "jenkins"
Path = "/var/lib/jenkins"
}
}

resource "aws_instance" "ci" {
count = 1
ami = "${var.amis["amazon-linux-2017-09"]}"
ami = "${var.amis["amazon-linux-2017-09.1"]}"
disable_api_termination = true
iam_instance_profile = "jenkins"
instance_type = "t2.micro"
instance_type = "t2.medium"
monitoring = false
subnet_id = "${element(data.aws_subnet_ids.public.ids, count.index)}"
key_name = "stubbornjava"
Expand All @@ -28,7 +47,17 @@ resource "aws_instance" "ci" {

root_block_device {
volume_type = "gp2"
volume_size = 20
volume_size = 10
delete_on_termination = true
}

user_data = <<USER_DATA
#cloud-config
bootcmd:
- [ cloud-init-per, once, mymkfs, mkfs.ext4, /dev/xvdh ]
- [ cloud-init-per, once, createjenkinsdir, mkdir, /var/lib/jenkins ]

mounts:
- [ /dev/xvdh, /var/lib/jenkins, "ext4", "defaults,noatime", "0", "0" ]
USER_DATA
}
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy