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

Use cloud backed url #57

Open
adrianriobo opened this issue Nov 2, 2023 · 4 comments · May be fixed by #88
Open

Use cloud backed url #57

adrianriobo opened this issue Nov 2, 2023 · 4 comments · May be fixed by #88
Assignees
Labels
enhancement New feature or request windows

Comments

@adrianriobo
Copy link
Contributor

Qenvs offers the feature to store the state on an external resource, for windows environments we will use https://www.pulumi.com/docs/concepts/state/#azure-blob-storage

This willl allow us to setup a scheduled cleaner to check states on that storage and ensure no running instances

@odockal
Copy link
Contributor

odockal commented Nov 30, 2023

Create a unique storage account name. Ie. window version, featue pack, build number to distinguish between various storages.

@odockal
Copy link
Contributor

odockal commented Jan 9, 2024

storage_id='${{ github.workflow// / }}_${{ matrix.windows-version }}_${{ matrix.windows-featurepack }}_${{ github.run_id }}-${{ github.run_number }}'

@adrianriobo
Copy link
Contributor Author

sorry yeah also take into account that you would need to create the blob storage according to (change the name, need to parameterize that https://github.com/adrianriobo/qenvs/blob/059ac80a7b6fc22879492f6b05cd6f071390f447/hacks/azure_setup.sh#L18 also take into account last line you need the AZURE_STORAGE_KEY and also pass that as secret and as -e on the podman run cmd

@adrianriobo
Copy link
Contributor Author

adrianriobo commented Jan 9, 2024

Also I am doing it for some other project so I found out there is one cmd missing on the script redhat-developer/mapt#185

The cmd will create the blob container for the storage so lets say you create it with

az storage container create -n qenvs-state --account-name sa_name_you_created_before

then on your podman run you will have something like:

...
--backed-url  azblob://qenvs-state/${storage_id} \
...

and 2 envs:

...
-e AZURE_STORAGE_ACCOUNT='${{ secrets.AZURE_STORAGE_ACCOUNT }}' \
-e AZURE_STORAGE_KEY='${{ secrets.AZURE_STORAGE_KEY }}'
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants