2017-03-08 4 views
1

저는 Bluemix ToolChain 서비스, 즉 CI 서비스를 사용하고 있습니다.Bluemix 파이프 라인 준비에서 "장치에 남은 공간 없음"을 피하는 방법은 무엇입니까?

no space left to device 때문에 배포 준비가 실패했습니다.

manifest.yml을 사용하여 disk_quota 설정 기본값을 1024M 및 2048MB로 변경했지만 두 결과 모두 기본 disk_quota와 같습니다.

기본값을 sdk-for-nodejs으로 설정해 보았습니다. 기본값을 사용하면 많은 불필요한 buildpack 파일 (예 : java 관련 buildpack)이 다운로드됩니다. 나는 그것이 절약 공간을 가져올 것이라고 생각했지만 결과는 다시 동일합니다.

어떻게 해결할 수 있습니까? 아이디어가 있습니까?

다음은 오류 로그입니다. (너무 긴 로그이므로 일부 로그를 ":"로 바꿉니다.)

Target: https://api.ng.bluemix.net 
Using manifest file /home/pipeline/aafdbd4d-c22d-4fee-ae34-8d1146cacb56/manifest.yml 

: 
: 
Uploading 101M, 117985 files 


Done uploading 
OK 

: 
: 
Downloading sdk-for-nodejs... 
Downloaded sdk-for-nodejs 
Creating container 
Successfully created container 
Downloading app package... 
Downloaded app package (107.3M) 
Downloading build artifacts cache... 
Downloaded build artifacts cache (6M) 
Staging... 
-----> IBM SDK for Node.js Buildpack v3.10-20170119-1146 
     Based on Cloud Foundry Node.js Buildpack v1.5.24 
-----> Creating runtime environment 

     NPM_CONFIG_LOGLEVEL=error 
     NODE_MODULES_CACHE=true 
-----> Installing binaries 
     engines.node (package.json): unspecified 
     engines.npm (package.json): unspecified (use default) 

     Resolving node version (latest stable) via 'node-version-resolver' 
     Installing IBM SDK for Node.js (4.7.2) from cache 
-----> Restoring cache 
-----> Checking and configuring service extensions before installing dependencies 
-----> Building dependencies 
     Prebuild detected (node_modules already exists) 
     Rebuilding any native modules 
     Skipping cache restore (new runtime signature) 
     [email protected] /tmp/app/node_modules/body-parser 
     : 
     : 
     [email protected] /tmp/app/node_modules/webpack/node_modules/memory-fs/node_modules/readable-stream/node_modules/core-util-is 
-----> Installing App Management 
-----> Caching build 
     Saving 2 cacheDirectories (default): 
     Clearing previous node cache 
     - node_modules 
-----> Build succeeded! 
     ├── [email protected] 
     ├── [email protected] 
     ├── [email protected] 
     ├── [email protected] 
     ├── [email protected] 
     ├── [email protected] 
     ├── [email protected] 
     ├── [email protected] 
     ├── [email protected] 
     ├── [email protected] 
     ├── [email protected] 
     └── [email protected] 

cp: cannot create regular file ‘/tmp/contents666597699/app/node_modules/babel-core/node_modules/babel-register/node_modules/core-js/library/modules/_date-to-primitive.js’: No space left on device 
: 
: 
cp: cannot create regular file ‘/tmp/contents666597699/app/node_modules/babel-core/node_modules/babel-register/node_modules/core-js/library/modules/es6.regexp.search.js’: No space left on device 
cp: : No space left on device 
Exit status 1 
Staging failed: Exited with status 1 
Destroying container 
cp: cannot create regular file ‘/tmp/contents666597699/app/node_modules/babel-core/node_modules/babel-register/node_modules/core-js/library/modules/_wks.js’: No space left on device 
Successfully destroyed container 

FAILED 
Error restarting application: StagingError 

TIP: use 'cf logs kcuc-web --recent' for more information 

Finished: FAILED 

또한 이것은 내 manifest.yml 파일입니다.

applications: 
- path: . 
    memory: 256M 
    instances: 1 
    domain: mybluemix.net 
    name: xxxxx 
    host: xxxxx 
    disk_quota: 1024M 
    buildpack: sdk-for-nodejs 
    env: 
    DEBUG: 'false' 
    API_PROTOCOL: https 
    API_HOST: xxxxx.mybluemix.net 
    API_PORT: '443' 
    CLIENT_PORT: '443' 

답변

3

나는 developerWorks에서 대답을 얻었다. (Todd Kaplinger, 감사합니다.)

배포 단계에서 불필요한 node_modules 디렉토리를 복사하는 것이 근원입니다. 따라서 .cfignore을 추가하고 node_modules/을 추가해야합니다. 그 후 - (.?.> 배포는 과정을 체인, 그래서 구축되어 이미 완료되는 경우, node_modules 디렉토리 배포 단계에서 불필요한 빌드가 있기 때문에 왜 필요)

,

(구문은 .gitignore 같다) 다운로드 응용 프로그램 패키지 크기가 1MB 미만이되고 불필요한 복사 작업이 제거됩니다. 결과적으로 배포가 성공할뿐만 아니라 배포 준비 속도가 훨씬 빨라집니다.

+0

추가 방법 .cfignore –

+1

그냥 편집기를 통해 추가하십시오. 'vi .cfignore','touch .cfignore','echo "node_modules /"> .cfignore' 등등. – tkhm

+0

알았어요. thnnks .. –