AWS: mudanças entre as edições

De Wiki Doth
Ir para navegação Ir para pesquisar
Linha 48: Linha 48:
In order to prevent this from happening you'll have to remove any previously installed deployment from the server.
In order to prevent this from happening you'll have to remove any previously installed deployment from the server.


#Stop the code deploy agent
Stop the code deploy agent


<code>
<code>
sudo service codedeploy-agent stop   
sudo service codedeploy-agent stop   
</code>
</code>


Linha 59: Linha 57:


<code>
<code>
/opt/codedeploy-agent/deployment-root
/opt/codedeploy-agent/deployment-root
</code>
</code>


Linha 67: Linha 63:


<code>
<code>
sudo service codedeploy-agent start
sudo service codedeploy-agent start
</code>
</code>

Edição das 14h09min de 16 de junho de 2022

x

EC2

Metadatas: http://169.25.169.254/latest/metadata

https://docs.aws.amazon.com/pt_br/AWSEC2/latest/UserGuide/ec2-instance-metadata.html

Code Deploy

Instalar agente do CodeDeploy

sudo apt-get update

sudo apt install ruby-full

sudo apt install wget

cd /home/user/

wget https://bucket-name.s3.region-identifier.amazonaws.com/latest/install

wget https://aws-codedeploy-sa-east-1.s3.sa-east-1.amazonaws.com/latest/install

chmod +x ./install

sudo ./install auto

https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-ubuntu.html

  • Verificar

sudo service codedeploy-agent status

sudo service codedeploy-agent start

Erro Code Deploy

The ApplicationStop hook is being called from the previously installed deployment before trying to run the current deployment appspec.yml file.

In order to prevent this from happening you'll have to remove any previously installed deployment from the server.

Stop the code deploy agent

sudo service codedeploy-agent stop

clear all deployments under

/opt/codedeploy-agent/deployment-root

Restart the code deploy agent

sudo service codedeploy-agent start