Skip to content
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

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

BillAnastasiadis
Copy link
Collaborator

@BillAnastasiadis BillAnastasiadis commented Aug 30, 2024

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).

@BillAnastasiadis BillAnastasiadis force-pushed the token branch 7 times, most recently from 270f4f7 to 201f4f6 Compare September 2, 2024 11:25
@BillAnastasiadis BillAnastasiadis changed the title WIP: Move token generation to ansible Move token generation to ansible Sep 2, 2024
@alvarocarvajald
Copy link
Collaborator

alvarocarvajald commented Sep 2, 2024

Seems QESAPDEPLOY_HANA_KEYNAME was set in both verification runs. Not sure if that has an impact though.

Copy link
Collaborator

@alvarocarvajald alvarocarvajald left a 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'"
Copy link
Collaborator

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?

Copy link
Collaborator

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

Copy link
Collaborator Author

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

@mpagot
Copy link
Collaborator

mpagot commented Sep 2, 2024

Seems QESAPDEPLOY_HANA_KEYNAME was set in both verification runs. Not sure if that has an impact though.

It's fine to do... after this PR we can move to a new situation where we only have QESAPDEPLOY_HANA_KEYNAME

Copy link
Collaborator

@mpagot mpagot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mpagot
Copy link
Collaborator

mpagot commented Sep 3, 2024

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

@BillAnastasiadis BillAnastasiadis merged commit ec900d6 into SUSE:main Sep 3, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants