Тёмный

How to set up Django on Cloud Run with Terraform 

Google Cloud Tech
Подписаться 1,2 млн
Просмотров 10 тыс.
50% 1

Code for this episode → goo.gle/30jsxcX
Django is a free and open source web application framework, written in Python that can help you build apps. After building your web-based app with Django, how long does it take to deploy to Google Cloud Platform? In this episode of Serverless Expeditions Extended, Craig and Martin will teach you how to quickly deploy your Django-based web app to Google Cloud Run. Watch to learn how Craig uses a Terraform script to automate the deployment process and save Martin’s Saturday!
Chapters:
0:00 - Intro
1:45 - Setting up Django with Terraform
2:38 - Step 1, Activate Google Cloud
2:55 - Step 2, Set up variables
3:10 - Step 3, Activate your service APIs
3:24 - Step 4, Create a custom service account
3:40 - Step 5, Create your database
4:09 - Step 6, Create your secrets
4:25 - Step 7, Prepare your secrets for Django
5:00 - Step 8, Expand Service Account permissions
5:21 - Step 9, Populate your secrets
6:08 - Step 10, Create your Cloud Run service
6:23 - Step 11, Specify Cloud Run permissions
6:38 - Step 12, Grant access to your database
7:02 - Step 13, Run migrations and prepare static files
7:46 - Step 14, View final output
8:27 - Editing the settings.py file
10:16 - Applying the Terraform manifest
13:07 - Wrap-up
Checkout more episodes of Serverless Expeditions → goo.gle/ServerlessExpeditions
Subscribe to Google Cloud Tech → goo.gle/GoogleCloudTech
#ServerlessExpeditions #ServerlessExpeditionsExtended #CloudRun
product: Cloud - Serverless Computing - Cloud Run; fullname: Martin Omander;

Наука

Опубликовано:

 

7 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@JoseLaruta
@JoseLaruta Год назад
Awesome!! This is just what I was looking for. Certainly, deploying a Django app is no joke
@TheMomander
@TheMomander Год назад
We're happy to hear that! Let us know how if goes.
@mykolamorozov2099
@mykolamorozov2099 2 года назад
Does that terraform module detect code changes in Django app?
@arnoldwolfstein
@arnoldwolfstein 2 года назад
No. terraform has nothing to do with apps (in this case django).
@meetdaxini
@meetdaxini 2 года назад
It always took so much time when I wanted to deploy my django app on cloud run but with the Terraform flow explained in the videos, django apps will be deployed and running live in no time. Please in future also make a video for CI/CD integration along with this
@TheMomander
@TheMomander 2 года назад
Glad to hear you found it useful and thank you for the suggestion!
@brian-greig-tech
@brian-greig-tech 2 года назад
This is a great video, but you mentioned that this supports continuous deployment but according to all the instructions you’ve provide it doesn’t. If perform all the steps you’ve highlighted and the try update the Index.html file and run the last command you recommended you will not see the changes reflected in the deployments. Can you explain what steps you missed for continuous deployment?
@katiemclaughlin5167
@katiemclaughlin5167 Год назад
If you run the cloudbuild full manifest in the repo, you'll get all your code updates. If you run terraform apply, you'll get all your infra updates. Hope this helps!
@brian-greig-tech
@brian-greig-tech Год назад
@@katiemclaughlin5167 - thanks for your reply. If you attempt the same solution with just a simple upgrade to Django==4.1.1, you'll find that your proposal does not work. The build step will fail to connect to the cloud sql instance and it does not collect the static files. Please may I request Google to upgrade the docs and tutuorial
@shahrose786
@shahrose786 2 года назад
there needs to be a course with terraform and GCP ... I only have came across terraform and was courses :/
@rooariimanuel204
@rooariimanuel204 2 года назад
Super content
@craiglabenz9147
@craiglabenz9147 2 года назад
Good question! In the 0001_createsuperuser.py file you'll find a call to `User.objects.create_superuser()`, which uses the hardcoded value "admin" for the username. Martin and I were only treating its password as sensitive - but you could change this for your apps to also conceal the superuser's username.
@katiemclaughlin5167
@katiemclaughlin5167 2 года назад
It's in a data migration, check out the 0001_create_superuser.py file in the repo for the details!
@arjunk5959
@arjunk5959 2 года назад
Great video.. But complex code and functionality for a beginner like me.. It would be better if things are summarized at the end for better understanding for beginner coders like me
Далее
Cloud Functions vs. Cloud Run
20:37
Просмотров 47 тыс.
Why you shouldn't aim for 100% uptime #Shorts
1:00
Просмотров 4 тыс.
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
What Django Deployment is Really About by James Walters
25:44
FastAPI, Flask or Django - Which Should You Use?
9:49
Designing a serverless finance system on Google Cloud
14:30
Get started on Cloud Run: Deploy a meme generator app!
12:09
How to easily Continuous Deployment with Cloud Run
34:24
Terraform, serverless, and Cloud Run in practice
15:44
Ускоряем ваш TV🚀
0:44
Просмотров 484 тыс.
АЙФОН Г0ВН0
0:54
Просмотров 1,9 млн