Skip to content

Commit

Permalink
deliverable 2.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Mar 24, 2021
1 parent baa0308 commit 71c054b
Show file tree
Hide file tree
Showing 8 changed files with 242 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Dockerfiles/Dockerfile-awx_task
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
ARG REGISTRY
ARG BASE_IMAGE_AWX_TASK
ARG TAG_AWX
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.5

COPY ansible.credentials.py /etc/tower/conf.d/credentials.py
COPY ansible.env /etc/tower/conf.d/environment.sh
COPY ansible.SECRET_KEY /etc/tower/SECRET_KEY

# To be done manually from container : RUN yum update
RUN yum install -y nano which nmap && \
yum install -y epel-release && \
yum install -y ansible

# Warning : NOT nmap => https://stackoverflow.com/questions/14913153/module-object-has-no-attribute-portscanner
RUN pip3 install --upgrade pip && \
pip install python-nmap && \
pip install requests && \
pip install lxml && \
pip install urllib3 && \
pip install ansible-vault && \
pip install pika && \
pip install paramiko --upgrade && \
pip install pycryptodome && \
pip install netaddr

WORKDIR /var/lib/awx
53 changes: 53 additions & 0 deletions Dockerfiles/Dockerfile-awx_web
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
ARG REGISTRY
ARG BASE_IMAGE_AWX_WEB
ARG TAG_AWX
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.5

# security
COPY ansible.credentials.py /etc/tower/conf.d/credentials.py
COPY ansible.env /etc/tower/conf.d/environment.sh
COPY ansible.cors.py /etc/tower/conf.d/cors.py
COPY ansible.SECRET_KEY /etc/tower/SECRET_KEY
COPY ansible.nginx.conf /etc/nginx/nginx.conf

COPY app.5df28f9a9231a828dd6d.css /var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/ui/static/css/
COPY logo-header.svg /var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/ui/static/assets/
COPY logo-atos-login.png /var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/ui/static/assets/
COPY logo-atos-login.svg /var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/ui/static/assets/
COPY loginModal.partial.html /var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/ui/static/partials/login/loginModal/

# RUN yum update
# RUN pip install ansible-cmdb && \
# Warning : NOT nmap => https://stackoverflow.com/questions/14913153/module-object-has-no-attribute-portscanner
RUN yum install -y nano which nmap && \
yum install -y epel-release && \
yum install -y ansible && \
pip3 install --upgrade pip && \
pip install python-nmap && \
pip install requests && \
pip install lxml && \
pip install urllib3 && \
pip install ansible-vault && \
pip install pika

# tower-cli install and config
RUN pip install ansible-tower-cli
RUN export TOWER_HOST=https://localhost:8052 && \
pip install paramiko --upgrade && \
pip install pycryptodome && \
pip install netaddr
#Install netaddr so we can use ipaddr filter in ansible

EXPOSE 8052

WORKDIR /var/lib/awx

31 changes: 31 additions & 0 deletions Dockerfiles/Dockerfile-zabbix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ARG REGISTRY
ARG BASE_IMAGE_ZABBIX
ARG TAG_ZABBIX
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.5

ENV PYTHONWARNINGS="ignore:Unverified HTTPS request"

# security
# COPY zabbix_server.conf /etc/zabbix

WORKDIR /usr/lib/zabbix/externalscripts

RUN yum -y update && \
yum -y install gcc && \
yum -y install openssl && \
yum -y install epel-release && \
yum -y install python-pip && \
pip install urllib3 && \
pip install requests && \
pip install pycryptodome && \
pip install nmap && \
yum -y update
30 changes: 30 additions & 0 deletions Dockerfiles/Dockerfile-zabbix-agent
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
ARG REGISTRY
ARG BASE_IMAGE_ZABBIX_AGENT
ARG TAG_ZABBIX
ARG MISM_BULLSEQUANA_EDGE_VERSION

FROM $REGISTRY/$BASE_IMAGE_ZABBIX_AGENT:$TAG_ZABBIX

USER root

ENV MISM_BULLSEQUANA_EDGE_VERSION=2.1.5

ENV PYTHONWARNINGS="ignore:Unverified HTTPS request"

# security
# COPY zabbix_server.conf /etc/zabbix

WORKDIR /usr/lib/zabbix/externalscripts

RUN yum -y update && \
yum -y install gcc && \
yum -y install openssl && \
yum -y install epel-release && \
yum -y install python-pip && \
pip install urllib3 && \
pip install requests && \
pip install pycryptodome && \
pip install nmap && \
yum -y update


20 changes: 20 additions & 0 deletions Dockerfiles/Dockerfile-zabbix-web
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ARG REGISTRY
ARG BASE_IMAGE_ZABBIX_WEB
ARG TAG_ZABBIX
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.5

COPY items.inc.php /usr/share/zabbix/include/
COPY logo-header.svg /usr/share/zabbix/assets/img/
COPY logo-zabbix-header.png /usr/share/zabbix/assets/img/
COPY dark-theme.css /usr/share/zabbix/assets/styles/
COPY blue-theme.css /usr/share/zabbix/assets/styles/



5 changes: 5 additions & 0 deletions git_repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
https://bitbucketbdsfr.fsc.atos-services.net/scm/eds/mism.git

https://github.com/atosorigin/bullsequana-edge-system-management/

https://jirabdsfr.fsc.atos-services.net/projects/EDS
2 changes: 2 additions & 0 deletions github_token
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
francine.sauvage@atos.net
8134f58cbbfc326e505a49f4a157e87aa27ac7b1
66 changes: 66 additions & 0 deletions install_ansible_prerequisites.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash

unset $mism_version

echo "------------------------------------------------------------------------------------------------"
echo "Use this script only if you have NO connnection to internet and python 2.7.5+> already installed"
echo -e "\033[31mIt is delivered as is and has NO WARRANTY\033[0m"
echo "------------------------------------------------------------------------------------------------"

read -p "Would you like to install BullSequana Edge ansible prerequisites [y/n] ? " yn

if [ ! "$yn" == "y" ]
then
exit -1
fi

#cd prerequisites
#unzip setuptools-44.0.0.zip
#cd setuptools-44.0.0
#python setup.py install
#cd ../..
#rm -rf prerequisites/setuptools-44.0.0

cd prerequisites
tar -xzvf tzlocal-2.0.0.tar.gz
cd tzlocal-2.0.0
python setup.py install
cd ../..
rm -rf prerequisites/tzlocal-2.0.0

cd prerequisites
tar -xzvf pip-19.3.1.tar.gz
cd pip-19.3.1
python setup.py install
cd ../..
rm -rf prerequisites/pip-19.3.1

cd prerequisites
tar -xzvf Jinja2-2.10.3.tar.gz
cd Jinja2-2.10.3
python setup.py install
cd ../..
rm -rf prerequisites/Jinja2-2.10.3

cd prerequisites
tar -xzvf MarkupSafe-1.1.1.tar.gz
cd MarkupSafe-1.1.1
python setup.py install
cd ../..
rm -rf prerequisites/MarkupSafe-1.1.1

cd prerequisites
tar -xvzf ansible-2.9.2.tar.gz
cd ansible-2.9.2
python setup.py install
cd ../..
rm -rf prerequisites/ansible-2.9.2

cd prerequisites
tar -xvzf ansible-vault-1.2.0.tar.gz
cd ansible-vault-1.2.0
python setup.py install
cd ../..
rm -rf prerequisites/ansible-vault-1.2.0

echo "prerequisites successfully installed"

0 comments on commit 71c054b

Please sign in to comment.