openshift v3.3에서 만든 프로젝트에 컨테이너를 빌드하고 배포하는 작업을 자동화하려고합니다. 문서에서 나는 이것을하기 위해 서비스 계정을 활용할 필요가 있음을 알 수있다. 그러나 문서를 따르기가 어렵고 블로그에서 찾은 예제가 그 작업을 완료하지 못한다. 내 워크 플로는 다음과 같이 사용하는 명령과 같습니다.서비스 계정을 사용하여 배포 자동화 실패
BUILDER_TOKEN='xxx'
DEPLOYER_TOKEN='xxx'
# build and push the image works as expected
docker build -t registry.xyz.com/want/want:latest .
docker login --username=<someuser> --password=${BUILDER_TOKEN} registry.xyz.com
docker push registry.xyz.com/<repo>/<image>:<tag>
# This fails with error
oc login https://api.xyz.com --token=${DEPLOYER_TOKEN}
oc project <someproject>
oc new-app registry.xyz.com/<repo>/<image>:<tag>
Notice I login into the rest api interface, select the project and create the app but this fails with the following errors:
error: User "system:serviceaccount:want:deployer" cannot create deploymentconfigs in project "default"
error: User "system:serviceaccount:want:deployer" cannot create services in project "default"
아이디어가 있으십니까?
명령 예제를 제공해 주시겠습니까? –
자세한 내용은 https://docs.openshift.org/latest/admin_guide/service_accounts.html을 참조하십시오. 나는이 문제가 우리의 오픈 시프트 전용 플랫폼에 존재한다고 언급 했어야했는데 나는 일반 사용자로 로그인했을 때만 문제를 보았다. –