-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move token generation to ansible #264
Conversation
270f4f7
to
201f4f6
Compare
Seems QESAPDEPLOY_HANA_KEYNAME was set in both verification runs. Not sure if that has an impact though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But I have a question.
when: az_sas_token is not defined or az_sas_token == "" | ||
|
||
- name: "Set expiry" | ||
ansible.builtin.command: "date -u +'%Y-%m-%dT%H:%MZ' -d '+20 minutes'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess 20 minutes is enough in a normal deployment, but what happens when it fails and we need to re-deploy? A new token will be generated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! We could make it configurable. On the other hand token is not needed across all the test or even not across all the deployment. Token just needs to be valid during installer download Ansible task in same playbook
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm you are correct. I will increase it and run a final VR, merging automatically if it passes since there are 2 approvals
It's fine to do... after this PR we can move to a new situation where we only have QESAPDEPLOY_HANA_KEYNAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
201f4f6
to
c8540f0
Compare
We should also update the documentation and example files to explain and suggesting the usage of the new key approach. One file to be updated is https://github.com/SUSE/qe-sap-deployment/pull/263/files#diff-4cd7c4907a755b045fd47cc82f36e9d7f1b39cd595156a707502729220d5398aR49 |
This pr enables qe-sap-deployment to generate the SAS token in ansible when it is not defined in the config.yaml. It requires providing the key name for the generation of the token. It can be used both for manual deployments (by providing the key name instead of the generated key) and openqa runs (if the key is provided as a setting instead of the generated SAS token).
With token generated in openqa and '
QESAPDEPLOY_HANA_KENAME
not set:https://openqaworker15.qa.suse.cz/tests/295828
Without token generated in openqa and
QESAPDEPLOY_HANA_KEYNAME
set as an openqa variable:https://openqaworker15.qa.suse.cz/tests/296013