Skip to content

Commit

Permalink
ci: aggregator ansible.
Browse files Browse the repository at this point in the history
  • Loading branch information
samoht9277 committed Nov 6, 2024
1 parent 4722a45 commit 58148db
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 65 deletions.
61 changes: 0 additions & 61 deletions infra/ansible/aggregator.yaml

This file was deleted.

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
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
6 changes: 3 additions & 3 deletions infra/ansible/stage_inventory.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
aggregator:
hosts:
aligned-holesky-aggregator-1:
ansible_host: aligned-ansible
ansible_user: admin
app_user: app
ansible_host: aligned-holesky-stage-1
admin_user: admin
ansible_user: app
ansible_python_interpreter: /usr/bin/python3
batcher:
hosts:
Expand Down

0 comments on commit 58148db

Please sign in to comment.