Skip to content
Snippets Groups Projects
Commit eb305240 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Changed config management.

parent 5ac73e15
No related branches found
No related tags found
No related merge requests found
Showing
with 30 additions and 25 deletions
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
KEY=~/.ssh/ubicast_support KEY=~/.ssh/ubicast_support
VM_HYPER=$(grep VM_HYPER ${CONF} | awk -F "=" '{print$2}') VM_HYPER=$(grep VM_HYPER ${CONF} | awk -F "=" '{print$2}')
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
VM_STORE=/home/jallary/ubicast/TMP/ENVOI VM_STORE=/home/jallary/ubicast/TMP/ENVOI
VM_STORE_LOCAL=/home/jallary/ubicast/TMP/ENVOI VM_STORE_LOCAL=/home/jallary/ubicast/TMP/ENVOI
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
# This script should be run after Nginx, MySQL and Wowza setup (if they should be installed) # This script should be run after Nginx, MySQL and Wowza setup (if they should be installed)
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
echo -e " echo -e "
${RED}Customer parameters will be applied after rebooting. Note that you won't be able to login to the machine after this operation !${NC}" ${RED}Customer parameters will be applied after rebooting. Note that you won't be able to login to the machine after this operation !${NC}"
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
# generate post-deployment conf file # generate post-deployment conf file
echo "SOURCES.LIST" > /root/deployment.results echo "SOURCES.LIST" > /root/deployment.results
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
# set SMTP # set SMTP
if ( ! test -z ${EMAIL_SMTP_SERVER} ) if ( ! test -z ${EMAIL_SMTP_SERVER} )
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
# apply MS default network parameters # apply MS default network parameters
sudo sed -i "s@address .*@address 192.168.1.10@" /etc/network/interfaces sudo sed -i "s@address .*@address 192.168.1.10@" /etc/network/interfaces
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
echo "Insert wowza license key :" echo "Insert wowza license key :"
read WOWZA_LICENSE2 read WOWZA_LICENSE2
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
# Download config file from skyreach # Download config file from skyreach
if ( ! test -z ${SKYREACH_API_KEY} ); then if ( ! test -z ${SKYREACH_API_KEY} ); then
conf_url="https://$SKYREACH_HOST/erp/credentials/$SKYREACH_API_KEY/conf.sh" conf_url="https://$SKYREACH_HOST/erp/credentials/$SKYREACH_API_KEY/conf.sh"
if ( curl -I "$conf_url" >/dev/null ); then if ( curl -I "$conf_url" >/dev/null ); then
wget -q "$conf_url" -O /root/envsetup/conf.sh wget -q "$conf_url" -O /root/envsetup/auto-generated-conf.sh
source /root/envsetup/conf.sh echo "Config file updated."
source /root/envsetup/global-conf.sh
else else
echo "Failed to download configuration using url:" echo "Failed to download configuration using url:"
echo " $conf_url" echo " $conf_url"
fi fi
else
echo "No API key for $SKYREACH_HOST. The config will not be downloaded."
fi fi
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
# Autogenerate missing values # Autogenerate missing values
if [ "${MS_ID}" = "" ]; then if [ "${MS_ID}" = "" ]; then
...@@ -9,6 +9,7 @@ if [ "${MS_ID}" = "" ]; then ...@@ -9,6 +9,7 @@ if [ "${MS_ID}" = "" ]; then
else else
echo "MS_ID='${MS_ID}'" >> /root/envsetup/conf.sh echo "MS_ID='${MS_ID}'" >> /root/envsetup/conf.sh
fi fi
echo "The config MS_ID has been set."
fi fi
if [ "${MS_API_KEY}" = "" ]; then if [ "${MS_API_KEY}" = "" ]; then
MS_API_KEY=$(echo "s$(pwgen 4)-$(pwgen 5)-$(pwgen 5)-$(pwgen 5)-$(pwgen 5)") MS_API_KEY=$(echo "s$(pwgen 4)-$(pwgen 5)-$(pwgen 5)-$(pwgen 5)-$(pwgen 5)")
...@@ -19,6 +20,7 @@ if [ "${MS_API_KEY}" = "" ]; then ...@@ -19,6 +20,7 @@ if [ "${MS_API_KEY}" = "" ]; then
else else
echo "MS_API_KEY='${MS_API_KEY}'" >> /root/envsetup/conf.sh echo "MS_API_KEY='${MS_API_KEY}'" >> /root/envsetup/conf.sh
fi fi
echo "The config MS_API_KEY has been set."
fi fi
if [ "${MS_SECRET}" = "secret" ]; then if [ "${MS_SECRET}" = "secret" ]; then
MS_SECRET=$(echo "$(pwgen 40)") MS_SECRET=$(echo "$(pwgen 40)")
...@@ -27,13 +29,15 @@ if [ "${MS_SECRET}" = "secret" ]; then ...@@ -27,13 +29,15 @@ if [ "${MS_SECRET}" = "secret" ]; then
else else
echo "MS_SECRET='${MS_SECRET}'" >> /root/envsetup/conf.sh echo "MS_SECRET='${MS_SECRET}'" >> /root/envsetup/conf.sh
fi fi
echo "The config MS_SECRET has been set."
fi fi
# Worker IP for whitelist # Worker IP for whitelist
if [ "${CELERITY_WORKER_IP}" = "" ]; then if [ "${CELERITY_WORKER_IP}" = "" ] || [ "${CELERITY_WORKER_IP}" = "127.0.1.1" ]; then
CELERITY_WORKER_IP=$(ip addr show | grep inet | grep -v 127 | grep -v ":" | awk -F " " '{print$2}' | awk -F "/" '{print$1}') CELERITY_WORKER_IP=$(ip addr show | grep inet | grep -v 127 | grep -v ":" | awk -F " " '{print$2}' | awk -F "/" '{print$1}')
if ( cat "/root/envsetup/conf.sh" | grep "CELERITY_WORKER_IP" >/dev/null ); then if ( cat "/root/envsetup/conf.sh" | grep "CELERITY_WORKER_IP" >/dev/null ); then
sed -i "s@^CELERITY_WORKER_IP=.*@CELERITY_WORKER_IP='${CELERITY_WORKER_IP}'@" /root/envsetup/conf.sh sed -i "s@^CELERITY_WORKER_IP=.*@CELERITY_WORKER_IP='${CELERITY_WORKER_IP}'@" /root/envsetup/conf.sh
else else
echo "CELERITY_WORKER_IP='${CELERITY_WORKER_IP}'" >> /root/envsetup/conf.sh echo "CELERITY_WORKER_IP='${CELERITY_WORKER_IP}'" >> /root/envsetup/conf.sh
fi fi
echo "The config CELERITY_WORKER_IP has been set."
fi fi
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
# migrate to Ubuntu 16.04 / apply sources.list # migrate to Ubuntu 16.04 / apply sources.list
if ( rgrep '14.04' /etc/lsb-release >/dev/null ); then if ( rgrep '14.04' /etc/lsb-release >/dev/null ); then
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
# DELL server - install dell openmanage # DELL server - install dell openmanage
if ( ! dpkg -l | grep dmidecode ); then if ( ! dpkg -l | grep dmidecode ); then
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
# Ms package install # Ms package install
DEBIAN_FRONTEND=noninteractive apt-get install -y python3-mediaserver DEBIAN_FRONTEND=noninteractive apt-get install -y python3-mediaserver
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
echo "Copying MS_deploy.sh" echo "Copying MS_deploy.sh"
cp -v MS_deploy.sh /var/tmp/MS_deploy.sh cp -v MS_deploy.sh /var/tmp/MS_deploy.sh
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
# install cm # install cm
apt-get install -y campus-manager apt-get install -y campus-manager
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
sed -i "s@\[CLIENT\]@$(hostname)@" default sed -i "s@\[CLIENT\]@$(hostname)@" default
sed -i "s@\[CACHE_DIR\]@${CACHE_DIR}@" default sed -i "s@\[CACHE_DIR\]@${CACHE_DIR}@" default
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
# for munin # for munin
DEBIAN_FRONTEND=noninteractive apt-get install -y ubicast-config DEBIAN_FRONTEND=noninteractive apt-get install -y ubicast-config
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
DEBIAN_FRONTEND=noninteractive apt-get install -y ferm DEBIAN_FRONTEND=noninteractive apt-get install -y ferm
cp ferm.conf /etc/ferm/ferm.conf cp ferm.conf /etc/ferm/ferm.conf
......
#!/bin/bash #!/bin/bash
source /root/envsetup/conf.sh source /root/envsetup/global-conf.sh
apt-get install -y dialog apt-get install -y dialog
cd /root cd /root
......
#!/bin/bash #!/bin/bash
# Envsetup local configuration file # Envsetup local configuration file
# See default configuration in default-conf.sh # See default configuration in global-conf.sh
source /root/envsetup/default-conf.sh
# Put your configuration here # Put your configuration here
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment