7. Sergio A. Pohlmann – 2011
Cloud AWS – Problemas Complexos, Soluções Simples
Como começar com AWS (grátis)
Criar uma conta em AWS
●
http://aws.amazon.com
Criar uma instancia para provas
●
Escolher uma ferramenta para trabalhar
●
8. Sergio A. Pohlmann – 2011
Cloud AWS – Problemas Complexos, Soluções Simples
Ferramentas para AWS
Ferramenta de Administração AWS
●
AWS API
●
ElasticFox
●
9. Sergio A. Pohlmann – 2011
Cloud AWS – Problemas Complexos, Soluções Simples
Ferramenta de Administração AWS
●
10. Sergio A. Pohlmann – 2011
Cloud AWS – Problemas Complexos, Soluções Simples
Lançando uma instância
11. Sergio A. Pohlmann – 2011
Cloud AWS – Problemas Complexos, Soluções Simples
Diferenças de instâncias
EC2
●
EBS
●
26. Sergio A. Pohlmann – 2011
Cloud AWS – Problemas Complexos, Soluções Simples
/root
Parte 1
.bashrc
.autoconfig
preparedata
informConfig
cpConfig
autoConfigure
lib
functions
PATH="/root/.autoconfig";
MAILSERVER="/usr/sbin/ssmtp";
MSGFILE="$PATH/.changeIP.msg";
MAILTO="sergio@ycube.net";
# Prepare a file to inform a instance IP
echo "<?php $url="
http://$INFORM_IP/404/writeConfig.php?".
"host=$HOST_&ip=$IP_"; ?>" > .temp
27. Sergio A. Pohlmann – 2011
Cloud AWS – Problemas Complexos, Soluções Simples
/root
.bashrc
.autoconfig
preparedata
# Check a IP Change
if [ -e $PATH/.old_ip ] then
. $PATH/.old_ip
fi
Parte 2
if [ "$IP_" != "$OLD_IP" ] then
# Prepare a message to send
echo "To: $MAILTO " > $MSGFILE;
echo "Subject: $HOST_ IP Changed"
>> $MSGFILE
echo "$HOST_ has changed your IP"
>> $MSGFILE
echo
>> $MSGFILE
echo "New IP is: $IP_" >> $MSGFILE
informConfig
cpConfig
autoConfigure
lib
functions
fi
$MAILSERVER $MAILTO < $MSGFILE
28. Sergio A. Pohlmann – 2011
Cloud AWS – Problemas Complexos, Soluções Simples
/root
Parte 3
.bashrc
.autoconfig
echo "OLD_IP=$IP_" > $PATH/.old_ip
preparedata
# Inform a the instance name and IP
informConfig
$PATH/informConfig
cpConfig
autoConfigure
lib
functions
35. Sergio A. Pohlmann – 2011
m
pl
e
!
Cloud AWS – Problemas Complexos, Soluções Simples
Resumindo:
Experimentar Amazon AWS Grátis
●
Controlar modificações de IP entre servidores
Si
●
B
e
Refazer automaticamente algumas configurações
●
Utilizando: Shell Scrit / PHP