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

Aggregator ansible #1387

Draft
wants to merge 9 commits into
base: 1344-ci-improve-servers-setup
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 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
78 changes: 78 additions & 0 deletions infra/ansible/playbooks/aggregator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
- name: Run setup playbook
ansible.builtin.import_playbook: setup.yaml
vars:
host: aggregator

- name: Run go playbook
ansible.builtin.import_playbook: go.yaml
vars:
host: aggregator

- name: Run rust playbook
ansible.builtin.import_playbook: rust.yaml
vars:
host: aggregator

- name: Run eigenlayer-cli playbook
ansible.builtin.import_playbook: eigenlayer-cli.yaml
vars:
host: aggregator

- hosts: aggregator
vars:
service: "aggregator"

tasks:
- name: Update apt and install required system packages
become: true
apt:
pkg:
- pkg-config
- libssl-dev
- gcc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gcc is already in setup

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Removing now.

state: latest
update_cache: true
vars:
ansible_ssh_user: "{{ admin_user }}"

- name: Create directories for each service if do not exist
file:
path: /home/{{ ansible_user }}/repos/{{ service }}
state: directory
mode: '0755'
owner: '{{ ansible_user }}'
group: '{{ ansible_user }}'
loop:
- aggregator

- name: Clone Aligned repository
git:
repo: https://github.com/yetanotherco/aligned_layer.git
dest: /home/{{ ansible_user }}/repos/{{ service }}/aligned_layer
version: v0.10.2
loop:
- aggregator

- name: Set permissions for cloned repository
file:
path: /home/{{ ansible_user }}/repos/{{ service }}/aligned_layer
mode: '0755'
owner: '{{ ansible_user }}'
group: '{{ ansible_user }}'
recurse: yes

- name: Compile all FFIs
make:
chdir: /home/{{ ansible_user }}/repos/aggregator/aligned_layer
target: build_all_ffi_linux
environment:
PATH: "{{ ansible_env.PATH }}:/usr/local/go/bin:/home/{{ ansible_user }}/.cargo/bin"

- name: Allow access to tcp port 8090
become: true
ufw:
rule: allow
port: 8090
proto: tcp
vars:
ansible_ssh_user: "{{ admin_user }}"
1 change: 0 additions & 1 deletion infra/ansible/playbooks/batcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
ecdsa_private_key_store_password: "{{ lookup('ini', 'ecdsa_private_key_store_password', file='ini/config-batcher.ini') }}"
batcher_replacement_private_key: "{{ lookup('ini', 'batcher_replacement_private_key', file='ini/config-batcher.ini') }}"


- name: Upload env file for batcher
template:
src: config-files/env-batcher.j2
Expand Down
7 changes: 3 additions & 4 deletions infra/ansible/stage_inventory.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
aggregator:
hosts:
aligned-holesky-aggregator-1:
ansible_host: aligned-ansible
ansible_user: admin
app_user: app
ansible_python_interpreter: /usr/bin/python3
ansible_host: aligned-holesky-stage-1
admin_user: admin
ansible_user: app
batcher:
hosts:
aligned-holesky-stage-1:
Expand Down