Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
v0.2 version of this repository, moving the code from TELC private re…
Browse files Browse the repository at this point in the history
…pository
  • Loading branch information
Ramón committed Jul 30, 2020
1 parent 1223666 commit 88bd5b4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ In this Ansible project, there are some configuration files that must be complet

* **hosts:** here, you have to include the RC server which will be configured within this Ansible project. The format of each line (PLEASE FOLLOW THIS FORMAT) should be the following: *rc_hostname ansible_host=<RC_IP> ansible_user=<USER> ansible_ssh_pass=<SSH_PASS> ansible_become_pass=<SUDO_PASS>*
* **group_vars:** includes useful variables for the servers defined in the *hosts* file.
* **all:** applies to all servers. Nothing to change here at the beginning. Only if you want to be stopped with each Ansible role execution, set *prompt_when_finishes_tasks* to true, or false otherwise. Other variables that may require a change are *eve_db_password*, setting the password to be used for the eve user in the DB, *update_module*, which specifies if it is an update (true) or an installation from scratch (false), and *turin_installation*, setting it to true if the installation will be in Turin IWL facility.
* **all:** applies to all servers. Nothing to change here at the beginning. Only if you want to be stopped with each Ansible role execution, set *prompt_when_finishes_tasks* to true, or false otherwise. Other variables that may require a change are *eve_db_password*, setting the password to be used for the eve user in the DB, *update_module*, which specifies if it is an update (true) or an installation from scratch (false), *turin_installation*, setting it to true if the installation will be in Turin IWL facility, and *inventory_ip_address* is the IP address for the IWF Repository.

### 5. Download 5geve-rc repository from Github

Expand Down Expand Up @@ -76,7 +76,7 @@ $ git checkout dev # if exists - if not, use master branch or whatever
In case the RC is going to be installed in Turin IWL facility, you need to modify, in /tmp/rc/src/main/resources/application.properties, the following variables:

* **spring.datasource.password:** set the value included in *eve_db_password* in **group_vars/all** Ansible file.
* **ansible.user:** set the value included in *ansible_user* in **hosts** Ansible file.
* **inventory.ip.address:** set the value included in *inventory_ip_address* in **group_vars/all** Ansible file.

Then, build the project with Maven (so you need Maven installed in your server)

Expand Down
1 change: 1 addition & 0 deletions group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ prompt_when_finishes_tasks: true
eve_db_password: changeme
update_module: true
turin_installation: false
inventory_ip_address: 127.0.0.1
13 changes: 5 additions & 8 deletions roles/preparation/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,20 @@
src: rc.tar.gz
dest: /tmp

- name: Create $HOME/5g-eve/github directory
- name: Remove 5g-eve directory if exists
file:
path: /home/{{ansible_user}}/5g-eve/github
state: directory
owner: "{{ansible_user}}"
group: "{{ansible_user}}"
mode: 0755
path: /home/{{ansible_user}}/5g-eve
state: absent

- name: Remove 5geve-rc directory if exists
file:
path: /home/{{ansible_user}}/5g-eve/github/5geve-rc
path: /usr/bin/rc/5geve-rc
state: absent

- name: Extract 5geve-rc module
unarchive:
src: 5geve-rc.tar.gz
dest: /home/{{ansible_user}}/5g-eve/github
dest: /usr/bin/rc

- name: Installation of required packages
apt:
Expand Down
6 changes: 3 additions & 3 deletions roles/rc_service/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
line: "spring.datasource.password={{eve_db_password}}"
when: not turin_installation

- name: Change ansible.user parameter in application.properties file
- name: Change inventory.ip.address parameter in application.properties file
lineinfile:
path: /tmp/rc/src/main/resources/application.properties
regexp: '^ansible.user.*'
line: "ansible.user={{ansible_user}}"
regexp: '^inventory.ip.address.*'
line: "inventory.ip.address={{inventory_ip_address}}"
when: not turin_installation

- name: Build rc project
Expand Down

0 comments on commit 88bd5b4

Please sign in to comment.