2017-01-18 8 views
0

인스턴스 시작 및 앱 배포시 작성자를 설치해야하는 AWS Opsworks 설치가 있지만 설치가 실패합니다. 누구든지 이걸 내뱉는 것을 도울 수 있습니까? 나는이 요리사의 레시피를 실행 해요 :Opsworks가 작곡가 오류 설치

node[:deploy].each do |app_name, deploy| 
    script "install_composer" do 
    interpreter "bash" 
    user "ubuntu" 
    cwd "#{deploy[:deploy_to]}/current" 
    code <<-EOH 
    curl -sS https://getcomposer.org/installer | php 
    php composer.phar install --no-dev 
    EOH 
    only_if { ::File.exists?("#{deploy[:deploy_to]}/current/composer.json") } 
    end 
end 

내가 (라인 (21)가 script "install_composer" do로 하나입니다)를 다음과 같은 오류가 발생하고 있습니다.

https://github.com/awslabs/opsworks-example-cookbooks/blob/master/phpapp/recipes/appsetup.rb https://github.com/onema/opsworks-chef-cookbooks/blob/master/composer/recipes/install.rb

셋업 우분투 인스턴스에서 실행

[2017-01-18T11:16:38+00:00] ERROR: Running exception handlers 
[2017-01-18T11:16:38+00:00] ERROR: Exception handlers complete 
[2017-01-18T11:16:38+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out 
[2017-01-18T11:16:38+00:00] ERROR: script[install_composer] (composer::install line 21) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1' 
---- Begin output of "bash" "/tmp/chef-script20170118-1672-16lyp81" ---- 
STDOUT: All settings correct for using Composer 
The installation directory "/srv/www/[app_name]/releases/20170113140255" is not writable 
Could not open input file: composer.phar 
STDERR: 
---- End output of "bash" "/tmp/chef-script20170118-1672-16lyp81" ---- 
Ran "bash" "/tmp/chef-script20170118-1672-16lyp81" returned 1 
[2017-01-18T11:16:38+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) 

나는 스크립트를 구축하기 위해 이러한 예제의 조합을 사용했다. 인스턴스는 setup_failed을보고합니다. 사용자 정의 래서 피를 비활성화하면 인스턴스가 잘 시작됩니다.

The installation directory "/srv/www/[app_name]/releases/20170113140255" is not writable에 표시되는 앱은 내 앱 목록의 4 번째 앱이지만 실제로는 작곡가를 설치해야하는 첫 번째 앱입니다 (composer.json 포함).

희망을 보내주세요. 감사.

답변

0

사용자가 제조법에서 "우분투"가 아닌 "루트"라고 생각할 때이를 해결했습니다. 우분투 사용자는 단순히 릴리스 폴더에 새 폴더를 만들 수있는 적절한 권한이 없었습니다.