-
Notifications
You must be signed in to change notification settings - Fork 9
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
Refactor how data is persisted in Azure #2153
Comments
Another idea could be to install |
This is definitely another option. There are a couple issues to work through, most notably With a WebJob, we would get some type of logging in the Azure UI and we don't have to worry about the underlying runtime. I'm open to other ideas though if it seems like too much of a change to uproot our source tree. |
I agree with the lack of visibility into failures if we just run |
Perhaps another option (this seems difficult to get working correctly as well): avoid We would need to modify the container to enable SSH. This also seems hard to get the SSH server running in the container as a non-root user: https://www.golinuxcloud.com/run-sshd-as-non-root-user-without-sudo/ |
I rewrote this ticket to focus on the just the updates for setting The automated fixture dump/restore could be a follow-up if these changes end up working. |
Recently, we have been seeing errors in
dev
related to attempting sign in to the Admin and the database being in a locked state:While we have only seen this in
dev
so far, it seems inevitable to come up intest
and/orprod
, where it will really be a problem if we can't access the Admin or if the app is locked for user requests.The root of the issue is due to the changes from #1773 to persist the (Sqlite) database file in a mounted Azure file share. This mostly works for reads; but now that we have the potential for more writes via the Admin, it is starting to break down (as expected, see e.g. this SO post).
The idea is to reuse as much of the existing infrastructure and process as possible, with two changes:
/home
directory/home
to a non-file share directoryThis should solve the Sqlite-over-a-network issue, while allowing us to maintain data configured via the Admin across restarts/deployments.
Acceptance Criteria
WEBSITES_ENABLE_APP_SERVICE_STORAGE=true
/home
directory, not on a network file sharePlan
django.db
/home
directory to work around the issue above Refactor: move the application directory up a level #2156DJANGO_DB_DIR
secret to a location under/home
django.db
into the locationWEBSITES_ENABLE_APP_SERVICE_STORAGE=true
and restart the appAdditional context
This FAQ article about Azure Web App Containers has been very informative: https://techcommunity.microsoft.com/t5/apps-on-azure-blog/things-you-should-know-web-apps-and-linux/ba-p/392472
We can also think about dumping fixture data on some frequency into the network file share for a backup, following the commands from the notes in #1856 (comment)
One idea for implementing this is by using Azure WebJobs, which is now in Preview for Linux Containers and can run simple bash
.sh
scripts.The text was updated successfully, but these errors were encountered: