aws-code-deploy

AWS CodeDeploy AfterInstall script is being run from code-deploy agent dir

╄→尐↘猪︶ㄣ 提交于 2019-12-22 02:06:08
问题 I'm trying to run AfterInstall script in AWS code deploy, but it is being run from the /opt/codedeploy-agent/ dir instead of my app directory. This is how appspec.yml file looks like: version: 0.0 os: linux files: - source: / destination: /tmp/epub hooks: AfterInstall: - location: server/install-packages.sh runas: root As you can see it's a basic example. Now, the bash script looks like this: #!/bin/bash npm install I just want to npm install and that's it. Unfortunately I'm getting the error

Code Deploy ApplicationStart gets stuck on pending using node

▼魔方 西西 提交于 2019-12-21 17:37:39
问题 Hi I'm new to using Code Deploy. I am trying to launch a node application. I have setup.sh, start.sh and app.js in my root directory. This is my appspec.yml file version: 0.0 os: linux files: - source: / destination: / hooks: Install: - location: setup.sh timeout: 3600 ApplicationStart: - location: start.sh timeout: 3600 setup.sh yum -y install nodejs npm --enablerepo=epel npm install start.sh node /app.js app.js (just a basic dummy server) var express = require("express"); var app = express(

AWS codedeploy deployment throwing “[stderr] Could not open input file” while trying to invoke a php file from the sh file at afterInstall step

好久不见. 提交于 2019-12-20 05:58:45
问题 I have the following defined in the appspec file - hooks: AfterInstall: - location: afterInstall.sh Following is the content of afterInstall.sh (I am trying to invoke a php file from the sh file) - php afterInstall.php Both the files afterInstall.sh and afterInstall.php are at the same level (outermost level) in the zip archive that I am uploading to S3 - appspec.yml afterInstall.sh afterInstall.php I am getting the following error - Error Code ScriptFailed Script Name afterInstall.sh Message

Unable to capture changes to log file via nagios check_logwarn plugin command invoked via PHP exec() triggered via Jenkins

空扰寡人 提交于 2019-12-19 23:29:06
问题 I am using nagios check_logwarn to capture changes to log files. In order to test my setup, I have been manually adding the following log line to the concerned log file - [Mon Mar 20 14:24:31 2017] [hphp] [12082:7f238d3ff700:32:000001] [] \nFatal error: entire web request took longer than 10 seconds and timed out in /var/cake_1.2.0.6311-beta app/webroot/openx/www/delivery/postGetAd.php on line 483 The above should get caught by the following nagios command, because it contains the keyword

Duplicate permission setting instructions

假装没事ソ 提交于 2019-12-14 04:09:33
问题 I'm trying to use CodeDeploy's permission handling stuff to deploy a Laravel app but I'm constantly getting a message saying /home/tether/storage/app has duplicate permissions. To my eyes, it looks like the except should make it only one rule. yaml permissions: - object: /home/tether pattern: "**" except: [ storage, storage/app, storage/framework, storage/framework/cache, storage/framework/sessions, storage/framework/views, storage/framework, storage/logs ] owner: tether group: tether -

appspec.yml failed to call scripts

牧云@^-^@ 提交于 2019-12-12 06:24:17
问题 I am trying to setup CI using AWS CodeDeploy and CircleCI. Right now I am stuck at the step where AWS CodeDeploy should copy stuff into EC2 and run scripts. But somehow CircleCI tells me something is wrong. Does anyone know what might be happening? Thanks. the appspec.yml is: version: 0.0 os: linux files: - source: / destination: /home/ubuntu hooks: BeforeInstall: - location: scripts/setup.sh timeout: 3800 runas: root ApplicationStart: - location: scripts/start.sh timeout: 3800 runas: root

CodeDeploy agent did not find an AppSpec file within the unpacked revision directory at revision-relative path “appspec.yml”

こ雲淡風輕ζ 提交于 2019-12-11 12:13:04
问题 The CodeDeploy agent did not find an AppSpec file within the unpacked revision directory at revision-relative path "appspec.yml" . The revision was unpacked to directory "/opt/codedeploy-agent/deployment-root/0bb5a5aa-5894-4575-a69c-a7a4e79b4cdf/d-HQ5GBC7SW/deployment-archive" The AppSpec file was expected but not found at path "/opt/codedeploy-agent/deployment-root/0bb5a5aa-5894-4575-a69c-a7a4e79b4cdf/d-HQ5GBC7SW/deployment-archive/appspec.yml". 回答1: I had the same problem and the other

AWS CodeDeploy Duplicate permission

北战南征 提交于 2019-12-11 04:04:13
问题 I'm trying to set permissions in my appspec.yml file, but I keep getting an error about duplicate permission settings when I run a deployment Duplicate permission setting instructions for /data/html/httpdocs/artisan This is currently (with except in list format) how the permission object is configured in my appspec.yml, per this threads recommendation . I actually have multiple files I want different permissions on, but I can't seem to get it to work w/ just one file? what is the correct way?

AWS deployment “Unable to remove top level folder”

瘦欲@ 提交于 2019-12-10 18:08:32
问题 I have installed the Bitbucket addon to deploy with AWS CodeDeploy but for an unknown reason, I get this error "Unable to remove top level folder" when I try to deploy from the bitbucket view. This is my appspec.yml version: 0.0 os: linux files: - source: / destination: /var/www/citytwig hooks: AfterInstall: - location: scripts/configure.sh timeout: 300 runas: root I have already deployed other bitbucket repositories successfully, I'm wondering why this one doesn't work. 回答1: After a long

What is a good way to deploy a distributed application using CodeDeploy and a CI tool?

爱⌒轻易说出口 提交于 2019-12-10 14:24:07
问题 When using AWS, it seems a nice way to deploy an application to a newly created instance is via AWS CodeDeploy. This works as follows: Set up an auto-scaling group for the application Write a user-data bash script for the auto-scaling group which pulls the CodeDeploy agent from S3, installs it and starts it Set up a CodeDeploy deployment group which deploys to the auto-scaling group Now, when an application bundle (e.g. jar or debian package) is deployed to the deployment group, it will be