Skip to content

Commit

Permalink
ansible update [WIP]
Browse files Browse the repository at this point in the history
  • Loading branch information
Limmen committed Feb 12, 2025
1 parent a5b9fd6 commit c2e229e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 5 deletions.
9 changes: 9 additions & 0 deletions ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ After registering the variable, add it to the debug group.
var: git_installation
```

## Tests
The following table details the last time ansible was tested and worked correctly for different setups.

| Setup | Last date tested |
|------------------------------|------------------|
| Single server, Ubuntu 22.04. | 2025-02-12 ✔ |
| Two servers, Ubuntu 20.04. | 2024-04-23 ✔ |


## Author & Maintainer

Kim Hammar <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions ansible/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ inventory = inventory
private_key_file = ~/.ssh/id_rsa
allow_world_readable_tmpfiles=true
remote_user = kim
command_warnings = False
8 changes: 4 additions & 4 deletions ansible/group_vars/all/variables.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
user: "kim"
csle_git_repo_url: "https://github.com/Limmen/csle"
leader_ip: "34.142.42.219"
leader_public_ip: "34.142.42.219"
leader_ip: "34.70.84.19"
leader_public_ip: "34.70.84.19"
nginx_content_name: "nginx_configuration_content.txt"
web_port: 7777
postgres_version: "15"
Expand Down Expand Up @@ -57,15 +57,15 @@ csle_config:
postgresql_log_dir: "/var/log/postgresql/"
nginx_log_dir: "/var/log/nginx/"
default_log_dir: "/tmp/csle/"
metastore_ip: "34.142.42.219"
metastore_ip: "34.70.84.19"
metastore_user: "csle"
metastore_password: "csle"
metastore_database_name: "csle"
localhost: false
version: "0.8.0"
cluster_config:
cluster_nodes:
- ip: "34.88.71.96"
- ip: "34.70.84.19"
leader: true
cpus: 2
gpus: 0
Expand Down
4 changes: 4 additions & 0 deletions ansible/install_metastore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
register: postgresql_installed
ignore_errors: true
no_log: true
failed_when: false

- name: Download PostgreSQL
ansible.builtin.get_url:
Expand Down Expand Up @@ -131,6 +132,7 @@
query: "CREATE DATABASE csle"
ignore_errors: true
no_log: true
failed_when: false

- name: Setup database privileges
become: yes
Expand All @@ -143,6 +145,7 @@
path: /var/lib/postgresql/create_db.sql
ignore_errors: true
no_log: true
failed_when: false

- name: Add citus extension
become: yes
Expand All @@ -156,6 +159,7 @@
version: latest
ignore_errors: true
no_log: true
failed_when: false

- name: Change mode and ownership of the /var/log/postgresql
file:
Expand Down
1 change: 1 addition & 0 deletions ansible/install_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
register: anaconda_installed
ignore_errors: true
no_log: true
failed_when: false

- name: Download Anaconda
ansible.builtin.get_url:
Expand Down
1 change: 1 addition & 0 deletions ansible/install_simulation_system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
args:
executable: /bin/bash
ignore_errors: true
no_log: true
when: not python_libraries_installed

- name: Modify constants.py file
Expand Down
2 changes: 1 addition & 1 deletion ansible/inventory
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[leader]
34.88.71.96
34.70.84.19

[worker]

0 comments on commit c2e229e

Please sign in to comment.