Skip to content

Commit

Permalink
fix: expose port 3000 and change total size calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
utibeabasi6 committed Mar 2, 2024
1 parent 820c3b0 commit 1a47bd7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ansible/playbook.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
- hosts: all
become: true
tasks:
- name: Download the go binary
- name: Download the ebs-playground binary
ansible.builtin.shell: |
wget https://github.com/utibeabasi6/ebs-playground/releases/download/v1.0.0/ebs-playground_Linux_x86_64.tar.gz
wget https://github.com/utibeabasi6/ebs-playground/releases/download/v2.0.0/ebs-playground_Linux_x86_64.tar.gz
tar -xvzf ebs-playground_Linux_x86_64.tar.gz ebs-playground
chmod +x ebs-playground
args:
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func fetchDiskSpace() ([]EbsDevice, error) {
percent := fmt.Sprintf("%2.f%%", s.UsedPercent)
dvc := EbsDevice{
MountPath: device,
Size: human.Bytes(s.Total),
Size: human.Bytes(s.Used + s.Free),
Used: human.Bytes(s.Used),
Available: human.Bytes(s.Free),
UsePercent: percent,
Expand Down
8 changes: 8 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ resource "aws_vpc_security_group_ingress_rule" "allow_ssh" {
to_port = 22
}

resource "aws_vpc_security_group_ingress_rule" "allow_port_3000" {
security_group_id = aws_security_group.main.id
cidr_ipv4 = "0.0.0.0/0"
from_port = 3000
ip_protocol = "tcp"
to_port = 3000
}

resource "aws_vpc_security_group_egress_rule" "allow_all" {
security_group_id = aws_security_group.main.id
cidr_ipv4 = "0.0.0.0/0"
Expand Down

0 comments on commit 1a47bd7

Please sign in to comment.