Python for Entrepreneurs Transcripts
Chapter: Deploying to the cloud
Lecture: Updating resources

Login or purchase this course to watch this video and the rest of the course contents.
0:01 We've been through a whole lot in this chapter, let's take a look back on what we have accomplished so that you'll know how to keep evolving
0:07 your deployment as you continue to build your business. When we started out, at the beginning of this chapter
0:12 this was the situation- we had built an application but it was sitting on your local machine, customers had no way to get to it
0:17 because you're not going to run your application off of your local development environment.
0:20 By the end of the chapter, we had set everything up on our Digital Ocean server we put many, many pieces in place and the best part is
0:28 we automated it all with Ansible, whenever you want to deploy and update you can just rerun the Ansible playbook,
0:34 Ansible playbook follows a principle known as item potency, item potency sounds like a fancy word, but all it means is
0:41 that we can run the playbook over and over again, and it will continue to work because the changing state of our deployment
0:48 will not impact the ability for the playbook to function. For example, if we already have our virtual environment set up
0:55 we'll simply skip that step, because we don't need to create a new virtual environment we've either used the Ansible modules that handle changing state
1:03 or we've built checks into our playbook, to determine if our server is in one state or another and handle that appropriately.
1:11 Make sure that as you continue to update the Ansible playbook, you keep in mind what happens after the first time you run your playbook,
1:18 are you depending on your server being in a certain state, what if it is not in that state, what if you don't have a system package installed,
1:26 what if you've already created a certain directory. Make sure that you can run your Ansible playbook over and over again
1:32 and it will continue to be successful in setting up your application. With that, I want to provide a few more resources,
1:38 a couple of them are of course full stack Python, the first one being the deployment page, there is a slew of resources on there
1:44 if you want to get into continuous integration, and other more advanced deployment setups, you should also check out the wsgi server's page,
1:51 to better understand how Python applications are run in our deployment, we use waitress, there are other wsgi server implementations out there,
1:57 like green unicorn and mod wsgi, so you can learn more about that both on the deployment and the wsgi server's pages.
2:03 All of the files that we've used throughout this chapter are stored within the deployment directory of the Python for Entrepreneurs course demos,
2:10 you should be able to copy and paste the code examples from the Ansible code examples rather than having to type everything in manually
2:17 and so hopefully that'll help you get up and running even faster. And then, finally Michael and I did an episode on deploying Python web applications
2:25 that talks about other bits that you can deploy, such as nosql databases, task queues, other code libraries that you may want to consider using,
2:32 as you build out your application, and if you run into any trouble please hit me up at @fullstackPython, on twitter.
2:38 Now you can stop worrying about getting your application up and running and get back to building your business.


Talk Python's Mastodon Michael Kennedy's Mastodon