ministryofjustice / analytics-platform

Parent repository for the MOJ Analytics Platform
MIT License
14 stars 1 forks source link

IAM role not being assigned to new apps #25

Closed RobinL closed 6 years ago

RobinL commented 6 years ago

When this new app is deployed, it is not assigned an IAM role and therefore is unable to access secure data.

Andy and Kerin have checked the in Kubernetes cluster, and the problem is that the deployment doesn't have an IAM role attached.

Note the deployment script hasn't changed. It generates an IAM role name by hitting the control panel api. It's just that that's returning an empty string.

Here’s the groovy code which is returning an empty string for AWS.IAMRole: https://github.com/ministryofjustice/analytics-platform-jenkins-lib/blob/7644ab0c938008ed88502df8b3fd3d8fbd6c0672/vars/cpapi.groovy#L3

RobinL commented 6 years ago

image

RobinL commented 6 years ago

image

jmoz commented 6 years ago

The corresponding api call looks ok:

https://cpanelapi-master.services.alpha.mojanalytics.xyz/apps/?repo_url=https://github.com/moj-analytical-services/feedback-app

jmoz commented 6 years ago

Looks like the repo url changed from feedback-app to feedback_app which broke the api lookup.

xoen commented 6 years ago

After further investigation we concluded that the problem was not in the code but in the data input (app in CP-API had wrong repo_url)

Update this field made the deploy work as expected. Closing this.