Skip to content

Commit

Permalink
synchro with bitbucket 2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
frsauvage committed Dec 11, 2019
1 parent a630567 commit 86d335d
Show file tree
Hide file tree
Showing 30 changed files with 187 additions and 105 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# TODO uncomment to get tar files
*.tar
*.gz
*.bak
bull*.zip
bullsequana-edge-system-management-2.0.1/

#ignore mism tar creation
/mism
ansible/plugins/inventory/ansible-inventory-cache

#ignore pgdata
Expand All @@ -14,7 +13,7 @@ ansible/plugins/inventory/ansible-inventory-cache
/zabbix/pgdata

# json generated zabbix files not commited
#/zabbix/server/externalscripts/openbmc/*.json
/zabbix/server/externalscripts/openbmc/*.json
# no pid files
*.pid

Expand Down
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile-awx_task.latest
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ RUN yum install -y epel-release

RUN pip3 install --upgrade pip

RUN pip install --upgrade ansible

# Warning : NOT nmap => https://stackoverflow.com/questions/14913153/module-object-has-no-attribute-portscanner
RUN pip install python-nmap
RUN pip install requests
Expand All @@ -27,6 +29,8 @@ RUN pip install ansible-vault
# RUN pip install ansible-cmdb
RUN pip install pika
RUN pip install paramiko --upgrade
RUN pip install pycryptodome

#Install netaddr so we can use ipaddr filter in ansible
RUN pip install netaddr

Expand Down
4 changes: 4 additions & 0 deletions Dockerfiles/Dockerfile-awx_task.tag
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ RUN yum install -y epel-release

RUN pip3 install --upgrade pip

RUN pip install --upgrade ansible

# Warning : NOT nmap => https://stackoverflow.com/questions/14913153/module-object-has-no-attribute-portscanner
RUN pip install python-nmap
RUN pip install requests
Expand All @@ -25,6 +27,8 @@ RUN pip install ansible-vault
# RUN pip install ansible-cmdb
RUN pip install pika
RUN pip install paramiko --upgrade
RUN pip install pycryptodome

#Install netaddr so we can use ipaddr filter in ansible
RUN pip install netaddr

Expand Down
2 changes: 2 additions & 0 deletions Dockerfiles/Dockerfile-awx_web.latest
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ RUN yum install -y epel-release

RUN pip3 install --upgrade pip

RUN pip install --upgrade ansible

# Warning : NOT nmap => https://stackoverflow.com/questions/14913153/module-object-has-no-attribute-portscanner
RUN pip install python-nmap
RUN pip install requests
Expand Down
3 changes: 3 additions & 0 deletions Dockerfiles/Dockerfile-awx_web.tag
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ RUN yum install -y epel-release

RUN pip3 install --upgrade pip

RUN pip install --upgrade ansible

# Warning : NOT nmap => https://stackoverflow.com/questions/14913153/module-object-has-no-attribute-portscanner
RUN pip install python-nmap
RUN pip install requests
Expand All @@ -35,6 +37,7 @@ RUN pip install pika
RUN pip install ansible-tower-cli
RUN export TOWER_HOST=https://localhost:8052
RUN pip install paramiko --upgrade
RUN pip install pycryptodome

#Install netaddr so we can use ipaddr filter in ansible
RUN pip install netaddr
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/Dockerfile-zabbix-agent.latest
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#set base image
FROM zabbix/zabbix-agent:latest
FROM zabbix/zabbix-agent:centos-latest

USER root

Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/Dockerfile-zabbix-web.latest
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#set base image
FROM zabbix/zabbix-web-nginx-pgsql:latest
FROM zabbix/zabbix-web-nginx-pgsql:centos-latest

ENV MISM_BULLSEQUANA_EDGE_VERSION=latest

Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/Dockerfile-zabbix.latest
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#set base image
FROM zabbix/zabbix-server-pgsql:latest
FROM zabbix/zabbix-server-pgsql:centos-latest

USER root

Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/zabbix.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ ZBX_TIMEOUT=9
# ZBX_UNREACHABLEPERIOD=45
# ZBX_UNAVAILABLEDELAY=60
# ZBX_UNREACHABLEDELAY=15

4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ git clone "https://github.com/atosorigin/bullsequana-edge-system-management.git"
cd bullsequana-edge-system-management
```
## and run the desired installer
### local install
`./install_playbooks_and_plugins.sh`
### doker installs
`./install.sh`
`./install_awx_from_dockerhub.sh`
`./install_awx.sh`
`./install_zabbix_from_dockerhub.sh`
Expand Down
Binary file added ansible/doc/proxy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 21 additions & 10 deletions ansible/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Optionaly, 2 ready-to-go AWX-Ansible images are available on Dockerhub

### check proxy configuration

By default, the following proxy environment variables are copied in AWX docker context :
The proxy environment variables are automatically *copied* in AWX docker context :
- HTTP_PROXY
- HTTPS_PROXY
- NO_PROXY
Expand Down Expand Up @@ -636,35 +636,46 @@ TOWER_VERIFY_SSL=false
TOWER_INSECURE=true

## <a name="howto_proxy"></a>How to change my proxy
By default, when you start the installer, the proxy environment variables are copied in containers thanks to the following section in docker-compose-awx.yml file:
By default, when you start the installer, the proxy environment variables are added in containers thanks to the following section in docker-compose-awx.yml file:

```
environment:
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
env-file:
- Dockerfiles/ansible.env
...
```

You can see your PROXY environment while starting up your AWX:

![alt text](https://github.com/atosorigin/bullsequana-edge-system-management/blob/master/ansible/doc/proxy.png)

![#f03c15](https://placehold.it/15/f03c15/000000?text=+) If your bullsequana edge IP address is not declared in proxy: You may need to add your bullsequana edge IP address in your NO_PROXY configuration to bypass the proxy

```
export NO_PROXY="<your bullsequana edge IP address>,$NO_PROXY"
```

If you don't want to use XX_PROXY environment variables, you can directly adapt the proxy configuration as desired in *docker-compose-awx.yml* file with explicit IP addresses and host names:
If you don't want to use the host configuration for XX_PROXY environment variables:
1. Remove the following line in *install and start shells*
```
. ./proxy.sh
```

2. Add your proxy environement as desired in *docker-compose-awx.yml* file with explicit IP addresses and host names:
```
env-file:
ansible.env
environment:
HTTP_PROXY: http://<your proxy>:<your port>
HTTPS_PROXY: https://<your proxy>:<your port>
NO_PROXY: <your bullsequana edge IP address>,127.0.0.1,localhost,zabbix-web,zabbix-server,zabbix-agent,awx_web,awx_task,rabbitmq,postgres,memcached
...
```

![#f03c15](https://placehold.it/15/f03c15/000000?text=+) If you change a XXX_PROXY env variable, you should restart the containers :
![#f03c15](https://placehold.it/15/f03c15/000000?text=+) INFO: If you change a XXX_PROXY env variable, you should restart the containers :

```
./stop.sh
./start.sh
./stop.sh or ./stop_awx.sh
./start.sh or ./start_awx.sh
```

## <a name="howto_ts"></a>How to change technical states file path
Expand Down
34 changes: 22 additions & 12 deletions ansible/vars/passwords.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
63613866353134376262643934393733323336333565663730313461636365353664393963346132
6430653938633066303230343233666234653366393035340a373861386239613163373162643736
66623565346331316435353337633539656637383233656130646539386232326263636135633632
3466363332376233330a396665386438353636353161643661343935656466353966633166393730
64313263336439313661313662373964346362363665396531396364363163326630373935653738
3564373330353566383163656635313532373831346363640a393738323631633136376530626264
38663537623363336534333365393539613139356236373063353938626564326362386666643732
3630393530626230300a616439633733333532383437393432363834633963396138646438666562
32663864323563663530663530626266613066373935303736363139316561666338626234323537
6237663936353639613739646634386634646534336266380a336261626561383830633230396433
33663435306633643733353635396436643265396335326239633764303138646437356530343137
3739623434626663350a323736663464616261636534323633363631303265313238633363393432
63303535373364306538653538393037613537613564356436336630643134623039396334323062
3233643166306364636265363836616662356631316339630a383536386465316535383662363634
38653235383331646432316666363734333236653339636231633766626239386462303535363731
3331663862376232370a616362383532626538333266646362323639303339623363353437646230
3132
!vault |
$ANSIBLE_VAULT;1.2;AES256;bullsequana_edge_password
61626365653635363236383434626266326539623635316138333233323337366432663762666433
3333633837633963376464313337316435653031666464380a326363336531653738646235353862
64653265343564643031393161333863666265326234623935633431316232643062633662333431
3336616639386165610a383239653966333139646232366363323535653831613566306233366165
64343662373063303263663662623131313232643230336138376435323934376661366263333338
3233393332363264393138666532386530653437333866330a366537316566656437383864663766
62323132396331306463613436613537396464313562393964656535316437393565303339386238
3766343766633533610a623462623565316162336136363232303837333836366534313639356333
root_password: !vault |
$ANSIBLE_VAULT;1.2;AES256;bullsequana_edge_password
38653631336437613633633964663431643831656361386565346663333565363163646464336337
3962383533333163613464336439643834666630393765620a613231646566343539376337616133
30313336306230653665306566316638313963663434626232353466373539396537393134663334
6166346239643161640a356437303237333230323931333765656136636164313932666334353138
3034
8 changes: 0 additions & 8 deletions docker_compose_awx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ services:
- /:/host:ro
env_file:
- Dockerfiles/ansible.env
environment:
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}

awx_task:
image: bullsequana-edge-system-management_awx_task:${MISM_BULLSEQUANA_EDGE_VERSION}
Expand Down Expand Up @@ -67,10 +63,6 @@ services:
- /:/host:ro
env_file:
- Dockerfiles/ansible.env
environment:
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}

rabbitmq:
image: rabbitmq:${RABBITMQ_AWX_BULLSEQUANA_EDGE_VERSION}
Expand Down
8 changes: 0 additions & 8 deletions docker_compose_awx_from_atos_dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ services:
- /:/host:ro
env_file:
- Dockerfiles/ansible.env
environment:
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}

awx_task:
image: atosorigin/bull-sequana-edge-awx-task:${MISM_BULLSEQUANA_EDGE_VERSION}
Expand Down Expand Up @@ -61,10 +57,6 @@ services:
- /:/host:ro
env_file:
- Dockerfiles/ansible.env
environment:
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}

rabbitmq:
image: rabbitmq:${RABBITMQ_AWX_BULLSEQUANA_EDGE_VERSION}
Expand Down
12 changes: 0 additions & 12 deletions docker_compose_zabbix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ services:
env_file:
- Dockerfiles/zabbix.env
environment:
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
PHP_TZ: ${timezone}

zabbix-web:
Expand All @@ -48,9 +45,6 @@ services:
env_file:
- Dockerfiles/zabbix.env
environment:
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
PHP_TZ: ${timezone}
ports:
- 4443:443
Expand Down Expand Up @@ -82,9 +76,6 @@ services:
env_file:
- Dockerfiles/zabbix.env
environment:
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
PHP_TZ: ${timezone}
volumes:
- /etc/localtime:/etc/localtime:ro
Expand All @@ -108,9 +99,6 @@ services:
- Dockerfiles/zabbix.env
environment:
PGDATA: /var/lib/postgresql/data/pgdata
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
PHP_TZ: ${timezone}
ports:
- 5555:5432
Expand Down
12 changes: 0 additions & 12 deletions docker_compose_zabbix_from_atos_dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ services:
env_file:
- Dockerfiles/zabbix.env
environment:
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
PHP_TZ: ${timezone}

zabbix-web:
Expand All @@ -42,9 +39,6 @@ services:
env_file:
- Dockerfiles/zabbix.env
environment:
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
PHP_TZ: ${timezone}
ports:
- 4443:443
Expand Down Expand Up @@ -73,9 +67,6 @@ services:
env_file:
- Dockerfiles/zabbix.env
environment:
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
PHP_TZ: ${timezone}
volumes:
- /etc/localtime:/etc/localtime:ro
Expand All @@ -99,9 +90,6 @@ services:
- Dockerfiles/zabbix.env
environment:
PGDATA: /var/lib/postgresql/data/pgdata
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
PHP_TZ: ${timezone}
ports:
- 5555:5432
Expand Down
2 changes: 1 addition & 1 deletion generate_encrypted_password_for_AWX.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ANSIBLECMD="ansible-vault encrypt_string --vault-id bullsequana_edge_password@pr
usage()
{
echo -e "\033[32mUsage: See Options for $ANSIBLECMD\033[0m"
echo "Example: $CMDNAME --name= 'name_for_my_password' 'my_secre!_p@ssw0rd' "
echo "Example: $CMDNAME --name='name_for_my_password' 'my_secre!_p@ssw0rd' "
echo
echo "Following is the help for $ANSIBLECMD Options":
docker exec -it awx_web $ANSIBLECMD --help
Expand Down
2 changes: 1 addition & 1 deletion generate_encrypted_password_for_Ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ANSIBLECMD="ansible-vault encrypt_string --vault-id bullsequana_edge_password@pr
usage()
{
echo -e "\033[32mUsage: See Options for $ANSIBLECMD\033[0m"
echo "Example: $CMDNAME --name= 'name_for_my_password' 'my_secre!_p@ssw0rd' "
echo "Example: $CMDNAME --name='name_for_my_password' 'my_secre!_p@ssw0rd' "
echo
echo "Following is the help for $ANSIBLECMD Options":
$ANSIBLECMD --help
Expand Down
Loading

0 comments on commit 86d335d

Please sign in to comment.