Skip to content
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

Update smartnode-install to v1.7.0 #34

Merged
merged 1 commit into from
Nov 4, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/ansible-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ jobs:

- name: Run playbook
id: ansible-playbook
run: ansible-playbook site.yml -e "POOL=mainnet-00" --skip-tags 'skipci' -vvv
run: ansible-playbook site.yml -e "POOL=mainnet-00" --skip-tags 'skipci'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Automation to deploy/manage a Rocketpool Ethereum staking pool node

### Why?
You may be asking why does this repo exist? Rocketpool already has a fantastic install guide, docker containers, docker-compose setup, etc.
You may be asking why does this repo exist? Rocketpool already has a fantastic install guide, docker containers, etc.
The reasons someone might want to use this repo are:
* Production level deployment (Things like uptime, self-healing, monitoring, notifications for monitoring, and repeatability)
* You do not want to put the effort in to doing it manually.
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/base/tasks/firewall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
when: node.ufw.enabled | default(True)

- name: Base-Firewall | Add fail2ban sshd configuration
ini_file:
community.general.ini_file:
path: /etc/fail2ban/jail.d/ssh.conf
section: "sshd"
option: "{{ ssh_config.option }}"
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/base/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
- name: Main | Include preflight tasks
include_tasks: preflight.yml
ansible.builtin.include_tasks: preflight.yml

- name: Main | Include system tasks
include_tasks: system.yml
ansible.builtin.include_tasks: system.yml

- name: Main | Include Firewall tasks
include_tasks:
ansible.builtin.include_tasks:
file: firewall.yml
apply:
tags:
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/base/tasks/system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
tags: ['skipci']

- name: System | Secure shared memory
ansible.builtin.mount:
ansible.posix.mount:
src: none
path: /run/shm
fstype: tmpfs
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/rocketpool/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- rocketpool_arch is not defined or rocketpool_version is not defined
tags: ['always']

- name: "Rocketpool Main | Download rocketpool binary '{{ rocketpool_version }}'"
- name: "Rocketpool Main | Download rocketpool binary {{ rocketpool_version }}"
ansible.builtin.get_url:
url: "https://github.com/rocket-pool/smartnode-install/releases/download/{{ rocketpool_version }}/rocketpool-cli-linux-{{ rocketpool_arch }}"
dest: '/usr/local/bin/rocketpool'
Expand All @@ -20,7 +20,7 @@
group: 'root'

- name: Main | Include rocketpool install tasks
include_tasks: install.yml
ansible.builtin.include_tasks: install.yml

- name: Main | Include rocketpool post install tasks
include_tasks: post_install.yml
ansible.builtin.include_tasks: post_install.yml
7 changes: 5 additions & 2 deletions ansible/setup-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@
name: geerlingguy.docker
vars:
docker_apt_arch: "{{ rocketpool_arch }}"
docker_compose_arch: "{{ ansible_architecture }}"
docker_compose_version: "v{{ node.docker.compose.version | default(node.docker.compose.version) }}"
docker_users: "{{ node.docker.users | default(node.docker.users) | default(['rp']) }}"
docker_daemon_options: "{{ node.docker.daemon_options }}"

- name: Playbook | Install docker-compose-plugin
ansible.builtin.package:
state: present
name: docker-compose-plugin
31 changes: 17 additions & 14 deletions terraform/bootstrap/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
167 changes: 96 additions & 71 deletions terraform/rocketpool/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 5 additions & 19 deletions terraform/rocketpool/bundle.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,25 @@ locals {
"${path.module}/../../vars",
"${path.module}/../../requirements.txt"
]
}

# Template local-update.sh file
data "template_file" "local_update" {
template = file("${path.module}/templates/local-update.sh.tpl")
vars = {
bundle_vars = {
rocketpool_pool = local.pool
region = local.aws_vars.region
}
}

resource "local_file" "local_update" {
content = data.template_file.local_update.rendered
content = templatefile("${path.module}/templates/local-update.sh.tpl", local.bundle_vars)
filename = "${path.module}/../../ansible/local-update.sh"
}

# Generate script which will create tarball for upload
data "template_file" "tar_sh" {
template = <<EOF
#!/bin/bash
tar $* %1>/dev/null %2>/dev/null
echo '{"result":"success"}'
EOF
}

resource "local_file" "tar_sh" {
filename = "${path.module}/../scripts/tar.sh"
content = data.template_file.tar_sh.rendered
filename = "${path.module}/../scripts/tar.sh"
content_base64 = "IyEvYmluL2Jhc2gKdGFyICQqICUxPi9kZXYvbnVsbCAlMj4vZGV2L251bGwKZWNobyAneyJyZXN1bHQiOiJzdWNjZXNzIn0nCg=="
}

data "external" "tar_sh" {
program = [local_file.tar_sh.filename, "-cvzf", "${path.module}/ansible-${local.rp_vars.rocketpool.version}.tar.gz", join(" ", local.bundle_files)]
depends_on = [data.template_file.tar_sh, local_file.local_update]
depends_on = [local_file.local_update]
}

resource "aws_s3_object" "ansible_tar_gz" {
Expand Down
2 changes: 1 addition & 1 deletion terraform/rocketpool/cloudwatch.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "cloudwatch_metric_alarms" {
source = "terraform-aws-modules/cloudwatch/aws//modules/metric-alarm"
version = "3.3.0"
version = "4.0.0"

for_each = {
for key, val in try(local.aws_vars.cloudwatch, {}) :
Expand Down
Loading