5 ms·
1) Look into configuration management. Ansible and Salt Stack are both python-based so everyone should be able to contribute if needed. 2)It's popular to run y
by twunde 11y ago
1) Look into configuration management. Ansible and Salt Stack are both python-based so everyone should be able to contribute if needed.
2)It's popular to run your automation through CI tools like Jenkins because it has auditing and logging built in and it's easy to set up.
3) Don't run bower/npm install/update on production because if npm or github go down then your production site will break because a partial code change has taken place. You should build (and test) on a separate server and then copy the code changes over to production.
Really you're looking for a Capistrano for python apps. If you're going to build a deployment tool on your own it's worth looking at their approach. For python, fabric is a fairly standard way to automate code deployments. The good news is that you're on the right path. Having automated deployment procedures will give devs a lot more time back AND remove a whole class of errors
I've moved my current company's deployment from manual line by line ftp deployment to an automated build and deploy using Jenkins to trigger ansible playbooks. Given the choice, I'd probably just use capistrano or fabric instead of building from scratch. I'd estimate that we've saved several months of work per a year in both deployment time and in debugging production issues.
- aalhour 11y agoThat's one comprehensive list of items, thanks for this. I will take a look at Capistrano, Fabric, Ansible and SaltStack, in addition to the configuration management topic. I think your advise of copying source packages and dependencies makes total sense, I have seen it happen at other places. My question remains, how would I automate a developer's environment setup (machine)? Assume I have the OS installed and connected to the internet already. Can I use the tools you referred to for deploying these apps to developers machines? What would you say regarding Python's virtualenvs creation? Can that be incorporated into the configuration management tools?
- caw 11y agoAdding to "Don't run bower/npm install/update on production" - a lot of package managers have a local mirror available and you can point your build server to it. This gives you some redundancy if the public mirror goes down, and also faster downloads within the network. Bandersnatch mirrors all of pypi, there are some others that will just mirror the parts of pypi you need and fetch new packages as you try to pip install things that don't exist in its local cache.
- aprdm 11y agoYou can use Vagrant and Ansible, I think it's a killer combo, ansible provisions your vagrant/virtualbox machine for the dev.