Skip to content

Commit

Permalink
deliverable 2.1.7-devel
Browse files Browse the repository at this point in the history
  • Loading branch information
frsauvage committed May 20, 2021
1 parent 571a9bd commit da8bea6
Show file tree
Hide file tree
Showing 29 changed files with 611 additions and 105 deletions.
4 changes: 1 addition & 3 deletions Dockerfiles/Dockerfile-awx_task
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ ARG TAG_AWX=9.0.1
ARG MISM_BULLSEQUANA_EDGE_VERSION

FROM $REGISTRY/$BASE_IMAGE_AWX_TASK:$TAG_AWX
#set base image
#FROM ansible/awx_task:9.0.1

USER root

ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.6
ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.7-devel

COPY ansible.credentials.py /etc/tower/conf.d/credentials.py
COPY ansible.env /etc/tower/conf.d/environment.sh
Expand Down
5 changes: 1 addition & 4 deletions Dockerfiles/Dockerfile-awx_web
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ ARG MISM_BULLSEQUANA_EDGE_VERSION

FROM $REGISTRY/$BASE_IMAGE_AWX_WEB:$TAG_AWX

#set base image
#FROM ansible/awx_web:9.0.1

USER root

ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.6
ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.7-devel

# security
COPY ansible.credentials.py /etc/tower/conf.d/credentials.py
Expand Down
6 changes: 2 additions & 4 deletions Dockerfiles/Dockerfile-zabbix
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
ARG REGISTRY=zabbix
ARG BASE_IMAGE_ZABBIX=zabbix-server-pgsql
ARG TAG_ZABBIX=centos-4.4.1
ARG MISM_BULLSEQUANA_EDGE_VERSION

FROM $REGISTRY/$BASE_IMAGE_ZABBIX:$TAG_ZABBIX

#set base image
#FROM zabbix/zabbix-server-pgsql:centos-4.4.1

USER root

ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.6
ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.7-devel

ENV PYTHONWARNINGS="ignore:Unverified HTTPS request"

Expand Down
3 changes: 2 additions & 1 deletion Dockerfiles/Dockerfile-zabbix-agent
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
ARG REGISTRY=zabbix
ARG BASE_IMAGE_ZABBIX_AGENT=zabbix-agent
ARG TAG_ZABBIX=centos-4.4.1
ARG MISM_BULLSEQUANA_EDGE_VERSION

FROM $REGISTRY/$BASE_IMAGE_ZABBIX_AGENT:$TAG_ZABBIX

USER root

ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.6
ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.7-devel

ENV PYTHONWARNINGS="ignore:Unverified HTTPS request"

Expand Down
6 changes: 2 additions & 4 deletions Dockerfiles/Dockerfile-zabbix-web
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
ARG REGISTRY=zabbix
ARG BASE_IMAGE_ZABBIX_WEB=zabbix-web-nginx-pgsql
ARG TAG_ZABBIX=centos-4.4.1
ARG MISM_BULLSEQUANA_EDGE_VERSION

FROM $REGISTRY/$BASE_IMAGE_ZABBIX_WEB:$TAG_ZABBIX

#set base image
#FROM zabbix/zabbix-web-nginx-pgsql:centos-4.4.1

ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.6
ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.7-devel

COPY items.inc.php /usr/share/zabbix/include/
COPY logo-header.svg /usr/share/zabbix/assets/img/
Expand Down
11 changes: 5 additions & 6 deletions Dockerfiles/ansible.env
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ POSTGRES_USER=mism
POSTGRES_PASSWORD=mismpass
POSTGRES_DB=mism

NO_PROXY=127.0.0.1,localhost,172.31.130.224,172.31.60.18,172.31.92.239,172.31.100.156,172.31.60.18,172.31.92.249,172.31.92.222,172.31.92.44,172.31.92.34,webserver,0.0.0.0:9090,0.0.0.0,ansible,awx,rabbitmq,postgres,memcached,elasticsearch,kibana,logstash,filebeat,metricbeat,heartbeat,auditbeat,grafana,prometheus,172.31.130.224,172.31.60.18,172.31.92.239,172.31.100.156,172.31.60.18,172.31.92.249,172.31.92.222,172.31.92.44,172.31.92.34,172.31.120.11,172.31.120.13,172.31.93.233,172.31.92.65,172.31.92.66,172.31.92.67,172.31.92.68,172.31.92.104,172.31.92.104,172.31.92.171,172.31.120.203,172.31.92.121,172.31.92.161
no_proxy=127.0.0.1,localhost,172.31.130.224,172.31.60.18,172.31.92.239,172.31.100.156,172.31.60.18,172.31.92.249,172.31.92.222,172.31.92.44,172.31.92.34,webserver,0.0.0.0:9090,0.0.0.0,ansible,awx,rabbitmq,postgres,memcached,elasticsearch,kibana,logstash,filebeat,metricbeat,heartbeat,auditbeat,grafana,prometheus,172.31.130.224,172.31.60.18,172.31.92.239,172.31.100.156,172.31.60.18,172.31.92.249,172.31.92.222,172.31.92.44,172.31.92.34,172.31.120.11,172.31.120.13,172.31.93.233,172.31.92.65,172.31.92.66,172.31.92.67,172.31.92.68,172.31.92.104,172.31.92.104,172.31.92.171,172.31.120.203,172.31.92.121,172.31.92.161
HTTP_PROXY=http://193.56.47.20:8080
http_proxy=http://193.56.47.20:8080
HTTPS_PROXY=http://193.56.47.20:8080
https_proxy=http://193.56.47.20:8080
NO_PROXY=127.0.0.1,localhost,172.31.130.224,172.31.60.18,172.31.92.239,172.31.100.156,172.31.60.18,172.31.92.249,172.31.92.222,172.31.92.44,172.31.92.34,webserver,0.0.0.0:9090,0.0.0.0,ansible,awx,rabbitmq,postgres,memcached,elasticsearch,kibana,logstash,filebeat,metricbeat,heartbeat,auditbeat,grafana,prometheus,172.31.130.224,172.31.60.18,172.31.92.239,172.31.100.156,172.31.60.18,172.31.92.249,172.31.92.222,172.31.92.44,172.31.92.34,172.31.120.11,172.31.120.13,172.31.93.233,172.31.92.65,172.31.92.66,172.31.92.67,172.31.92.68,172.31.92.104,172.31.92.104,172.31.92.171
HTTP_PROXY=http://193.56.47.8:8080/
http_proxy=http://193.56.47.8:8080/
HTTPS_PROXY=http://193.56.47.8:8080/
https_proxy=http://193.56.47.8:8080/
2 changes: 1 addition & 1 deletion Dockerfiles/loginModal.partial.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
</div>
</div>
<div class="LoginModal-footer">
version: 2.1.6
version: 2.1.7-devel
</div>
</div>
</div>
Expand Down
11 changes: 5 additions & 6 deletions Dockerfiles/zabbix.env
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ ZBX_TIMEOUT=9
# ZBX_UNAVAILABLEDELAY=60
# ZBX_UNREACHABLEDELAY=15

NO_PROXY=127.0.0.1,localhost,172.31.130.224,172.31.60.18,172.31.92.239,172.31.100.156,172.31.60.18,172.31.92.249,172.31.92.222,172.31.92.44,172.31.92.34,webserver,0.0.0.0:9090,0.0.0.0,ansible,awx,rabbitmq,postgres,memcached,elasticsearch,kibana,logstash,filebeat,metricbeat,heartbeat,auditbeat,grafana,prometheus,172.31.130.224,172.31.60.18,172.31.92.239,172.31.100.156,172.31.60.18,172.31.92.249,172.31.92.222,172.31.92.44,172.31.92.34,172.31.120.11,172.31.120.13,172.31.93.233,172.31.92.65,172.31.92.66,172.31.92.67,172.31.92.68,172.31.92.104,172.31.92.104,172.31.92.171,172.31.120.203,172.31.92.121,172.31.92.161
no_proxy=127.0.0.1,localhost,172.31.130.224,172.31.60.18,172.31.92.239,172.31.100.156,172.31.60.18,172.31.92.249,172.31.92.222,172.31.92.44,172.31.92.34,webserver,0.0.0.0:9090,0.0.0.0,ansible,awx,rabbitmq,postgres,memcached,elasticsearch,kibana,logstash,filebeat,metricbeat,heartbeat,auditbeat,grafana,prometheus,172.31.130.224,172.31.60.18,172.31.92.239,172.31.100.156,172.31.60.18,172.31.92.249,172.31.92.222,172.31.92.44,172.31.92.34,172.31.120.11,172.31.120.13,172.31.93.233,172.31.92.65,172.31.92.66,172.31.92.67,172.31.92.68,172.31.92.104,172.31.92.104,172.31.92.171,172.31.120.203,172.31.92.121,172.31.92.161
HTTP_PROXY=http://193.56.47.20:8080
http_proxy=http://193.56.47.20:8080
HTTPS_PROXY=http://193.56.47.20:8080
https_proxy=http://193.56.47.20:8080
NO_PROXY=127.0.0.1,localhost,172.31.130.224,172.31.60.18,172.31.92.239,172.31.100.156,172.31.60.18,172.31.92.249,172.31.92.222,172.31.92.44,172.31.92.34,webserver,0.0.0.0:9090,0.0.0.0,ansible,awx,rabbitmq,postgres,memcached,elasticsearch,kibana,logstash,filebeat,metricbeat,heartbeat,auditbeat,grafana,prometheus,172.31.130.224,172.31.60.18,172.31.92.239,172.31.100.156,172.31.60.18,172.31.92.249,172.31.92.222,172.31.92.44,172.31.92.34,172.31.120.11,172.31.120.13,172.31.93.233,172.31.92.65,172.31.92.66,172.31.92.67,172.31.92.68,172.31.92.104,172.31.92.104,172.31.92.171
HTTP_PROXY=http://193.56.47.8:8080/
http_proxy=http://193.56.47.8:8080/
HTTPS_PROXY=http://193.56.47.8:8080/
https_proxy=http://193.56.47.8:8080/
2 changes: 1 addition & 1 deletion add_awx_playbooks.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

export MISM_BULLSEQUANA_EDGE_PLAYBOOKS_VERSION=2.1.6
export MISM_BULLSEQUANA_EDGE_PLAYBOOKS_VERSION=2.1.7-devel

###################################################################################################################
# passwords.yml
Expand Down
70 changes: 70 additions & 0 deletions ansible/playbooks/openbmc/inventory/get_ntp_server_ip_and_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
- hosts: all
connection: local
name: Get NTP Server IP and Sync Method
gather_facts: False
vars_files:
- "{{ ANSIBLE_EXTERNAL_VARS }}"
- "{{ ANSIBLE_PASSWORDS }}"

tasks:

- name: validate ntp_server_ip variable
assert:
that:
- ntp_server_ip is defined
- ntp_server_ip |default(None)
fail_msg: "The variable ntp_server_ip is NOT defined in inventory (AWX) or vars/external_vars file (Ansible). See readme.md for more details."
success_msg: "The variable ntp_server_ip is defined"
run_once: true

- name: validate ntp_server_sync variable
assert:
that:
- ntp_server_sync is defined
- ntp_server_sync |default(None)
fail_msg: "The variable ntp_server_sync is NOT defined in inventory (AWX) or vars/external_vars file (Ansible). See readme.md for more details."
success_msg: "The variable ntp_server_sync is defined"
run_once: true

- debug:
msg: "ntp server ip in vars file = {{ ntp_server_ip }}"
when: ntp_server_ip is defined
run_once: true

- debug:
msg: "ntp server sync in vars file = {{ ntp_server_sync }}"
when: ntp_server_sync is defined
run_once: true

- include_tasks: ../utils/utils_create_token.yml

- name: get NTP Server IP
uri:
url: https://{{ baseuri }}/xyz/openbmc_project/network/eth0/attr/NTPServers
method: GET
validate_certs: no
headers:
X-Auth-Token: "{{ x_token }}"
register: result_ntp_server_ip

- name: get NTP Server Sync
uri:
url: https://{{ baseuri }}/xyz/openbmc_project/time/sync_method/attr/TimeSyncMethod
method: GET
validate_certs: no
headers:
X-Auth-Token: "{{ x_token }}"
register: result_ntp_server_sync

- set_fact:
address_ip: "{{ result_ntp_server_ip.json.data }}"

- set_fact:
sync: "{{ result_ntp_server_sync.json.data }}"

- name: debug NTP Server Ip and Sync
debug:
msg: "NTP Ip = {{address_ip}} / Sync method = {{sync}}"
when: address_ip is defined and sync is defined

64 changes: 64 additions & 0 deletions ansible/playbooks/openbmc/inventory/set_ntp_server_ip_and_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
- hosts: all
connection: local
name: Set NTP Server Ip and Sync
gather_facts: False
vars_files:
- "{{ ANSIBLE_EXTERNAL_VARS }}"
- "{{ ANSIBLE_PASSWORDS }}"

tasks:

- name: validate ntp_server_ip variable
assert:
that:
- ntp_server_ip is defined
- ntp_server_ip |default(None)
fail_msg: "The variable ntp_server_ip is NOT defined in inventory (AWX) or vars/external_vars file (Ansible). See readme.md for more details."
success_msg: "The variable ntp_server_ip is defined"
run_once: true

- debug:
msg: "NTP server ip = {{ ntp_server_ip }}"
when: ntp_server_ip is defined
run_once: true

- name: validate ntp_server_sync variable
assert:
that:
- ntp_server_sync is defined
- ntp_server_sync |default(None)
fail_msg: "The variable ntp_server_sync is NOT defined in inventory (AWX) or vars/external_vars file (Ansible). See readme.md for more details."
success_msg: "The variable ntp_server_sync is defined"
run_once: true

- debug:
msg: "ntp server sync in vars file = {{ ntp_server_sync }}"
when: ntp_server_sync is defined
run_once: true

- include_tasks: ../utils/utils_create_token.yml

- name: set NTP Server Ip
uri:
url: https://{{ baseuri }}/xyz/openbmc_project/network/eth0/attr/NTPServers
method: PUT
validate_certs: no
headers:
X-Auth-Token: "{{ x_token }}"
body_format: json
body:
data: "{{ ntp_server_ip }}"
register: result_ntp_server_ip

- name: set NTP Server Sync
uri:
url: https://{{ baseuri }}/xyz/openbmc_project/time/sync_method/attr/TimeSyncMethod
method: PUT
validate_certs: no
headers:
X-Auth-Token: "{{ x_token }}"
body_format: json
body:
data: "{{ ntp_server_sync }}"
register: result_ntp_server_sync
18 changes: 17 additions & 1 deletion ansible/playbooks/playbooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inventories:
hosts:
- name: <here an ip address>
variables: '{ "baseuri": "{{inventory_hostname}}", "username": "<here bmc user name>", "password": "{{ here_your_encryted_password_variable }}" }'
variables: '{ "ANSIBLE_PASSWORDS": "/etc/ansible/vars/passwords.yml", "technical_state_path": "/host/mnt", "forceoff": True, "reboot": True, "rsyslog_server_ip": "0.0.0.0", "rsyslog_server_port": 514, "reboot_countdown": "2", "poweron_countdown": "5", "activating_countdown": "30", "poweroff_countdown": "5" , "reboot_maxretries": "10", "poweron_maxretries": "10", "activating_maxretries": "10", "poweroff_maxretries": "10", token_timeout: "5" }'
variables: '{ "ANSIBLE_PASSWORDS": "/etc/ansible/vars/passwords.yml", "technical_state_path": "/host/mnt", "forceoff": True, "reboot": True, "ntp_server_ip": "127.0.0.1", "ntp_server_sync": 604800, "rsyslog_server_ip": "0.0.0.0", "rsyslog_server_port": 514, "reboot_countdown": "2", "poweron_countdown": "5", "activating_countdown": "30", "poweroff_countdown": "5" , "reboot_maxretries": "10", "poweron_maxretries": "10", "activating_maxretries": "10", "poweroff_maxretries": "10", token_timeout: "5" }'

credentials:
- name: Bull Sequana Edge Vault
Expand Down Expand Up @@ -207,6 +207,22 @@ job_templates:
playbook: inventory/get_sensors.yml
job-type: run
verbosity: 0
- name: NTP Server IP and Sync Method
description: Get NTP Server IP and Sync Method
inventory: BullSequana Edge Inventory
project: BullSequana Edge Playbooks
playbook: inventory/get_ntp_server_ip_and_sync.yml
job-type: run
verbosity: 0
- name: Set Server IP and Sync Method
description: Set Server IP and Sync Method
inventory: BullSequana Edge Inventory
project: BullSequana Edge Playbooks
playbook: inventory/set_ntp_server_ip_and_sync.yml
job-type: run
verbosity: 0
extra_vars: ["ntp_server_ip:, ntp_server_sync:604800"]
ask_variables_on_launch: 1
- name: System
description: Get System
inventory: BullSequana Edge Inventory
Expand Down
Loading

0 comments on commit da8bea6

Please sign in to comment.