-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
143 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
user: "shahab" | ||
csle_git_repo_url: "https://github.com/Limmen/csle" | ||
leader_ip: "172.31.212.83" | ||
nginx_content_name: "nginx_configuration_content.txt" | ||
web_port: 7777 | ||
postgres_version: "15" | ||
postgres_citus_version: "postgresql-15-citus-11.2" | ||
postgresql_url: "https://install.citusdata.com/community/deb.sh" | ||
anaconda_url: "https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh" | ||
anaconda_install_script: "Anaconda3-2022.10-Linux-x86_64.sh" | ||
conda_environment_name: "base" | ||
python_version: "3.9" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
|
||
- hosts: all | ||
become: true | ||
|
||
tasks: | ||
|
||
- name: Installation setup | ||
ansible.builtin.import_playbook: install_setup.yaml | ||
|
||
- name: Install metastore | ||
ansible.builtin.import_playbook: install_metastore.yaml | ||
|
||
- name: Install simulation system | ||
ansible.builtin.import_playbook: install_simulation_system.yaml | ||
|
||
- name: Install emulation system | ||
ansible.builtin.import_playbook: install_emulation_system.yaml | ||
|
||
- name: Install management system | ||
ansible.builtin.import_playbook: install_management_system.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
|
||
- hosts: all | ||
become: true | ||
|
||
tasks: | ||
|
||
- name: List all Conda environments | ||
shell: "/home/{{ user }}/anaconda3/bin/conda env list" | ||
register: conda_env_list | ||
changed_when: false | ||
|
||
- name: Check if the conda environment exists | ||
set_fact: | ||
conda_env_exists: "{{ '{{ conda_environment_name }}' in conda_env_list.stdout }}" | ||
|
||
- name: Create and activate the conda environment if it does not exist | ||
shell: | | ||
"/home/{{ user }}/anaconda3/bin/conda create -y -n {{ conda_environment_name }} python={{ python_version }}" && \ | ||
source "/home/{{ user }}/anaconda3/bin/activate {{ conda_environment_name }}" && \ | ||
"/home/{{ user }}/anaconda3/bin/conda" install -y pip | ||
args: | ||
executable: /bin/bash | ||
when: not conda_env_exists | ||
|
||
- name: Add execute permissions on Python install script | ||
file: | ||
path: "/home/{{ user }}/csle/simulation-system/libs/local_install.sh" | ||
mode: +rwx | ||
recurse: yes | ||
|
||
- name: Add execute permissions on Python dev-install script | ||
file: | ||
path: "/home/{{ user }}/csle/simulation-system/libs/local_install_dev.sh" | ||
mode: +rwx | ||
recurse: yes | ||
|
||
- name: Activate the environment if it exist and install CSLE Python libraries | ||
shell: | | ||
source "/home/{{ user }}/anaconda3/bin/activate {{ conda_environment_name }}" && \ | ||
cd "/home/{{ user }}/csle/simulation-system/libs" && \ | ||
./local_install.sh && \ | ||
./local_install_dev.sh | ||
- name: Install CSLE simulation environments on the leader node | ||
shell: | | ||
source "/home/{{ user }}/anaconda3/bin/activate {{ conda_environment_name }}" && \ | ||
cd "/home/{{ user }}/csle/simulation-system/envs" && \ | ||
make install | ||
args: | ||
executable: /bin/bash |
Oops, something went wrong.