Skip to content

Commit

Permalink
deliverable 2.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
frsauvage committed Jun 2, 2021
1 parent 2e8704e commit 161d995
Show file tree
Hide file tree
Showing 13 changed files with 139 additions and 21 deletions.
2 changes: 1 addition & 1 deletion add_ansible_playbooks_and_plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ add_lines()
}

while true; do
read -p "Do you wish to overwrite your $ANSIBLE_CONFIG file ? y yes / n no: " yn
read -p "Do you wish to overwrite your $ANSIBLE_CONFIG file ? [y yes / n no]: " yn
case $yn in
[Yy]* ) cp ansible/inventory/ansible.cfg $ANSIBLE_CONFIG ; break;;
[Nn]* ) add_lines; break;;
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
echo -e "\033[32mThis will install AWX and Zabbix\033[0m"

while true; do
read -p "Do you wish to install Ansible playbooks and plugins too: [yn yes no] " yn
read -p "Do you wish to install Ansible playbooks and plugins too? [y yes / n no]: " yn
case $yn in
[Yy]* ) ./add_ansible_playbooks_and_plugins.sh; break;;
[Nn]* ) break;;
Expand Down
13 changes: 4 additions & 9 deletions install_awx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

export old_mism_version=$MISM_BULLSEQUANA_EDGE_VERSION

rm -f install_awx_from_atos_dockerhub.sh
rm -f start_awx_from_atos_dockerhub.sh
rm -f stop_awx_from_atos_dockerhub.sh

. ./check_prerequisites.sh
# comment the next line if you build from your own Dockerfiles with build_awx.sh
. ./remove_awx_containers_and_images.sh
Expand Down Expand Up @@ -112,15 +116,6 @@ then
touch ansible/vars/passwords.yml
fi

echo "building BullSequana Edge Ansible AWX containers ...."
export REGISTRY=ansible
docker-compose -f docker_compose_awx.yml build \
--build-arg MISM_BULLSEQUANA_EDGE_VERSION=$VERSION \
--build-arg REGISTRY=$REGISTRY \
--build-arg BASE_IMAGE_AWX_TASK=$BASE_IMAGE_AWX_TASK \
--build-arg TAG_AWX=$AWX_BULLSEQUANA_EDGE_VERSION \
--build-arg BASE_IMAGE_AWX_WEB=$BASE_IMAGE_AWX_WEB

echo "starting BullSequana Edge Ansible AWX containers ...."
docker-compose -f docker_compose_awx.yml up -d

Expand Down
8 changes: 8 additions & 0 deletions install_awx_from_atos_dockerhub.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/sh

rm -f install_awx.sh
rm -f start_awx.sh
rm -f stop_awx.sh

. ./check_prerequisites.sh
. ./remove_awx_containers_and_images.sh
. ./proxy.sh
Expand All @@ -8,6 +12,10 @@
echo "starting BullSequana Edge Ansible AWX containers ...."
docker-compose -f docker_compose_awx_from_atos_dockerhub.yml up -d

rm -f install.sh install_awx.sh
rm -f start.sh start_awx.sh
rm -f stop.sh stop_awx.sh

echo "----------------------------------------------------------------------------------------------------"
echo "now wait 10 minutes for the migration to complete...."
echo "check the login page at https://localhost"
Expand Down
14 changes: 4 additions & 10 deletions install_zabbix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

export old_mism_version=$MISM_BULLSEQUANA_EDGE_VERSION

rm -f install_zabbix_from_atos_dockerhub.sh
rm -f start_zabbix_from_atos_dockerhub.sh
rm -f stop_zabbix_from_atos_dockerhub.sh

. ./check_prerequisites.sh
# comment the next line if you build from your own Dockerfiles with build_zabbix.sh
. ./remove_zabbix_containers_and_images.sh
Expand Down Expand Up @@ -115,16 +119,6 @@ then
fi
fi

echo "building BullSequana Edge Zabbix containers ...."
export REGISTRY=zabbix
docker-compose -f docker_compose_zabbix.yml build \
--build-arg MISM_BULLSEQUANA_EDGE_VERSION=$MISM_BULLSEQUANA_EDGE_VERSION \
--build-arg REGISTRY=$REGISTRY \
--build-arg BASE_IMAGE_ZABBIX=$BASE_IMAGE_ZABBIX \
--build-arg TAG_ZABBIX=$ZABBIX_BULLSEQUANA_EDGE_VERSION \
--build-arg BASE_IMAGE_ZABBIX_WEB=$BASE_IMAGE_ZABBIX_WEB \
--build-arg BASE_IMAGE_ZABBIX_AGENT=$BASE_IMAGE_ZABBIX_AGENT

echo "starting BullSequana Edge Zabbix containers ...."
docker-compose -f docker_compose_zabbix.yml up -d

Expand Down
8 changes: 8 additions & 0 deletions install_zabbix_from_atos_dockerhub.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/sh

rm -f install_zabbix.sh
rm -f start_zabbix.sh
rm -f stop_zabbix.sh

. ./check_prerequisites.sh
. ./remove_zabbix_containers_and_images.sh

Expand All @@ -25,6 +29,10 @@ echo $timezone
. ./proxy.sh
. ./versions.sh

rm -f install.sh install_zabbix.sh
rm -f start.sh start_zabbix.sh
rm -f stop.sh stop_zabbix.sh

echo "starting BullSequana Edge Zabbix containers ...."
docker-compose -f docker_compose_zabbix_from_atos_dockerhub.yml up -d

Expand Down
17 changes: 17 additions & 0 deletions start_awx_from_atos_dockerhub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

. ./proxy.sh
. ./versions.sh

export always_or_no=always
./update_awx_containers_restart_option.sh

echo "starting BullSequana Edge Ansible AWX containers ...."
docker-compose -f docker_compose_awx_from_atos_dockerhub.yml up -d
echo "----------------------------------------------------------------"
echo "AWX is available on https://localhost"
echo "pgadmin is available on http://localhost:7070"
echo "for more info, refer to github site "
echo "https://github.com/atosorigin/bullsequana-edge-system-management"
echo "----------------------------------------------------------------"

5 changes: 5 additions & 0 deletions start_from_atos_dockerhub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

./start_awx_from_atos_dockerhub.sh
./start_zabbix_from_atos_dockerhub.sh

35 changes: 35 additions & 0 deletions start_zabbix_from_atos_dockerhub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh

chmod uo+w zabbix/server/externalscripts/openbmc

set -euo pipefail

if filename=$(readlink /etc/localtime); then
# /etc/localtime is a symlink as expected
export timezone=${filename#*zoneinfo/}
if [[ $timezone = "$filename" || ! $timezone =~ ^[^/]+/[^/]+$ ]]; then
# not pointing to expected location or not Region/City
>&2 echo "$filename points to an unexpected location"
exit 1
fi
else # compare files by contents
# https://stackoverflow.com/questions/12521114/getting-the-canonical-time-zone-name-in-shell-script#comment88637393_12523283
export timezone=$(find /usr/share/zoneinfo -type f ! -regex ".*/Etc/.*" -exec cmp -s {} /etc/localtime \; -print | sed -e 's@.*/zoneinfo/@@' | head -n1)
fi

echo $timezone

. ./proxy.sh
. ./versions.sh

export always_or_no=always
./update_zabbix_containers_restart_option.sh

echo "starting MISM containers ...."
docker-compose -f docker_compose_zabbix_from_atos_dockerhub.yml up -d
echo "----------------------------------------------------------------"
echo "Zabbix is available on https://localhost:4443"
echo "for more info, refer to github site "
echo "https://github.com/atosorigin/bullsequana-edge-system-management"
echo "----------------------------------------------------------------"

18 changes: 18 additions & 0 deletions stop_awx_from_atos_dockerhub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

. ./versions.sh

export always_or_no=no
./update_awx_containers_restart_option.sh

echo "stopping BullSequana Edge Ansible AWX containers ...."
docker-compose -f docker_compose_awx_from_atos_dockerhub.yml down

echo "if ever you get trouble to stop containers after a docker migration, try this :"
echo "docker rm -f awx_web"
echo "docker rm -f awx_task"
echo "docker rm -f awx_memcached"
echo "docker rm -f awx_rabbitmq"
echo "docker rm -f awx_postgres"
echo "docker rm -f pgadmin"

4 changes: 4 additions & 0 deletions stop_from_atos_dockerhub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

./stop_awx_from_atos_dockerhub.sh
./stop_zabbix_from_atos_dockerhub.sh
16 changes: 16 additions & 0 deletions stop_zabbix_from_atos_dockerhub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

. ./versions.sh

export always_or_no=no
./update_zabbix_containers_restart_option.sh

echo "stopping BullSequana Edge zabbix containers ...."
docker-compose -f docker_compose_zabbix_from_atos_dockerhub.yml down

echo "if ever you get trouble to stop containers after a docker migration, try this :"
echo "docker rm -f zabbix-web"
echo "docker rm -f zabbix-agent"
echo "docker rm -f zabbix-server"
echo "docker rm -f zabbix-postgres"

18 changes: 18 additions & 0 deletions update_from_atos_dockerhub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export MISM_BULLSEQUANA_EDGE_VERSION=2.1.8
export AWX_BULLSEQUANA_EDGE_VERSION=9.0.1
export RABBITMQ_AWX_BULLSEQUANA_EDGE_VERSION=3.8.1-management
export POSTGRES_AWX_BULLSEQUANA_EDGE_VERSION=12.0-alpine
export PGADMIN_AWX_BULLSEQUANA_EDGE_VERSION=4.14
export MEMCACHED_AWX_BULLSEQUANA_EDGE_VERSION=1.5.20-alpine
export ZABBIX_BULLSEQUANA_EDGE_VERSION=centos-4.4.1
export POSTGRES_ZABBIX_BULLSEQUANA_EDGE_VERSION=12.0-alpine
export BASE_IMAGE_ZABBIX=zabbix-server-pgsql
export BASE_IMAGE_ZABBIX_WEB=zabbix-web-nginx-pgsql
export BASE_IMAGE_ZABBIX_AGENT=zabbix-agent
export BASE_IMAGE_AWX_WEB=awx_web
export BASE_IMAGE_AWX_TASK=awx_task
----------------------------------------------------------------------------------------------------
Now your new version is :
 2.1.8 
Run your installer
----------------------------------------------------------------------------------------------------

0 comments on commit 161d995

Please sign in to comment.